@@ -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
@@ -3115,9 +3141,9 @@ pub(crate) mod dep_tracking {
31153141 use super :: {
31163142 BranchProtection , CFGuard , CFProtection , CrateType , DebugInfo , ErrorOutputType ,
31173143 InstrumentCoverage , InstrumentXRay , LdImpl , LinkerPluginLto , LocationDetail , LtoCli ,
3118- OomStrategy , OptLevel , OutFileName , OutputType , OutputTypes , Passes , ResolveDocLinks ,
3119- SourceFileHashAlgorithm , SplitDwarfKind , SwitchWithOptPath , SymbolManglingVersion ,
3120- TraitSolver , TrimmedDefPaths ,
3144+ OomStrategy , OptLevel , OutFileName , OutputType , OutputTypes , Passes ,
3145+ RemapPathScopeComponents , ResolveDocLinks , SourceFileHashAlgorithm , SplitDwarfKind ,
3146+ SwitchWithOptPath , SymbolManglingVersion , TraitSolver , TrimmedDefPaths ,
31213147 } ;
31223148 use crate :: lint;
31233149 use crate :: options:: WasiExecModel ;
@@ -3210,6 +3236,7 @@ pub(crate) mod dep_tracking {
32103236 StackProtector ,
32113237 SwitchWithOptPath ,
32123238 SymbolManglingVersion ,
3239+ RemapPathScopeComponents ,
32133240 SourceFileHashAlgorithm ,
32143241 TrimmedDefPaths ,
32153242 Option <LdImpl >,
0 commit comments