diff options
| author | Yuki Okushi <jtitor@2k36.org> | 2021-10-21 14:11:07 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-21 14:11:07 +0900 |
| commit | 632f06d8eb586e9386723fa54a71c1dd19605a11 (patch) | |
| tree | 6a84848f50cc0290388fdbf21cb3825d3bf73dfc /src | |
| parent | a980587421aa25ee382acc9dc577430a77327edd (diff) | |
| parent | f2a234e63c6f5db70a363507bf940dbc51d4efda (diff) | |
| download | rust-632f06d8eb586e9386723fa54a71c1dd19605a11.tar.gz rust-632f06d8eb586e9386723fa54a71c1dd19605a11.zip | |
Rollup merge of #90031 - durin42:allow-llvm-tests, r=Mark-Simulacrum
config: add the option to enable LLVM tests I'm working on some LLVM patches in concert with a Rust patch, and it's helping me quite a bit to have this as an option. It doesn't seem that hard, so I figured I'd formalize it in x.py and send it upstream.
Diffstat (limited to 'src')
| -rw-r--r-- | src/bootstrap/config.rs | 5 | ||||
| -rw-r--r-- | src/bootstrap/native.rs | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs index 9a48b768cb3..8d03aade341 100644 --- a/src/bootstrap/config.rs +++ b/src/bootstrap/config.rs @@ -90,6 +90,7 @@ pub struct Config { // llvm codegen options pub llvm_skip_rebuild: bool, pub llvm_assertions: bool, + pub llvm_tests: bool, pub llvm_plugins: bool, pub llvm_optimize: bool, pub llvm_thin_lto: bool, @@ -422,6 +423,7 @@ struct Llvm { thin_lto: Option<bool>, release_debuginfo: Option<bool>, assertions: Option<bool>, + tests: Option<bool>, plugins: Option<bool>, ccache: Option<StringOrBool>, version_check: Option<bool>, @@ -715,6 +717,7 @@ impl Config { // Store off these values as options because if they're not provided // we'll infer default values for them later let mut llvm_assertions = None; + let mut llvm_tests = None; let mut llvm_plugins = None; let mut debug = None; let mut debug_assertions = None; @@ -740,6 +743,7 @@ impl Config { } set(&mut config.ninja_in_file, llvm.ninja); llvm_assertions = llvm.assertions; + llvm_tests = llvm.tests; llvm_plugins = llvm.plugins; llvm_skip_rebuild = llvm_skip_rebuild.or(llvm.skip_rebuild); set(&mut config.llvm_optimize, llvm.optimize); @@ -991,6 +995,7 @@ impl Config { config.llvm_skip_rebuild = llvm_skip_rebuild.unwrap_or(false); config.llvm_assertions = llvm_assertions.unwrap_or(false); + config.llvm_tests = llvm_tests.unwrap_or(false); config.llvm_plugins = llvm_plugins.unwrap_or(false); config.rust_optimize = optimize.unwrap_or(true); diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs index 27c9bb2504f..6bfaeffa807 100644 --- a/src/bootstrap/native.rs +++ b/src/bootstrap/native.rs @@ -170,6 +170,7 @@ impl Step for Llvm { let assertions = if builder.config.llvm_assertions { "ON" } else { "OFF" }; let plugins = if builder.config.llvm_plugins { "ON" } else { "OFF" }; + let enable_tests = if builder.config.llvm_tests { "ON" } else { "OFF" }; cfg.out_dir(&out_dir) .profile(profile) @@ -180,7 +181,7 @@ impl Step for Llvm { .define("LLVM_INCLUDE_EXAMPLES", "OFF") .define("LLVM_INCLUDE_DOCS", "OFF") .define("LLVM_INCLUDE_BENCHMARKS", "OFF") - .define("LLVM_INCLUDE_TESTS", "OFF") + .define("LLVM_INCLUDE_TESTS", enable_tests) .define("LLVM_ENABLE_TERMINFO", "OFF") .define("LLVM_ENABLE_LIBEDIT", "OFF") .define("LLVM_ENABLE_BINDINGS", "OFF") |
