@@ -1024,6 +1024,32 @@ impl OutputFilenames {
10241024 }
10251025}
10261026
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+
10271053pub fn host_triple ( ) -> & ' static str {
10281054 // Get the host triple out of the build environment. This ensures that our
10291055 // 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 {
31703196 BranchProtection , CFGuard , CFProtection , CrateType , DebugInfo , DebugInfoCompression ,
31713197 ErrorOutputType , InstrumentCoverage , InstrumentXRay , LdImpl , LinkerPluginLto ,
31723198 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 ,
31753201 } ;
31763202 use crate :: lint;
31773203 use crate :: options:: WasiExecModel ;
@@ -3265,6 +3291,7 @@ pub(crate) mod dep_tracking {
32653291 StackProtector ,
32663292 SwitchWithOptPath ,
32673293 SymbolManglingVersion ,
3294+ RemapPathScopeComponents ,
32683295 SourceFileHashAlgorithm ,
32693296 TrimmedDefPaths ,
32703297 Option <LdImpl >,
0 commit comments