diff options
author | 2017-09-06 13:34:00 +0200 | |
---|---|---|
committer | 2017-09-06 13:38:43 +0200 | |
commit | 8328dc9e3b0d473756ec94508744afefe4d8eaf2 (patch) | |
tree | 79a4fda3725b2f6c101df5d5778a3b22f9885b47 /tools/cpp/CROSSTOOL | |
parent | 3bcb9f60a3c605102c12556fc10c239aaf64266a (diff) |
Fix windows crosstools after https://github.com/bazelbuild/bazel/commit/268c0bcbf79f9f3f72d95fa51af0f1b18c5ce29e
Fixes #3693
RELNOTES: None.
PiperOrigin-RevId: 167704700
Diffstat (limited to 'tools/cpp/CROSSTOOL')
-rw-r--r-- | tools/cpp/CROSSTOOL | 141 |
1 files changed, 92 insertions, 49 deletions
diff --git a/tools/cpp/CROSSTOOL b/tools/cpp/CROSSTOOL index 1219054f52..b9b78f5c0b 100644 --- a/tools/cpp/CROSSTOOL +++ b/tools/cpp/CROSSTOOL @@ -668,49 +668,6 @@ toolchain { compiler_flag: "/wd4996" linker_flag: "-m64" - - feature { - name: 'include_paths' - flag_set { - action: 'preprocess-assemble' - action: 'c-compile' - action: 'c++-compile' - action: 'c++-header-parsing' - action: 'c++-header-preprocessing' - action: 'c++-module-compile' - flag_group { - iterate_over: 'quote_include_paths' - flag: '/I%{quote_include_paths}' - } - flag_group { - iterate_over: 'include_paths' - flag: '/I%{include_paths}' - } - flag_group { - iterate_over: 'system_include_paths' - flag: '/I%{system_include_paths}' - } - } - } - - feature { - name: 'dependency_file' - flag_set { - action: 'assemble' - action: 'preprocess-assemble' - action: 'c-compile' - action: 'c++-compile' - action: 'c++-module-compile' - action: 'c++-header-preprocessing' - action: 'c++-header-parsing' - expand_if_all_available: 'dependency_file' - flag_group { - flag: '/DEPENDENCY_FILE' - flag: '%{dependency_file}' - } - } - } - # Stop passing -frandom-seed option feature { name: 'random_seed' @@ -752,7 +709,9 @@ toolchain { flag: '/Fi%{output_preprocess_file}' } } - implies: 'copts' + implies: 'legacy_compile_flags' + implies: 'user_compile_flags' + implies: 'unfiltered_compile_flags' } action_config { @@ -786,13 +745,97 @@ toolchain { flag: '/Fi%{output_preprocess_file}' } } - implies: 'copts' + implies: 'legacy_compile_flags' + implies: 'user_compile_flags' + implies: 'unfiltered_compile_flags' + } + + # TODO(b/65151735): Remove legacy_compile_flags feature when legacy fields are + # not used in this crosstool + feature { + name: 'legacy_compile_flags' + flag_set { + expand_if_all_available: 'legacy_compile_flags' + action: 'assemble' + action: 'preprocess-assemble' + action: 'c-compile' + action: 'c++-compile' + action: 'c++-header-parsing' + action: 'c++-header-preprocessing' + action: 'c++-module-compile' + action: 'c++-module-codegen' + flag_group { + iterate_over: 'legacy_compile_flags' + flag: '%{legacy_compile_flags}' + } + } + } + + feature { + name: 'include_paths' + flag_set { + action: 'preprocess-assemble' + action: 'c-compile' + action: 'c++-compile' + action: 'c++-header-parsing' + action: 'c++-header-preprocessing' + action: 'c++-module-compile' + flag_group { + iterate_over: 'quote_include_paths' + flag: '/I%{quote_include_paths}' + } + flag_group { + iterate_over: 'include_paths' + flag: '/I%{include_paths}' + } + flag_group { + iterate_over: 'system_include_paths' + flag: '/I%{system_include_paths}' + } + } + } + + feature { + name: 'dependency_file' + flag_set { + action: 'assemble' + action: 'preprocess-assemble' + action: 'c-compile' + action: 'c++-compile' + action: 'c++-module-compile' + action: 'c++-header-preprocessing' + action: 'c++-header-parsing' + expand_if_all_available: 'dependency_file' + flag_group { + flag: '/DEPENDENCY_FILE' + flag: '%{dependency_file}' + } + } + } + + feature { + name: 'user_compile_flags' + flag_set { + expand_if_all_available: 'user_compile_flags' + action: 'assemble' + action: 'preprocess-assemble' + action: 'c-compile' + action: 'c++-compile' + action: 'c++-header-parsing' + action: 'c++-header-preprocessing' + action: 'c++-module-compile' + action: 'c++-module-codegen' + flag_group { + iterate_over: 'user_compile_flags' + flag: '%{user_compile_flags}' + } + } } feature { - name: 'copts' + name: 'unfiltered_compile_flags' flag_set { - expand_if_all_available: 'copts' + expand_if_all_available: 'unfiltered_compile_flags' action: 'assemble' action: 'preprocess-assemble' action: 'c-compile' @@ -802,8 +845,8 @@ toolchain { action: 'c++-module-compile' action: 'c++-module-codegen' flag_group { - iterate_over: 'copts' - flag: '%{copts}' + iterate_over: 'unfiltered_compile_flags' + flag: '%{unfiltered_compile_flags}' } } } |