bootstrap: Allow for building LLVM with ThinLTO.

This commit is contained in:
Michael Woerister 2018-08-10 12:23:48 +02:00
parent 34a654caa3
commit 45497e32cc
6 changed files with 64 additions and 4 deletions

View file

@ -153,6 +153,11 @@ impl Step for Llvm {
.define("LLVM_TARGET_ARCH", target.split('-').next().unwrap())
.define("LLVM_DEFAULT_TARGET_TRIPLE", target);
if builder.config.llvm_thin_lto {
cfg.define("LLVM_ENABLE_LTO", "Thin")
.define("LLVM_ENABLE_LLD", "ON");
}
// By default, LLVM will automatically find OCaml and, if it finds it,
// install the LLVM bindings in LLVM_OCAML_INSTALL_PATH, which defaults
// to /usr/bin/ocaml.