@@ -1014,6 +1014,32 @@ impl OutputFilenames {
1014
1014
}
1015
1015
}
1016
1016
1017
+ bitflags:: bitflags! {
1018
+ /// Scopes used to determined if it need to apply to --remap-path-prefix
1019
+ pub struct RemapPathScopeComponents : u8 {
1020
+ /// Apply remappings to the expansion of std::file!() macro
1021
+ const MACRO = 1 << 0 ;
1022
+ /// Apply remappings to printed compiler diagnostics
1023
+ const DIAGNOSTICS = 1 << 1 ;
1024
+ /// Apply remappings to debug information only when they are written to
1025
+ /// compiled executables or libraries, but not when they are in split
1026
+ /// debuginfo files
1027
+ const UNSPLIT_DEBUGINFO = 1 << 2 ;
1028
+ /// Apply remappings to debug information only when they are written to
1029
+ /// split debug information files, but not in compiled executables or
1030
+ /// libraries
1031
+ const SPLIT_DEBUGINFO = 1 << 3 ;
1032
+ /// Apply remappings to the paths pointing to split debug information
1033
+ /// files. Does nothing when these files are not generated.
1034
+ const SPLIT_DEBUGINFO_PATH = 1 << 4 ;
1035
+
1036
+ /// An alias for macro,unsplit-debuginfo,split-debuginfo-path. This
1037
+ /// ensures all paths in compiled executables or libraries are remapped
1038
+ /// but not elsewhere.
1039
+ const OBJECT = Self :: MACRO . bits | Self :: UNSPLIT_DEBUGINFO . bits | Self :: SPLIT_DEBUGINFO_PATH . bits;
1040
+ }
1041
+ }
1042
+
1017
1043
pub fn host_triple ( ) -> & ' static str {
1018
1044
// Get the host triple out of the build environment. This ensures that our
1019
1045
// idea of the host triple is the same as for the set of libraries we've
@@ -3145,8 +3171,8 @@ pub(crate) mod dep_tracking {
3145
3171
BranchProtection , CFGuard , CFProtection , CrateType , DebugInfo , DebugInfoCompression ,
3146
3172
ErrorOutputType , InstrumentCoverage , InstrumentXRay , LdImpl , LinkerPluginLto ,
3147
3173
LocationDetail , LtoCli , OomStrategy , OptLevel , OutFileName , OutputType , OutputTypes ,
3148
- Passes , ResolveDocLinks , SourceFileHashAlgorithm , SplitDwarfKind , SwitchWithOptPath ,
3149
- SymbolManglingVersion , TraitSolver , TrimmedDefPaths ,
3174
+ Passes , RemapPathScopeComponents , ResolveDocLinks , SourceFileHashAlgorithm , SplitDwarfKind ,
3175
+ SwitchWithOptPath , SymbolManglingVersion , TraitSolver , TrimmedDefPaths ,
3150
3176
} ;
3151
3177
use crate :: lint;
3152
3178
use crate :: options:: WasiExecModel ;
@@ -3240,6 +3266,7 @@ pub(crate) mod dep_tracking {
3240
3266
StackProtector ,
3241
3267
SwitchWithOptPath ,
3242
3268
SymbolManglingVersion ,
3269
+ RemapPathScopeComponents ,
3243
3270
SourceFileHashAlgorithm ,
3244
3271
TrimmedDefPaths ,
3245
3272
Option <LdImpl >,
0 commit comments