From owner-svn-ports-all@freebsd.org Wed Aug 5 14:46:19 2020 Return-Path: Delivered-To: svn-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 64CB4378B4C; Wed, 5 Aug 2020 14:46:19 +0000 (UTC) (envelope-from tobik@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BMDvv23nlz3RSY; Wed, 5 Aug 2020 14:46:19 +0000 (UTC) (envelope-from tobik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 25FD917A42; Wed, 5 Aug 2020 14:46:19 +0000 (UTC) (envelope-from tobik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 075EkJiL008318; Wed, 5 Aug 2020 14:46:19 GMT (envelope-from tobik@FreeBSD.org) Received: (from tobik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 075EkIn0008317; Wed, 5 Aug 2020 14:46:18 GMT (envelope-from tobik@FreeBSD.org) Message-Id: <202008051446.075EkIn0008317@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tobik set sender to tobik@FreeBSD.org using -f From: Tobias Kortkamp Date: Wed, 5 Aug 2020 14:46:18 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r544224 - in head/lang: rust-nightly/files rust/files X-SVN-Group: ports-head X-SVN-Commit-Author: tobik X-SVN-Commit-Paths: in head/lang: rust-nightly/files rust/files X-SVN-Commit-Revision: 544224 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Aug 2020 14:46:19 -0000 Author: tobik Date: Wed Aug 5 14:46:18 2020 New Revision: 544224 URL: https://svnweb.freebsd.org/changeset/ports/544224 Log: 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 Added: head/lang/rust-nightly/files/patch-src_bootstrap_native.rs - copied unchanged from r543250, head/lang/rust-nightly/files/patch-src_bootstrap_native.rs Modified: head/lang/rust/files/patch-src_bootstrap_native.rs Copied: head/lang/rust-nightly/files/patch-src_bootstrap_native.rs (from r543250, head/lang/rust-nightly/files/patch-src_bootstrap_native.rs) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lang/rust-nightly/files/patch-src_bootstrap_native.rs Wed Aug 5 14:46:18 2020 (r544224, copy of r543250, head/lang/rust-nightly/files/patch-src_bootstrap_native.rs) @@ -0,0 +1,35 @@ +There seems to be some kind of race when using llvm-config-wrapper +for building rust-lld. Attempt to improve reliability of the build +by not using it. llvm-config-wrapper is a hack in the first place +that is only really needed on Windows. + +--- src/bootstrap/native.rs.orig 2020-07-17 17:26:27 UTC ++++ src/bootstrap/native.rs +@@ -542,26 +542,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 Modified: head/lang/rust/files/patch-src_bootstrap_native.rs ============================================================================== --- head/lang/rust/files/patch-src_bootstrap_native.rs Wed Aug 5 14:42:27 2020 (r544223) +++ head/lang/rust/files/patch-src_bootstrap_native.rs Wed Aug 5 14:46:18 2020 (r544224) @@ -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