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