diff options
author | 2016-12-15 20:09:15 +0000 | |
---|---|---|
committer | 2016-12-15 20:40:04 +0000 | |
commit | 2354dc06300e29321c770479b034d056dc87f367 (patch) | |
tree | 25207e14c639af0ad3c82d8647b650525841bf25 /tools | |
parent | 001380d01003e8a393c5eccbe1f8b88ac265284f (diff) |
pass -fno-canonical-headers only once
Both compiler_flags and unfiltered_cxx_flags contained
"-fno-canonical-headers". We should only need the unfiltered setting.
--
Change-Id: I09d99f2bad10774e72745e437ae4900d22b8a723
Reviewed-on: https://cr.bazel.build/7730
PiperOrigin-RevId: 142171553
MOS_MIGRATED_REVID=142171553
Diffstat (limited to 'tools')
-rw-r--r-- | tools/cpp/cc_configure.bzl | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tools/cpp/cc_configure.bzl b/tools/cpp/cc_configure.bzl index eb34427f17..bd8cf2deae 100644 --- a/tools/cpp/cc_configure.bzl +++ b/tools/cpp/cc_configure.bzl @@ -241,6 +241,9 @@ def _crosstool_content(repository_ctx, cc, cpu_value, darwin): "cxx_builtin_include_directory": _get_cxx_inc_directories(repository_ctx, cc), "objcopy_embed_flag": ["-I", "binary"], "unfiltered_cxx_flag": + # 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") + [ # Make C++ compilation deterministic. Use linkstamping instead of these # compiler symbols. @@ -271,11 +274,7 @@ 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") + - # 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")) + [ + _add_option_if_supported(repository_ctx, cc, "-fcolor-diagnostics")) + [ # Keep stack frames for debugging, even in opt mode. "-fno-omit-frame-pointer", ], |