diff options
| author | Ralf Jung <post@ralfj.de> | 2025-09-23 09:28:24 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2025-09-23 09:28:24 +0200 |
| commit | 0cd72a2f8d90672d0c7ce38a4e0d6ac3975aafbb (patch) | |
| tree | 406fd3b8a96508cae5b1ac33ccc57ca641f4cc85 /compiler/rustc_codegen_llvm/src/lib.rs | |
| parent | 3c8d8da693eb5d63099eef5cf4a73106a3a2ba25 (diff) | |
| parent | f6092f224d2b1774b31033f12d0bee626943b02f (diff) | |
| download | rust-0cd72a2f8d90672d0c7ce38a4e0d6ac3975aafbb.tar.gz rust-0cd72a2f8d90672d0c7ce38a4e0d6ac3975aafbb.zip | |
Merge ref 'f6092f224d2b' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: f6092f224d2b1774b31033f12d0bee626943b02f Filtered ref: f843cd4f29bdcd8d474dbb9e5e4365eb7f263ec6 This merge was created using https://github.com/rust-lang/josh-sync.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/lib.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/lib.rs | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/compiler/rustc_codegen_llvm/src/lib.rs b/compiler/rustc_codegen_llvm/src/lib.rs index 6fb23d09843..13bdb7cb1a2 100644 --- a/compiler/rustc_codegen_llvm/src/lib.rs +++ b/compiler/rustc_codegen_llvm/src/lib.rs @@ -45,6 +45,7 @@ use rustc_middle::util::Providers; use rustc_session::Session; use rustc_session::config::{OptLevel, OutputFilenames, PrintKind, PrintRequest}; use rustc_span::Symbol; +use rustc_target::spec::{RelocModel, TlsModel}; mod abi; mod allocator; @@ -244,16 +245,7 @@ impl CodegenBackend for LlvmCodegenBackend { match req.kind { PrintKind::RelocationModels => { writeln!(out, "Available relocation models:").unwrap(); - for name in &[ - "static", - "pic", - "pie", - "dynamic-no-pic", - "ropi", - "rwpi", - "ropi-rwpi", - "default", - ] { + for name in RelocModel::ALL.iter().map(RelocModel::desc).chain(["default"]) { writeln!(out, " {name}").unwrap(); } writeln!(out).unwrap(); @@ -267,9 +259,7 @@ impl CodegenBackend for LlvmCodegenBackend { } PrintKind::TlsModels => { writeln!(out, "Available TLS models:").unwrap(); - for name in - &["global-dynamic", "local-dynamic", "initial-exec", "local-exec", "emulated"] - { + for name in TlsModel::ALL.iter().map(TlsModel::desc) { writeln!(out, " {name}").unwrap(); } writeln!(out).unwrap(); |
