mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-21 11:23:03 +00:00
bootstrap: Expose LLVM_USE_LINKER cmake option to config.toml.
This commit is contained in:
parent
4f534ffbdb
commit
dc20c8cc25
@ -96,6 +96,10 @@
|
|||||||
# that your host compiler ships with libc++.
|
# that your host compiler ships with libc++.
|
||||||
#use-libcxx = true
|
#use-libcxx = true
|
||||||
|
|
||||||
|
# The value specified here will be passed as `-DLLVM_USE_LINKER` to CMake.
|
||||||
|
#use-linker = "lld"
|
||||||
|
|
||||||
|
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
# General build configuration options
|
# General build configuration options
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
|
@ -77,6 +77,7 @@ pub struct Config {
|
|||||||
pub llvm_experimental_targets: String,
|
pub llvm_experimental_targets: String,
|
||||||
pub llvm_link_jobs: Option<u32>,
|
pub llvm_link_jobs: Option<u32>,
|
||||||
pub llvm_version_suffix: Option<String>,
|
pub llvm_version_suffix: Option<String>,
|
||||||
|
pub llvm_use_linker: Option<String>,
|
||||||
|
|
||||||
pub lld_enabled: bool,
|
pub lld_enabled: bool,
|
||||||
pub lldb_enabled: bool,
|
pub lldb_enabled: bool,
|
||||||
@ -255,6 +256,7 @@ struct Llvm {
|
|||||||
version_suffix: Option<String>,
|
version_suffix: Option<String>,
|
||||||
clang_cl: Option<String>,
|
clang_cl: Option<String>,
|
||||||
use_libcxx: Option<bool>,
|
use_libcxx: Option<bool>,
|
||||||
|
use_linker: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Deserialize, Default, Clone)]
|
#[derive(Deserialize, Default, Clone)]
|
||||||
@ -517,6 +519,7 @@ impl Config {
|
|||||||
config.llvm_version_suffix = llvm.version_suffix.clone();
|
config.llvm_version_suffix = llvm.version_suffix.clone();
|
||||||
config.llvm_clang_cl = llvm.clang_cl.clone();
|
config.llvm_clang_cl = llvm.clang_cl.clone();
|
||||||
set(&mut config.llvm_use_libcxx, llvm.use_libcxx);
|
set(&mut config.llvm_use_libcxx, llvm.use_libcxx);
|
||||||
|
config.llvm_use_linker = llvm.use_linker.clone();
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Some(ref rust) = toml.rust {
|
if let Some(ref rust) = toml.rust {
|
||||||
|
@ -231,6 +231,10 @@ impl Step for Llvm {
|
|||||||
cfg.define("LLVM_VERSION_SUFFIX", suffix);
|
cfg.define("LLVM_VERSION_SUFFIX", suffix);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if let Some(ref linker) = builder.config.llvm_use_linker {
|
||||||
|
cfg.define("LLVM_USE_LINKER", linker);
|
||||||
|
}
|
||||||
|
|
||||||
if let Some(ref python) = builder.config.python {
|
if let Some(ref python) = builder.config.python {
|
||||||
cfg.define("PYTHON_EXECUTABLE", python);
|
cfg.define("PYTHON_EXECUTABLE", python);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user