diff options
| author | Dylan DPC <dylan.dpc@gmail.com> | 2020-04-26 13:42:29 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-26 13:42:29 +0200 |
| commit | 96c1bb571abd77fcb706d7cdb4a0823a471767c2 (patch) | |
| tree | 12440be847fa3007e0910cc30df384a75fb34293 /src/librustc_interface | |
| parent | ec1f28f9614292c36b371d3758afffdd52cb9786 (diff) | |
| parent | 45fbe8f21c959bfe52b3b94b1ad775e9fbab529e (diff) | |
Rollup merge of #71490 - petrochenkov:passcheck2, r=davidtwco
Cleanup and document `-C relocation-model` As the title says, this is mostly a refactoring and documentation. One potentially observable change here is that `-C relocation-model=default` now takes the default from the Rust target, rather than from the underlying LLVM target. In other words, `-C relocation-model=default` is now equivalent to not specifying the relocation model on command line at all. Apparently no one used that option because it has other bugs as well, e.g. PIC `default` wasn't treated as PIC in some places.
Diffstat (limited to 'src/librustc_interface')
| -rw-r--r-- | src/librustc_interface/tests.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc_interface/tests.rs b/src/librustc_interface/tests.rs index 211850486c0..f0e7581b760 100644 --- a/src/librustc_interface/tests.rs +++ b/src/librustc_interface/tests.rs @@ -14,7 +14,7 @@ use rustc_session::{build_session, Session}; use rustc_span::edition::{Edition, DEFAULT_EDITION}; use rustc_span::symbol::sym; use rustc_span::SourceFileHashAlgorithm; -use rustc_target::spec::{LinkerFlavor, MergeFunctions, PanicStrategy, RelroLevel}; +use rustc_target::spec::{LinkerFlavor, MergeFunctions, PanicStrategy, RelocModel, RelroLevel}; use std::collections::{BTreeMap, BTreeSet}; use std::iter::FromIterator; use std::path::PathBuf; @@ -430,7 +430,7 @@ fn test_codegen_options_tracking_hash() { tracked!(prefer_dynamic, true); tracked!(profile_generate, SwitchWithOptPath::Enabled(None)); tracked!(profile_use, Some(PathBuf::from("abc"))); - tracked!(relocation_model, Some(String::from("relocation model"))); + tracked!(relocation_model, Some(RelocModel::Pic)); tracked!(soft_float, true); tracked!(target_cpu, Some(String::from("abc"))); tracked!(target_feature, String::from("all the features, all of them")); |
