@@ -996,6 +996,32 @@ impl OutputFilenames {
996996 }
997997}
998998
999+ bitflags:: bitflags! {
1000+ /// Scopes used to determined if it need to apply to --remap-path-prefix
1001+ pub struct RemapPathScopeComponents : u8 {
1002+ /// Apply remappings to the expansion of std::file!() macro
1003+ const MACRO = 1 << 0 ;
1004+ /// Apply remappings to printed compiler diagnostics
1005+ const DIAGNOSTICS = 1 << 1 ;
1006+ /// Apply remappings to debug information only when they are written to
1007+ /// compiled executables or libraries, but not when they are in split
1008+ /// debuginfo files
1009+ const UNSPLIT_DEBUGINFO = 1 << 2 ;
1010+ /// Apply remappings to debug information only when they are written to
1011+ /// split debug information files, but not in compiled executables or
1012+ /// libraries
1013+ const SPLIT_DEBUGINFO = 1 << 3 ;
1014+ /// Apply remappings to the paths pointing to split debug information
1015+ /// files. Does nothing when these files are not generated.
1016+ const SPLIT_DEBUGINFO_PATH = 1 << 4 ;
1017+
1018+ /// An alias for macro,unsplit-debuginfo,split-debuginfo-path. This
1019+ /// ensures all paths in compiled executables or libraries are remapped
1020+ /// but not elsewhere.
1021+ const OBJECT = Self :: MACRO . bits | Self :: UNSPLIT_DEBUGINFO . bits | Self :: SPLIT_DEBUGINFO_PATH . bits;
1022+ }
1023+ }
1024+
9991025pub fn host_triple ( ) -> & ' static str {
10001026 // Get the host triple out of the build environment. This ensures that our
10011027 // idea of the host triple is the same as for the set of libraries we've
@@ -3121,9 +3147,9 @@ pub(crate) mod dep_tracking {
31213147 use super :: {
31223148 BranchProtection , CFGuard , CFProtection , CrateType , DebugInfo , ErrorOutputType ,
31233149 InstrumentCoverage , InstrumentXRay , LdImpl , LinkerPluginLto , LocationDetail , LtoCli ,
3124- OomStrategy , OptLevel , OutFileName , OutputType , OutputTypes , Passes , ResolveDocLinks ,
3125- SourceFileHashAlgorithm , SplitDwarfKind , SwitchWithOptPath , SymbolManglingVersion ,
3126- TraitSolver , TrimmedDefPaths ,
3150+ OomStrategy , OptLevel , OutFileName , OutputType , OutputTypes , Passes ,
3151+ RemapPathScopeComponents , ResolveDocLinks , SourceFileHashAlgorithm , SplitDwarfKind ,
3152+ SwitchWithOptPath , SymbolManglingVersion , TraitSolver , TrimmedDefPaths ,
31273153 } ;
31283154 use crate :: lint;
31293155 use crate :: options:: WasiExecModel ;
@@ -3216,6 +3242,7 @@ pub(crate) mod dep_tracking {
32163242 StackProtector ,
32173243 SwitchWithOptPath ,
32183244 SymbolManglingVersion ,
3245+ RemapPathScopeComponents ,
32193246 SourceFileHashAlgorithm ,
32203247 TrimmedDefPaths ,
32213248 Option <LdImpl >,
0 commit comments