diff options
Diffstat (limited to 'compiler/rustc_llvm')
| -rw-r--r-- | compiler/rustc_llvm/Cargo.toml | 4 | ||||
| -rw-r--r-- | compiler/rustc_llvm/build.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp | 2 |
3 files changed, 9 insertions, 1 deletions
diff --git a/compiler/rustc_llvm/Cargo.toml b/compiler/rustc_llvm/Cargo.toml index 061562b2ec5..39de4783238 100644 --- a/compiler/rustc_llvm/Cargo.toml +++ b/compiler/rustc_llvm/Cargo.toml @@ -14,3 +14,7 @@ libc = "0.2.73" # pinned `cc` in `rustc_codegen_ssa` if you update `cc` here. cc = "=1.2.16" # tidy-alphabetical-end + +[features] +# Used by ./x.py check --compile-time-deps to skip building C++ code +check_only = [] diff --git a/compiler/rustc_llvm/build.rs b/compiler/rustc_llvm/build.rs index 9a6549379d3..069b684ad09 100644 --- a/compiler/rustc_llvm/build.rs +++ b/compiler/rustc_llvm/build.rs @@ -106,6 +106,10 @@ fn output(cmd: &mut Command) -> String { } fn main() { + if cfg!(feature = "check_only") { + return; + } + for component in REQUIRED_COMPONENTS.iter().chain(OPTIONAL_COMPONENTS.iter()) { println!("cargo:rustc-check-cfg=cfg(llvm_component,values(\"{component}\"))"); } diff --git a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp index d4a05fbbbc5..cc33764e485 100644 --- a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp @@ -1275,7 +1275,7 @@ extern "C" void LLVMRustSetModuleCodeModel(LLVMModuleRef M, // // Otherwise I'll apologize in advance, it probably requires a relatively // significant investment on your part to "truly understand" what's going on -// here. Not saying I do myself, but it took me awhile staring at LLVM's source +// here. Not saying I do myself, but it took me a while staring at LLVM's source // and various online resources about ThinLTO to make heads or tails of all // this. |
