public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Georgy Yakovlev" <gyakovlev@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/rust/files/, dev-lang/rust/
Date: Sun, 26 May 2019 06:27:01 +0000 (UTC)	[thread overview]
Message-ID: <1558851932.c39dfea3a0cea8f515ddede3d171879ad0df9cf9.gyakovlev@gentoo> (raw)

commit:     c39dfea3a0cea8f515ddede3d171879ad0df9cf9
Author:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Sun May 26 06:25:06 2019 +0000
Commit:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Sun May 26 06:25:32 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c39dfea3

dev-lang/rust: fix building 1.35.0 with internal llvm

Closes: https://bugs.gentoo.org/686656
X-Upstream-Issue: https://github.com/rust-lang/rust/issues/61206
Package-Manager: Portage-2.3.66, Repoman-2.3.12
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>

 ...commits-triggering-multiple-llvm-rebuilds.patch | 117 +++++++++++++++++++++
 dev-lang/rust/rust-1.35.0.ebuild                   |   1 +
 2 files changed, 118 insertions(+)

diff --git a/dev-lang/rust/files/1.35.0-revert-commits-triggering-multiple-llvm-rebuilds.patch b/dev-lang/rust/files/1.35.0-revert-commits-triggering-multiple-llvm-rebuilds.patch
new file mode 100644
index 00000000000..1c6c8ca404d
--- /dev/null
+++ b/dev-lang/rust/files/1.35.0-revert-commits-triggering-multiple-llvm-rebuilds.patch
@@ -0,0 +1,117 @@
+From d6bd0a479ceaf6abdd696c3b955a56f66275c562 Mon Sep 17 00:00:00 2001
+From: Georgy Yakovlev <gyakovlev@gentoo.org>
+Date: Sat, 25 May 2019 22:21:16 -0700
+Subject: [PATCH] revert commits triggering multiple llvm rebuilds
+
+this reverts the following commits
+https://github.com/rust-lang/rust/commit/105692c3ad281c63bf0f75a26a66bb9cff5b4553
+https://github.com/rust-lang/rust/commit/975ba58f42b34ff07cd7c2bd73350daed2057186
+https://github.com/rust-lang/rust/commit/e1daa36ba7df88788c2684bbe5ff6eb37f1cda69
+---
+ src/bootstrap/llvm-rebuild-trigger |  4 +++
+ src/bootstrap/native.rs            | 46 +++++++++++++-----------------
+ 2 files changed, 24 insertions(+), 26 deletions(-)
+ create mode 100644 src/bootstrap/llvm-rebuild-trigger
+
+diff --git a/src/bootstrap/llvm-rebuild-trigger b/src/bootstrap/llvm-rebuild-trigger
+new file mode 100644
+index 0000000000..0f18c6a4ac
+--- /dev/null
++++ b/src/rustllvm/llvm-rebuild-trigger
+@@ -0,0 +1,4 @@
++# If this file is modified, then llvm will be (optionally) cleaned and then rebuilt.
++# The actual contents of this file do not matter, but to trigger a change on the
++# build bots then the contents should be changed so git updates the mtime.
++2019-03-18
+diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs
+index fde40b0d1b..3babbc9e10 100644
+--- a/src/bootstrap/native.rs
++++ b/src/bootstrap/native.rs
+@@ -67,40 +67,30 @@ impl Step for Llvm {
+             }
+         }
+ 
+-        let (llvm_info, root, out_dir, llvm_config_ret_dir) = if emscripten {
+-            let info = &builder.emscripten_llvm_info;
++        let rebuild_trigger = builder.src.join("src/rustllvm/llvm-rebuild-trigger");
++        let rebuild_trigger_contents = t!(fs::read_to_string(&rebuild_trigger));
++
++        let (out_dir, llvm_config_ret_dir) = if emscripten {
+             let dir = builder.emscripten_llvm_out(target);
+             let config_dir = dir.join("bin");
+-            (info, "src/llvm-emscripten", dir, config_dir)
++            (dir, config_dir)
+         } else {
+-            let info = &builder.in_tree_llvm_info;
+             let mut dir = builder.llvm_out(builder.config.build);
+             if !builder.config.build.contains("msvc") || builder.config.ninja {
+                 dir.push("build");
+             }
+-            (info, "src/llvm-project/llvm", builder.llvm_out(target), dir.join("bin"))
++            (builder.llvm_out(target), dir.join("bin"))
+         };
+-
+-        if !llvm_info.is_git() {
+-            println!(
+-                "git could not determine the LLVM submodule commit hash. \
+-                Assuming that an LLVM build is necessary.",
+-            );
+-        }
+-
++        let done_stamp = out_dir.join("llvm-finished-building");
+         let build_llvm_config = llvm_config_ret_dir
+             .join(exe("llvm-config", &*builder.config.build));
+-        let done_stamp = out_dir.join("llvm-finished-building");
+-
+-        if let Some(llvm_commit) = llvm_info.sha() {
+-            if done_stamp.exists() {
+-                let done_contents = t!(fs::read(&done_stamp));
++        if done_stamp.exists() {
++            let done_contents = t!(fs::read_to_string(&done_stamp));
+ 
+-                // If LLVM was already built previously and the submodule's commit didn't change
+-                // from the previous build, then no action is required.
+-                if done_contents == llvm_commit.as_bytes() {
+-                    return build_llvm_config
+-                }
++            // If LLVM was already built previously and contents of the rebuild-trigger file
++            // didn't change from the previous build, then no action is required.
++            if done_contents == rebuild_trigger_contents {
++                return build_llvm_config
+             }
+         }
+ 
+@@ -111,6 +101,7 @@ impl Step for Llvm {
+         t!(fs::create_dir_all(&out_dir));
+ 
+         // http://llvm.org/docs/CMake.html
++        let root = if self.emscripten { "src/llvm-emscripten" } else { "src/llvm-project/llvm" };
+         let mut cfg = cmake::Config::new(builder.src.join(root));
+ 
+         let profile = match (builder.config.llvm_optimize, builder.config.llvm_release_debuginfo) {
+@@ -251,6 +242,11 @@ impl Step for Llvm {
+                 channel::CFG_RELEASE_NUM,
+                 builder.config.channel,
+             );
++            let llvm_info = if self.emscripten {
++                &builder.emscripten_llvm_info
++            } else {
++                &builder.in_tree_llvm_info
++            };
+             if let Some(sha) = llvm_info.sha_short() {
+                 default_suffix.push_str("-");
+                 default_suffix.push_str(sha);
+@@ -283,9 +279,7 @@ impl Step for Llvm {
+ 
+         cfg.build();
+ 
+-        if let Some(llvm_commit) = llvm_info.sha() {
+-            t!(fs::write(&done_stamp, llvm_commit));
+-        }
++        t!(fs::write(&done_stamp, &rebuild_trigger_contents));
+ 
+         build_llvm_config
+     }
+-- 
+2.21.0
+

diff --git a/dev-lang/rust/rust-1.35.0.ebuild b/dev-lang/rust/rust-1.35.0.ebuild
index 801838bb704..b5725b81510 100644
--- a/dev-lang/rust/rust-1.35.0.ebuild
+++ b/dev-lang/rust/rust-1.35.0.ebuild
@@ -89,6 +89,7 @@ REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
 
 PATCHES=(
 	"${FILESDIR}"/0001-llvm-cmake-Add-additional-headers-only-if-they-exist.patch
+	"${FILESDIR}"/1.35.0-revert-commits-triggering-multiple-llvm-rebuilds.patch
 )
 
 S="${WORKDIR}/${MY_P}-src"


             reply	other threads:[~2019-05-26  6:27 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-26  6:27 Georgy Yakovlev [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-02-11  6:01 [gentoo-commits] repo/gentoo:master commit in: dev-lang/rust/files/, dev-lang/rust/ Sam James
2023-10-02  8:13 WANG Xuerui
2023-08-04 12:30 WANG Xuerui
2023-07-20 18:48 Ionen Wolkens
2023-02-09 20:36 Georgy Yakovlev
2022-11-13 19:14 Georgy Yakovlev
2022-10-20 18:19 Georgy Yakovlev
2022-10-13 17:41 Georgy Yakovlev
2022-09-23 20:06 Georgy Yakovlev
2022-09-16  1:46 Georgy Yakovlev
2022-09-15  3:15 Georgy Yakovlev
2021-12-06 22:42 Georgy Yakovlev
2021-08-09 19:03 Georgy Yakovlev
2021-06-18  9:16 Georgy Yakovlev
2021-06-18  7:46 Georgy Yakovlev
2021-05-02 16:45 Georgy Yakovlev
2021-04-18  1:24 Georgy Yakovlev
2021-04-05  4:27 Georgy Yakovlev
2020-11-24  0:41 Georgy Yakovlev
2020-10-28  1:42 Georgy Yakovlev
2020-06-05  8:53 Stefan Strogin
2020-04-10 11:28 Stefan Strogin
2020-03-28 19:08 Georgy Yakovlev
2019-09-26 22:06 Georgy Yakovlev
2019-06-19  0:35 Georgy Yakovlev
2019-04-24 16:31 Georgy Yakovlev
2019-04-14  8:03 Georgy Yakovlev
2019-03-07  4:40 Georgy Yakovlev
2019-01-26  3:50 Georgy Yakovlev
2018-10-18  9:05 Dirkjan Ochtman
2016-10-24  5:27 Doug Goldstein

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1558851932.c39dfea3a0cea8f515ddede3d171879ad0df9cf9.gyakovlev@gentoo \
    --to=gyakovlev@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox