commit:     09f30deb3b04e3aa425800858f29fa02fa33e06e
Author:     Jason Zaman <perfinion <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 15 03:23:29 2021 +0000
Commit:     Jason Zaman <perfinion <AT> gentoo <DOT> org>
CommitDate: Mon Nov 15 17:52:11 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=09f30deb

bazel.eclass: Fix distinct_host_configuration

The cross-compiler logic was inverted.
Almost halves the build time for TensorFlow.

Signed-off-by: Jason Zaman <perfinion <AT> gentoo.org>

 eclass/bazel.eclass | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/eclass/bazel.eclass b/eclass/bazel.eclass
index ac7ca241519c..9e09255fd66f 100644
--- a/eclass/bazel.eclass
+++ b/eclass/bazel.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: bazel.eclass
@@ -117,6 +117,8 @@ bazel_setup_bazelrc() {
                EOF
 
        if tc-is-cross-compiler; then
+               echo "build --distinct_host_configuration" >> "${T}/bazelrc" || 
die
+       else
                echo "build --nodistinct_host_configuration" >> "${T}/bazelrc" 
|| die
        fi
 }

Reply via email to