diff options
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", ], |