diff options
| author | Pietro Albini <pietro.albini@ferrous-systems.com> | 2023-06-07 15:05:54 +0200 |
|---|---|---|
| committer | Pietro Albini <pietro.albini@ferrous-systems.com> | 2023-06-12 09:34:12 +0200 |
| commit | 9de3c29319a42bbfdf3c61f1bced9e2e79373452 (patch) | |
| tree | e36b3f5777c1d70a6de69777e151f1d4cd414bc9 /src/bootstrap/config.rs | |
| parent | 9ec370d40ceb86249b303c9d26f576229ad0b318 (diff) | |
add support for blessing panic=abort mir-opt tests
Diffstat (limited to 'src/bootstrap/config.rs')
| -rw-r--r-- | src/bootstrap/config.rs | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs index b521ad75d63..8ee63e561ba 100644 --- a/src/bootstrap/config.rs +++ b/src/bootstrap/config.rs @@ -429,6 +429,7 @@ impl std::str::FromStr for RustcLto { pub struct TargetSelection { pub triple: Interned<String>, file: Option<Interned<String>>, + synthetic: bool, } /// Newtype over `Vec<TargetSelection>` so we can implement custom parsing logic @@ -460,7 +461,15 @@ impl TargetSelection { let triple = INTERNER.intern_str(triple); let file = file.map(|f| INTERNER.intern_str(f)); - Self { triple, file } + Self { triple, file, synthetic: false } + } + + pub fn create_synthetic(triple: &str, file: &str) -> Self { + Self { + triple: INTERNER.intern_str(triple), + file: Some(INTERNER.intern_str(file)), + synthetic: true, + } } pub fn rustc_target_arg(&self) -> &str { @@ -478,6 +487,11 @@ impl TargetSelection { pub fn ends_with(&self, needle: &str) -> bool { self.triple.ends_with(needle) } + + // See src/bootstrap/synthetic_targets.rs + pub fn is_synthetic(&self) -> bool { + self.synthetic + } } impl fmt::Display for TargetSelection { |
