diff options
| author | Noratrieb <48135649+Noratrieb@users.noreply.github.com> | 2024-10-17 19:02:32 +0200 | 
|---|---|---|
| committer | Noratrieb <48135649+Noratrieb@users.noreply.github.com> | 2024-11-02 21:29:59 +0100 | 
| commit | a26450cf81d67d68d3c6157579f8d968349129e7 (patch) | |
| tree | 56d4a11c0cd7c096d42039953ec69d282cf4fc53 /compiler/rustc_session/src/config.rs | |
| parent | 77d0b4ddfb92108a4c7d97c8f5052aa6abc787fa (diff) | |
| download | rust-a26450cf81d67d68d3c6157579f8d968349129e7.tar.gz rust-a26450cf81d67d68d3c6157579f8d968349129e7.zip | |
Rename target triple to target tuple in many places in the compiler
This changes the naming to the new naming, used by `--print target-tuple`. It does not change all locations, but many.
Diffstat (limited to 'compiler/rustc_session/src/config.rs')
| -rw-r--r-- | compiler/rustc_session/src/config.rs | 20 | 
1 files changed, 10 insertions, 10 deletions
| diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs index 5ee3b4015eb..3ac6e7423ac 100644 --- a/compiler/rustc_session/src/config.rs +++ b/compiler/rustc_session/src/config.rs @@ -26,7 +26,7 @@ use rustc_span::{ FileName, FileNameDisplayPreference, RealFileName, SourceFileHashAlgorithm, Symbol, sym, }; use rustc_target::spec::{ - FramePointer, LinkSelfContainedComponents, LinkerFeatures, SplitDebuginfo, Target, TargetTriple, + FramePointer, LinkSelfContainedComponents, LinkerFeatures, SplitDebuginfo, Target, TargetTuple, }; use tracing::debug; @@ -1116,7 +1116,7 @@ bitflags::bitflags! { } } -pub fn host_triple() -> &'static str { +pub fn host_tuple() -> &'static str { // Get the host triple out of the build environment. This ensures that our // idea of the host triple is the same as for the set of libraries we've // actually built. We can't just take LLVM's host triple because they @@ -1158,7 +1158,7 @@ impl Default for Options { output_types: OutputTypes(BTreeMap::new()), search_paths: vec![], maybe_sysroot: None, - target_triple: TargetTriple::from_triple(host_triple()), + target_triple: TargetTuple::from_tuple(host_tuple()), test: false, incremental: None, untracked_state_hash: Default::default(), @@ -1354,7 +1354,7 @@ pub fn build_target_config(early_dcx: &EarlyDiagCtxt, opts: &Options, sysroot: & // rust-lang/compiler-team#695. Warn unconditionally on usage to // raise awareness of the renaming. This code will be deleted in // October 2024. - if opts.target_triple.triple() == "wasm32-wasi" { + if opts.target_triple.tuple() == "wasm32-wasi" { early_dcx.early_warn( "the `wasm32-wasi` target is being renamed to \ `wasm32-wasip1` and the `wasm32-wasi` target will be \ @@ -2030,16 +2030,16 @@ fn collect_print_requests( prints } -pub fn parse_target_triple(early_dcx: &EarlyDiagCtxt, matches: &getopts::Matches) -> TargetTriple { +pub fn parse_target_triple(early_dcx: &EarlyDiagCtxt, matches: &getopts::Matches) -> TargetTuple { match matches.opt_str("target") { Some(target) if target.ends_with(".json") => { let path = Path::new(&target); - TargetTriple::from_path(path).unwrap_or_else(|_| { + TargetTuple::from_path(path).unwrap_or_else(|_| { early_dcx.early_fatal(format!("target file {path:?} does not exist")) }) } - Some(target) => TargetTriple::TargetTriple(target), - _ => TargetTriple::from_triple(host_triple()), + Some(target) => TargetTuple::TargetTuple(target), + _ => TargetTuple::from_tuple(host_tuple()), } } @@ -3005,7 +3005,7 @@ pub(crate) mod dep_tracking { use rustc_span::edition::Edition; use rustc_target::spec::{ CodeModel, FramePointer, MergeFunctions, OnBrokenPipe, PanicStrategy, RelocModel, - RelroLevel, SanitizerSet, SplitDebuginfo, StackProtector, SymbolVisibility, TargetTriple, + RelroLevel, SanitizerSet, SplitDebuginfo, StackProtector, SymbolVisibility, TargetTuple, TlsModel, WasmCAbi, }; @@ -3090,7 +3090,7 @@ pub(crate) mod dep_tracking { SanitizerSet, CFGuard, CFProtection, - TargetTriple, + TargetTuple, Edition, LinkerPluginLto, ResolveDocLinks, | 
