aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar Brian Silverman <bsilver16384@gmail.com>2016-08-18 14:07:40 +0000
committerGravatar Philipp Wollermann <philwo@google.com>2016-08-18 17:25:27 +0000
commitf3d431def1459e46afa91f565339cdc8ccbbe902 (patch)
treeae07c19854d716b2f92caf0d422581a0d6ab8bd4 /tools
parent774553eea688338caae754c49fbfc66d9a3475b7 (diff)
Use -fno-canonical-system-headers when supported
This makes the same change to cc_configure.bzl made to the hard-coded CROSSTOOL in 763f1397155fc7c12e1f1071a1bc942f91b867c4 to fix #1642 -- Change-Id: Ia05788243d0128ea4921f12c437ef6cebd83a4ff Reviewed-on: https://bazel-review.git.corp.google.com/#/c/5450/ MOS_MIGRATED_REVID=130636065
Diffstat (limited to 'tools')
-rw-r--r--tools/cpp/cc_configure.bzl6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/cpp/cc_configure.bzl b/tools/cpp/cc_configure.bzl
index b7b057a33b..9a94b16424 100644
--- a/tools/cpp/cc_configure.bzl
+++ b/tools/cpp/cc_configure.bzl
@@ -278,7 +278,11 @@ def _crosstool_content(repository_ctx, cc, cpu_value, darwin):
_add_option_if_supported(repository_ctx, cc, "-Wno-free-nonheap-object") +
# Enable coloring even if there's no attached terminal. Bazel removes the
# escape sequences if --nocolor is specified.
- _add_option_if_supported(repository_ctx, cc, "-fcolor-diagnostics")) + [
+ _add_option_if_supported(repository_ctx, cc, "-fcolor-diagnostics") +
+ # If the compiler sometimes rewrites paths in the .d files without symlinks
+ # (ie when they're shorter), it confuses Bazel's logic for verifying all
+ # #included header files are listed as inputs to the action.
+ _add_option_if_supported(repository_ctx, cc, "-fno-canonical-system-headers")) + [
# Keep stack frames for debugging, even in opt mode.
"-fno-omit-frame-pointer",
],