]> git.lizzy.rs Git - rust.git/commitdiff
Disable Go and OCaml bindings when building LLVM
authorTomasz Miąsko <tomasz.miasko@gmail.com>
Tue, 8 Oct 2019 00:00:00 +0000 (00:00 +0000)
committerTomasz Miąsko <tomasz.miasko@gmail.com>
Tue, 8 Oct 2019 10:20:23 +0000 (12:20 +0200)
Instead of instaling OCaml bindings in a location where installation
will not fail, don't build them in the first place.

src/bootstrap/native.rs

index 7bf9ea2688f4c5a872d3f6f0b3f1ac645a9a7811..fb308bc35ebc5e8519bb1a2b487b213f071f03e0 100644 (file)
@@ -157,6 +157,7 @@ fn run(self, builder: &Builder<'_>) -> PathBuf {
            .define("WITH_POLLY", "OFF")
            .define("LLVM_ENABLE_TERMINFO", "OFF")
            .define("LLVM_ENABLE_LIBEDIT", "OFF")
+           .define("LLVM_ENABLE_BINDINGS", "OFF")
            .define("LLVM_ENABLE_Z3_SOLVER", "OFF")
            .define("LLVM_PARALLEL_COMPILE_JOBS", builder.jobs().to_string())
            .define("LLVM_TARGET_ARCH", target.split('-').next().unwrap())
@@ -169,15 +170,6 @@ fn run(self, builder: &Builder<'_>) -> PathBuf {
             }
         }
 
-        // 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.
-        // This causes problem for non-root builds of Rust. Side-step the issue
-        // by setting LLVM_OCAML_INSTALL_PATH to a relative path, so it installs
-        // in the prefix.
-        cfg.define("LLVM_OCAML_INSTALL_PATH",
-            env::var_os("LLVM_OCAML_INSTALL_PATH").unwrap_or_else(|| "usr/lib/ocaml".into()));
-
         let want_lldb = builder.config.lldb_enabled && !self.emscripten;
 
         // This setting makes the LLVM tools link to the dynamic LLVM library,