Skip to content

Commit

Permalink
bazel.eclass: Fix distinct_host_configuration
Browse files Browse the repository at this point in the history
The cross-compiler logic was inverted.
Almost halves the build time for TensorFlow.

Signed-off-by: Jason Zaman <[email protected]>
  • Loading branch information
perfinion committed Nov 15, 2021
1 parent 35734d4 commit 09f30de
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion eclass/bazel.eclass
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit 09f30de

Please sign in to comment.