@@ -1024,6 +1024,32 @@ impl OutputFilenames {
1024
1024
}
1025
1025
}
1026
1026
1027
+ bitflags:: bitflags! {
1028
+ /// Scopes used to determined if it need to apply to --remap-path-prefix
1029
+ pub struct RemapPathScopeComponents : u8 {
1030
+ /// Apply remappings to the expansion of std::file!() macro
1031
+ const MACRO = 1 << 0 ;
1032
+ /// Apply remappings to printed compiler diagnostics
1033
+ const DIAGNOSTICS = 1 << 1 ;
1034
+ /// Apply remappings to debug information only when they are written to
1035
+ /// compiled executables or libraries, but not when they are in split
1036
+ /// debuginfo files
1037
+ const UNSPLIT_DEBUGINFO = 1 << 2 ;
1038
+ /// Apply remappings to debug information only when they are written to
1039
+ /// split debug information files, but not in compiled executables or
1040
+ /// libraries
1041
+ const SPLIT_DEBUGINFO = 1 << 3 ;
1042
+ /// Apply remappings to the paths pointing to split debug information
1043
+ /// files. Does nothing when these files are not generated.
1044
+ const SPLIT_DEBUGINFO_PATH = 1 << 4 ;
1045
+
1046
+ /// An alias for macro,unsplit-debuginfo,split-debuginfo-path. This
1047
+ /// ensures all paths in compiled executables or libraries are remapped
1048
+ /// but not elsewhere.
1049
+ const OBJECT = Self :: MACRO . bits | Self :: UNSPLIT_DEBUGINFO . bits | Self :: SPLIT_DEBUGINFO_PATH . bits;
1050
+ }
1051
+ }
1052
+
1027
1053
pub fn host_triple ( ) -> & ' static str {
1028
1054
// Get the host triple out of the build environment. This ensures that our
1029
1055
// idea of the host triple is the same as for the set of libraries we've
@@ -3170,8 +3196,8 @@ pub(crate) mod dep_tracking {
3170
3196
BranchProtection , CFGuard , CFProtection , CrateType , DebugInfo , DebugInfoCompression ,
3171
3197
ErrorOutputType , InstrumentCoverage , InstrumentXRay , LdImpl , LinkerPluginLto ,
3172
3198
LocationDetail , LtoCli , OomStrategy , OptLevel , OutFileName , OutputType , OutputTypes ,
3173
- Passes , ResolveDocLinks , SourceFileHashAlgorithm , SplitDwarfKind , SwitchWithOptPath ,
3174
- SymbolManglingVersion , TraitSolver , TrimmedDefPaths ,
3199
+ Passes , RemapPathScopeComponents , ResolveDocLinks , SourceFileHashAlgorithm , SplitDwarfKind ,
3200
+ SwitchWithOptPath , SymbolManglingVersion , TraitSolver , TrimmedDefPaths ,
3175
3201
} ;
3176
3202
use crate :: lint;
3177
3203
use crate :: options:: WasiExecModel ;
@@ -3265,6 +3291,7 @@ pub(crate) mod dep_tracking {
3265
3291
StackProtector ,
3266
3292
SwitchWithOptPath ,
3267
3293
SymbolManglingVersion ,
3294
+ RemapPathScopeComponents ,
3268
3295
SourceFileHashAlgorithm ,
3269
3296
TrimmedDefPaths ,
3270
3297
Option <LdImpl >,
0 commit comments