@@ -25,7 +25,7 @@ use rustc_middle::mono::Visibility;
2525use rustc_middle:: ty:: TyCtxt ;
2626use rustc_session:: config:: { DebugInfo , Offload } ;
2727use rustc_span:: Symbol ;
28- use rustc_target:: spec:: { Env , SanitizerSet } ;
28+ use rustc_target:: spec:: { CfgAbi , SanitizerSet } ;
2929
3030use super :: ModuleLlvm ;
3131use crate :: attributes;
@@ -127,7 +127,7 @@ pub(crate) fn compile_codegen_unit(
127127 let mut attrs = attributes:: sanitize_attrs ( & cx, tcx, SanitizerFnAttrs :: default ( ) ) ;
128128 // When pointer authentication is enabled, ensure that the ptrauth-* attributes are
129129 // also attached to the entry wrapper.
130- if cx. sess ( ) . target . env == Env :: Pauthtest {
130+ if cx. sess ( ) . target . cfg_abi == CfgAbi :: Pauthtest {
131131 for & ptrauth_attr in pauth_fn_attrs ( ) {
132132 attrs. push ( llvm:: CreateAttrString ( cx. llcx , ptrauth_attr) ) ;
133133 }
@@ -148,14 +148,14 @@ pub(crate) fn compile_codegen_unit(
148148 cx. add_objc_module_flags ( ) ;
149149 }
150150
151- if cx. sess ( ) . target . env == Env :: Pauthtest {
151+ if cx. sess ( ) . target . cfg_abi == CfgAbi :: Pauthtest {
152152 // FIXME(jchlanda): In LLVM/Clang, there are also `aarch64-elf-pauthabi-platform`
153153 // and `aarch64-elf-pauthabi-version` module flags. These are emitted into the
154154 // PAuth core info section of the resulting ELF, which the linker uses to enforce
155155 // binary compatibility.
156156 //
157157 // We intentionally do not emit these flags now, since only a subset of features
158- // included in pauthtest ABI is currently supported. By default, the absence of
158+ // included in clang's pauthtest is currently supported. By default, the absence of
159159 // this info is treated as compatible with any binary.
160160 //
161161 // Please note, that this would cause compatibility issues, specifically runtime
0 commit comments