diff options
author | Tobias Kortkamp <tobik@FreeBSD.org> | 2020-08-05 14:46:18 +0000 |
---|---|---|
committer | Tobias Kortkamp <tobik@FreeBSD.org> | 2020-08-05 14:46:18 +0000 |
commit | 1c843dbb6a63e19f890026cc17d2af752e7cfd00 (patch) | |
tree | 750016d30d150173e550b9d8a907f495070655cf /lang/rust | |
parent | de0521e60820bf67881c0482b23182e485d75aaa (diff) | |
download | ports-1c843dbb6a63e19f890026cc17d2af752e7cfd00.tar.gz ports-1c843dbb6a63e19f890026cc17d2af752e7cfd00.zip |
lang/rust*: Bring back the llvm-config-wrapper patches after r543251
Apparently they are still needed:
http://gohan03.nyi.freebsd.org/data/head-amd64-default-baseline/p543836_s363720/logs/errors/rust-1.45.1.log
http://gohan03.nyi.freebsd.org/data/head-amd64-default-baseline/p543836_s363720/logs/errors/rust-nightly-1.47.0.20200724.log
http://gohan03.nyi.freebsd.org/data/head-amd64-default-baseline/p544005_s363784/logs/errors/rust-1.45.1.log
Reported by: antoine
Notes
Notes:
svn path=/head/; revision=544224
Diffstat (limited to 'lang/rust')
-rw-r--r-- | lang/rust/files/patch-src_bootstrap_native.rs | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/lang/rust/files/patch-src_bootstrap_native.rs b/lang/rust/files/patch-src_bootstrap_native.rs index c1b879d0a80b..f8a3072e989d 100644 --- a/lang/rust/files/patch-src_bootstrap_native.rs +++ b/lang/rust/files/patch-src_bootstrap_native.rs @@ -11,7 +11,7 @@ to *use* those LLVM files. src/bootstrap/native.rs | 5 +++++ 1 file changed, 5 insertions(+) ---- src/bootstrap/native.rs.orig 2020-07-26 16:11:04 UTC +--- src/bootstrap/native.rs.orig 2020-07-31 20:16:28 UTC +++ src/bootstrap/native.rs @@ -324,6 +324,11 @@ fn configure_cmake( // LLVM and LLD builds can produce a lot of those and hit CI limits on log size. @@ -25,3 +25,30 @@ to *use* those LLVM files. if builder.config.ninja { cfg.generator("Ninja"); } +@@ -480,25 +485,9 @@ impl Step for Lld { + let mut cfg = cmake::Config::new(builder.src.join("src/llvm-project/lld")); + configure_cmake(builder, target, &mut cfg, true); + +- // This is an awful, awful hack. Discovered when we migrated to using +- // clang-cl to compile LLVM/LLD it turns out that LLD, when built out of +- // tree, will execute `llvm-config --cmakedir` and then tell CMake about +- // that directory for later processing. Unfortunately if this path has +- // forward slashes in it (which it basically always does on Windows) +- // then CMake will hit a syntax error later on as... something isn't +- // escaped it seems? +- // +- // Instead of attempting to fix this problem in upstream CMake and/or +- // LLVM/LLD we just hack around it here. This thin wrapper will take the +- // output from llvm-config and replace all instances of `\` with `/` to +- // ensure we don't hit the same bugs with escaping. It means that you +- // can't build on a system where your paths require `\` on Windows, but +- // there's probably a lot of reasons you can't do that other than this. +- let llvm_config_shim = env::current_exe().unwrap().with_file_name("llvm-config-wrapper"); + cfg.out_dir(&out_dir) + .profile("Release") +- .env("LLVM_CONFIG_REAL", &llvm_config) +- .define("LLVM_CONFIG_PATH", llvm_config_shim) ++ .define("LLVM_CONFIG_PATH", &llvm_config) + .define("LLVM_INCLUDE_TESTS", "OFF"); + + // While we're using this horrible workaround to shim the execution of |