diff options
author | 2017-06-30 13:17:19 +0200 | |
---|---|---|
committer | 2017-07-03 09:02:35 +0200 | |
commit | e3312d97ab356d71cc5b6965de80b2189d547b80 (patch) | |
tree | fb4104516c5d9955537548577b5faa14b393eefd /tools | |
parent | 90ccaa583828aa4e9bf8b7b0507ab518121ef90c (diff) |
Make osx crosstool standalone (working without bazel patches)
This cl promotes //tools/osx/crosstool to be fully specified on its own, without
any blaze patches needed. While at it, I (think I) unified objc and c++ coverage
features. Other than coverage, this cl only adds features that bazel would add
otherwise.
Ping #2420
RELNOTES: ObjC and C++ coverage feature is unified under name 'coverage'
PiperOrigin-RevId: 160633192
Diffstat (limited to 'tools')
-rw-r--r-- | tools/osx/crosstool/CROSSTOOL.tpl | 2270 |
1 files changed, 1890 insertions, 380 deletions
diff --git a/tools/osx/crosstool/CROSSTOOL.tpl b/tools/osx/crosstool/CROSSTOOL.tpl index 5faa8849c6..d416b03507 100644 --- a/tools/osx/crosstool/CROSSTOOL.tpl +++ b/tools/osx/crosstool/CROSSTOOL.tpl @@ -163,6 +163,9 @@ toolchain { name: "fastbuild" } feature { + name: "no_legacy_features" + } + feature { name: "opt" } feature { @@ -591,6 +594,94 @@ toolchain { } } 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" + action: "clif-match" + action: "objc-compile" + action: "objc++-compile" + flag_group { + flag: "-iquote" + flag: "%{quote_include_paths}" + iterate_over: "quote_include_paths" + } + flag_group { + flag: "-I%{include_paths}" + iterate_over: "include_paths" + } + flag_group { + flag: "-isystem" + flag: "%{system_include_paths}" + iterate_over: "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: "objc-compile" + action: "objc++-compile" + action: "c++-header-preprocessing" + action: "c++-header-parsing" + flag_group { + flag: "-MD" + flag: "-MF" + flag: "%{dependency_file}" + } + expand_if_all_available: "dependency_file" + } + } + feature { + name: "random_seed" + flag_set { + action: "c++-compile" + action: "c++-module-codegen" + action: "c++-module-compile" + flag_group { + flag: "-frandom-seed=%{output_file}" + } + } + } + feature { + name: "pic" + flag_set { + action: "c-compile" + action: "c++-compile" + action: "c++-module-codegen" + action: "c++-module-compile" + action: "preprocess-assemble" + flag_group { + flag: "-fPIC" + } + expand_if_all_available: "pic" + } + } + feature { + name: "per_object_debug_info" + flag_set { + action: "c-compile" + action: "c++-compile" + action: "c++-module-codegen" + action: "assemble" + action: "preprocess-assemble" + action: "lto-backend" + flag_group { + flag: "-gsplit-dwarf" + } + expand_if_all_available: "per_object_debug_info_file" + } + } + feature { name: "preprocessor_defines" flag_set { action: "preprocess-assemble" @@ -619,30 +710,125 @@ toolchain { } } feature { + name: "fdo_instrument" + flag_set { + action: "c-compile" + action: "c++-compile" + action: "c++-link-interface-dynamic-library" + action: "c++-link-dynamic-library" + action: "c++-link-executable" + flag_group { + flag: "-fprofile-generate=%{fdo_instrument_path}" + flag: "-fno-data-sections" + } + } + provides: "profile" + } + feature { + name: "fdo_optimize" + flag_set { + action: "c-compile" + action: "c++-compile" + flag_group { + flag: "-fprofile-use=%{fdo_profile_path}" + flag: "-Xclang-only=-Wno-profile-instr-unprofiled" + flag: "-Xclang-only=-Wno-profile-instr-out-of-date" + flag: "-fprofile-correction" + } + expand_if_all_available: "fdo_profile_path" + } + provides: "profile" + } + feature { + name: "autofdo" + flag_set { + action: "c-compile" + action: "c++-compile" + flag_group { + flag: "-fauto-profile=%{fdo_profile_path}" + flag: "-fprofile-correction" + } + expand_if_all_available: "fdo_profile_path" + } + provides: "profile" + } + feature { + name: "lipo" + flag_set { + action: "c-compile" + action: "c++-compile" + flag_group { + flag: "-fripa" + } + } + requires { + feature: "autofdo" + } + requires { + feature: "fdo_optimize" + } + requires { + feature: "fdo_instrument" + } + } + feature { name: "coverage" + } + feature { + name: "llvm_coverage_map_format" flag_set { action: "preprocess-assemble" action: "c-compile" action: "c++-compile" - action: "c++-header-parsing" - action: "c++-header-preprocessing" action: "c++-module-compile" action: "objc-compile" action: "objc++-compile" flag_group { flag: "-fprofile-instr-generate" flag: "-fcoverage-mapping" + flag: "-g" } } flag_set { action: "c++-link-interface-dynamic-library" action: "c++-link-dynamic-library" action: "c++-link-executable" + action: "objc-executable" + action: "objc++-executable" flag_group { flag: "-fprofile-instr-generate" } } - provides: "profile" + requires { + feature: "coverage" + } + } + feature { + name: "gcc_coverage_map_format" + flag_set { + action: "preprocess-assemble" + action: "c-compile" + action: "c++-compile" + action: "c++-module-compile" + action: "objc-compile" + action: "objc++-compile" + flag_group { + flag: "-fprofile-arcs" + flag: "-ftest-coverage" + flag: "-g" + } + } + flag_set { + action: "c++-link-interface-dynamic-library" + action: "c++-link-dynamic-library" + action: "c++-link-executable" + flag_group { + flag: "-lgcov" + } + } + requires { + feature: "coverage" + } } feature { name: "apply_default_compiler_flags" @@ -835,41 +1021,6 @@ toolchain { } } feature { - name: "run_coverage" - } - feature { - name: "llvm_coverage_map_format" - flag_set { - action: "c-compile" - action: "c++-compile" - action: "objc-compile" - action: "objc++-compile" - flag_group { - flag: "-fprofile-instr-generate" - flag: "-fcoverage-mapping" - } - } - requires { - feature: "run_coverage" - } - } - feature { - name: "gcc_coverage_map_format" - flag_set { - action: "c-compile" - action: "c++-compile" - action: "objc-compile" - action: "objc++-compile" - flag_group { - flag: "-fprofile-arcs" - flag: "-ftest-coverage" - } - } - requires { - feature: "run_coverage" - } - } - feature { name: "apply_implicit_frameworks" flag_set { action: "objc-executable" @@ -1418,6 +1569,9 @@ toolchain { name: "fastbuild" } feature { + name: "no_legacy_features" + } + feature { name: "opt" } feature { @@ -1846,6 +2000,94 @@ toolchain { } } 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" + action: "clif-match" + action: "objc-compile" + action: "objc++-compile" + flag_group { + flag: "-iquote" + flag: "%{quote_include_paths}" + iterate_over: "quote_include_paths" + } + flag_group { + flag: "-I%{include_paths}" + iterate_over: "include_paths" + } + flag_group { + flag: "-isystem" + flag: "%{system_include_paths}" + iterate_over: "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: "objc-compile" + action: "objc++-compile" + action: "c++-header-preprocessing" + action: "c++-header-parsing" + flag_group { + flag: "-MD" + flag: "-MF" + flag: "%{dependency_file}" + } + expand_if_all_available: "dependency_file" + } + } + feature { + name: "random_seed" + flag_set { + action: "c++-compile" + action: "c++-module-codegen" + action: "c++-module-compile" + flag_group { + flag: "-frandom-seed=%{output_file}" + } + } + } + feature { + name: "pic" + flag_set { + action: "c-compile" + action: "c++-compile" + action: "c++-module-codegen" + action: "c++-module-compile" + action: "preprocess-assemble" + flag_group { + flag: "-fPIC" + } + expand_if_all_available: "pic" + } + } + feature { + name: "per_object_debug_info" + flag_set { + action: "c-compile" + action: "c++-compile" + action: "c++-module-codegen" + action: "assemble" + action: "preprocess-assemble" + action: "lto-backend" + flag_group { + flag: "-gsplit-dwarf" + } + expand_if_all_available: "per_object_debug_info_file" + } + } + feature { name: "preprocessor_defines" flag_set { action: "preprocess-assemble" @@ -1874,30 +2116,125 @@ toolchain { } } feature { + name: "fdo_instrument" + flag_set { + action: "c-compile" + action: "c++-compile" + action: "c++-link-interface-dynamic-library" + action: "c++-link-dynamic-library" + action: "c++-link-executable" + flag_group { + flag: "-fprofile-generate=%{fdo_instrument_path}" + flag: "-fno-data-sections" + } + } + provides: "profile" + } + feature { + name: "fdo_optimize" + flag_set { + action: "c-compile" + action: "c++-compile" + flag_group { + flag: "-fprofile-use=%{fdo_profile_path}" + flag: "-Xclang-only=-Wno-profile-instr-unprofiled" + flag: "-Xclang-only=-Wno-profile-instr-out-of-date" + flag: "-fprofile-correction" + } + expand_if_all_available: "fdo_profile_path" + } + provides: "profile" + } + feature { + name: "autofdo" + flag_set { + action: "c-compile" + action: "c++-compile" + flag_group { + flag: "-fauto-profile=%{fdo_profile_path}" + flag: "-fprofile-correction" + } + expand_if_all_available: "fdo_profile_path" + } + provides: "profile" + } + feature { + name: "lipo" + flag_set { + action: "c-compile" + action: "c++-compile" + flag_group { + flag: "-fripa" + } + } + requires { + feature: "autofdo" + } + requires { + feature: "fdo_optimize" + } + requires { + feature: "fdo_instrument" + } + } + feature { name: "coverage" + } + feature { + name: "llvm_coverage_map_format" flag_set { action: "preprocess-assemble" action: "c-compile" action: "c++-compile" - action: "c++-header-parsing" - action: "c++-header-preprocessing" action: "c++-module-compile" action: "objc-compile" action: "objc++-compile" flag_group { flag: "-fprofile-instr-generate" flag: "-fcoverage-mapping" + flag: "-g" } } flag_set { action: "c++-link-interface-dynamic-library" action: "c++-link-dynamic-library" action: "c++-link-executable" + action: "objc-executable" + action: "objc++-executable" flag_group { flag: "-fprofile-instr-generate" } } - provides: "profile" + requires { + feature: "coverage" + } + } + feature { + name: "gcc_coverage_map_format" + flag_set { + action: "preprocess-assemble" + action: "c-compile" + action: "c++-compile" + action: "c++-module-compile" + action: "objc-compile" + action: "objc++-compile" + flag_group { + flag: "-fprofile-arcs" + flag: "-ftest-coverage" + flag: "-g" + } + } + flag_set { + action: "c++-link-interface-dynamic-library" + action: "c++-link-dynamic-library" + action: "c++-link-executable" + flag_group { + flag: "-lgcov" + } + } + requires { + feature: "coverage" + } } feature { name: "apply_default_compiler_flags" @@ -2091,41 +2428,6 @@ toolchain { } } feature { - name: "run_coverage" - } - feature { - name: "llvm_coverage_map_format" - flag_set { - action: "c-compile" - action: "c++-compile" - action: "objc-compile" - action: "objc++-compile" - flag_group { - flag: "-fprofile-instr-generate" - flag: "-fcoverage-mapping" - } - } - requires { - feature: "run_coverage" - } - } - feature { - name: "gcc_coverage_map_format" - flag_set { - action: "c-compile" - action: "c++-compile" - action: "objc-compile" - action: "objc++-compile" - flag_group { - flag: "-fprofile-arcs" - flag: "-ftest-coverage" - } - } - requires { - feature: "run_coverage" - } - } - feature { name: "apply_implicit_frameworks" flag_set { action: "objc-executable" @@ -2680,6 +2982,9 @@ toolchain { name: "fastbuild" } feature { + name: "no_legacy_features" + } + feature { name: "opt" } feature { @@ -3108,6 +3413,94 @@ toolchain { } } 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" + action: "clif-match" + action: "objc-compile" + action: "objc++-compile" + flag_group { + flag: "-iquote" + flag: "%{quote_include_paths}" + iterate_over: "quote_include_paths" + } + flag_group { + flag: "-I%{include_paths}" + iterate_over: "include_paths" + } + flag_group { + flag: "-isystem" + flag: "%{system_include_paths}" + iterate_over: "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: "objc-compile" + action: "objc++-compile" + action: "c++-header-preprocessing" + action: "c++-header-parsing" + flag_group { + flag: "-MD" + flag: "-MF" + flag: "%{dependency_file}" + } + expand_if_all_available: "dependency_file" + } + } + feature { + name: "random_seed" + flag_set { + action: "c++-compile" + action: "c++-module-codegen" + action: "c++-module-compile" + flag_group { + flag: "-frandom-seed=%{output_file}" + } + } + } + feature { + name: "pic" + flag_set { + action: "c-compile" + action: "c++-compile" + action: "c++-module-codegen" + action: "c++-module-compile" + action: "preprocess-assemble" + flag_group { + flag: "-fPIC" + } + expand_if_all_available: "pic" + } + } + feature { + name: "per_object_debug_info" + flag_set { + action: "c-compile" + action: "c++-compile" + action: "c++-module-codegen" + action: "assemble" + action: "preprocess-assemble" + action: "lto-backend" + flag_group { + flag: "-gsplit-dwarf" + } + expand_if_all_available: "per_object_debug_info_file" + } + } + feature { name: "preprocessor_defines" flag_set { action: "preprocess-assemble" @@ -3136,30 +3529,125 @@ toolchain { } } feature { + name: "fdo_instrument" + flag_set { + action: "c-compile" + action: "c++-compile" + action: "c++-link-interface-dynamic-library" + action: "c++-link-dynamic-library" + action: "c++-link-executable" + flag_group { + flag: "-fprofile-generate=%{fdo_instrument_path}" + flag: "-fno-data-sections" + } + } + provides: "profile" + } + feature { + name: "fdo_optimize" + flag_set { + action: "c-compile" + action: "c++-compile" + flag_group { + flag: "-fprofile-use=%{fdo_profile_path}" + flag: "-Xclang-only=-Wno-profile-instr-unprofiled" + flag: "-Xclang-only=-Wno-profile-instr-out-of-date" + flag: "-fprofile-correction" + } + expand_if_all_available: "fdo_profile_path" + } + provides: "profile" + } + feature { + name: "autofdo" + flag_set { + action: "c-compile" + action: "c++-compile" + flag_group { + flag: "-fauto-profile=%{fdo_profile_path}" + flag: "-fprofile-correction" + } + expand_if_all_available: "fdo_profile_path" + } + provides: "profile" + } + feature { + name: "lipo" + flag_set { + action: "c-compile" + action: "c++-compile" + flag_group { + flag: "-fripa" + } + } + requires { + feature: "autofdo" + } + requires { + feature: "fdo_optimize" + } + requires { + feature: "fdo_instrument" + } + } + feature { name: "coverage" + } + feature { + name: "llvm_coverage_map_format" flag_set { action: "preprocess-assemble" action: "c-compile" action: "c++-compile" - action: "c++-header-parsing" - action: "c++-header-preprocessing" action: "c++-module-compile" action: "objc-compile" action: "objc++-compile" flag_group { flag: "-fprofile-instr-generate" flag: "-fcoverage-mapping" + flag: "-g" } } flag_set { action: "c++-link-interface-dynamic-library" action: "c++-link-dynamic-library" action: "c++-link-executable" + action: "objc-executable" + action: "objc++-executable" flag_group { flag: "-fprofile-instr-generate" } } - provides: "profile" + requires { + feature: "coverage" + } + } + feature { + name: "gcc_coverage_map_format" + flag_set { + action: "preprocess-assemble" + action: "c-compile" + action: "c++-compile" + action: "c++-module-compile" + action: "objc-compile" + action: "objc++-compile" + flag_group { + flag: "-fprofile-arcs" + flag: "-ftest-coverage" + flag: "-g" + } + } + flag_set { + action: "c++-link-interface-dynamic-library" + action: "c++-link-dynamic-library" + action: "c++-link-executable" + flag_group { + flag: "-lgcov" + } + } + requires { + feature: "coverage" + } } feature { name: "apply_default_compiler_flags" @@ -3355,41 +3843,6 @@ toolchain { } } feature { - name: "run_coverage" - } - feature { - name: "llvm_coverage_map_format" - flag_set { - action: "c-compile" - action: "c++-compile" - action: "objc-compile" - action: "objc++-compile" - flag_group { - flag: "-fprofile-instr-generate" - flag: "-fcoverage-mapping" - } - } - requires { - feature: "run_coverage" - } - } - feature { - name: "gcc_coverage_map_format" - flag_set { - action: "c-compile" - action: "c++-compile" - action: "objc-compile" - action: "objc++-compile" - flag_group { - flag: "-fprofile-arcs" - flag: "-ftest-coverage" - } - } - requires { - feature: "run_coverage" - } - } - feature { name: "apply_implicit_frameworks" flag_set { action: "objc-executable" @@ -3945,6 +4398,9 @@ toolchain { name: "fastbuild" } feature { + name: "no_legacy_features" + } + feature { name: "opt" } feature { @@ -4373,6 +4829,94 @@ toolchain { } } 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" + action: "clif-match" + action: "objc-compile" + action: "objc++-compile" + flag_group { + flag: "-iquote" + flag: "%{quote_include_paths}" + iterate_over: "quote_include_paths" + } + flag_group { + flag: "-I%{include_paths}" + iterate_over: "include_paths" + } + flag_group { + flag: "-isystem" + flag: "%{system_include_paths}" + iterate_over: "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: "objc-compile" + action: "objc++-compile" + action: "c++-header-preprocessing" + action: "c++-header-parsing" + flag_group { + flag: "-MD" + flag: "-MF" + flag: "%{dependency_file}" + } + expand_if_all_available: "dependency_file" + } + } + feature { + name: "random_seed" + flag_set { + action: "c++-compile" + action: "c++-module-codegen" + action: "c++-module-compile" + flag_group { + flag: "-frandom-seed=%{output_file}" + } + } + } + feature { + name: "pic" + flag_set { + action: "c-compile" + action: "c++-compile" + action: "c++-module-codegen" + action: "c++-module-compile" + action: "preprocess-assemble" + flag_group { + flag: "-fPIC" + } + expand_if_all_available: "pic" + } + } + feature { + name: "per_object_debug_info" + flag_set { + action: "c-compile" + action: "c++-compile" + action: "c++-module-codegen" + action: "assemble" + action: "preprocess-assemble" + action: "lto-backend" + flag_group { + flag: "-gsplit-dwarf" + } + expand_if_all_available: "per_object_debug_info_file" + } + } + feature { name: "preprocessor_defines" flag_set { action: "preprocess-assemble" @@ -4401,30 +4945,125 @@ toolchain { } } feature { + name: "fdo_instrument" + flag_set { + action: "c-compile" + action: "c++-compile" + action: "c++-link-interface-dynamic-library" + action: "c++-link-dynamic-library" + action: "c++-link-executable" + flag_group { + flag: "-fprofile-generate=%{fdo_instrument_path}" + flag: "-fno-data-sections" + } + } + provides: "profile" + } + feature { + name: "fdo_optimize" + flag_set { + action: "c-compile" + action: "c++-compile" + flag_group { + flag: "-fprofile-use=%{fdo_profile_path}" + flag: "-Xclang-only=-Wno-profile-instr-unprofiled" + flag: "-Xclang-only=-Wno-profile-instr-out-of-date" + flag: "-fprofile-correction" + } + expand_if_all_available: "fdo_profile_path" + } + provides: "profile" + } + feature { + name: "autofdo" + flag_set { + action: "c-compile" + action: "c++-compile" + flag_group { + flag: "-fauto-profile=%{fdo_profile_path}" + flag: "-fprofile-correction" + } + expand_if_all_available: "fdo_profile_path" + } + provides: "profile" + } + feature { + name: "lipo" + flag_set { + action: "c-compile" + action: "c++-compile" + flag_group { + flag: "-fripa" + } + } + requires { + feature: "autofdo" + } + requires { + feature: "fdo_optimize" + } + requires { + feature: "fdo_instrument" + } + } + feature { name: "coverage" + } + feature { + name: "llvm_coverage_map_format" flag_set { action: "preprocess-assemble" action: "c-compile" action: "c++-compile" - action: "c++-header-parsing" - action: "c++-header-preprocessing" action: "c++-module-compile" action: "objc-compile" action: "objc++-compile" flag_group { flag: "-fprofile-instr-generate" flag: "-fcoverage-mapping" + flag: "-g" } } flag_set { action: "c++-link-interface-dynamic-library" action: "c++-link-dynamic-library" action: "c++-link-executable" + action: "objc-executable" + action: "objc++-executable" flag_group { flag: "-fprofile-instr-generate" } } - provides: "profile" + requires { + feature: "coverage" + } + } + feature { + name: "gcc_coverage_map_format" + flag_set { + action: "preprocess-assemble" + action: "c-compile" + action: "c++-compile" + action: "c++-module-compile" + action: "objc-compile" + action: "objc++-compile" + flag_group { + flag: "-fprofile-arcs" + flag: "-ftest-coverage" + flag: "-g" + } + } + flag_set { + action: "c++-link-interface-dynamic-library" + action: "c++-link-dynamic-library" + action: "c++-link-executable" + flag_group { + flag: "-lgcov" + } + } + requires { + feature: "coverage" + } } feature { name: "apply_default_compiler_flags" @@ -4618,41 +5257,6 @@ toolchain { } } feature { - name: "run_coverage" - } - feature { - name: "llvm_coverage_map_format" - flag_set { - action: "c-compile" - action: "c++-compile" - action: "objc-compile" - action: "objc++-compile" - flag_group { - flag: "-fprofile-instr-generate" - flag: "-fcoverage-mapping" - } - } - requires { - feature: "run_coverage" - } - } - feature { - name: "gcc_coverage_map_format" - flag_set { - action: "c-compile" - action: "c++-compile" - action: "objc-compile" - action: "objc++-compile" - flag_group { - flag: "-fprofile-arcs" - flag: "-ftest-coverage" - } - } - requires { - feature: "run_coverage" - } - } - feature { name: "apply_implicit_frameworks" flag_set { action: "objc-executable" @@ -5245,6 +5849,9 @@ toolchain { name: "fastbuild" } feature { + name: "no_legacy_features" + } + feature { name: "opt" } feature { @@ -5673,6 +6280,94 @@ toolchain { } } 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" + action: "clif-match" + action: "objc-compile" + action: "objc++-compile" + flag_group { + flag: "-iquote" + flag: "%{quote_include_paths}" + iterate_over: "quote_include_paths" + } + flag_group { + flag: "-I%{include_paths}" + iterate_over: "include_paths" + } + flag_group { + flag: "-isystem" + flag: "%{system_include_paths}" + iterate_over: "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: "objc-compile" + action: "objc++-compile" + action: "c++-header-preprocessing" + action: "c++-header-parsing" + flag_group { + flag: "-MD" + flag: "-MF" + flag: "%{dependency_file}" + } + expand_if_all_available: "dependency_file" + } + } + feature { + name: "random_seed" + flag_set { + action: "c++-compile" + action: "c++-module-codegen" + action: "c++-module-compile" + flag_group { + flag: "-frandom-seed=%{output_file}" + } + } + } + feature { + name: "pic" + flag_set { + action: "c-compile" + action: "c++-compile" + action: "c++-module-codegen" + action: "c++-module-compile" + action: "preprocess-assemble" + flag_group { + flag: "-fPIC" + } + expand_if_all_available: "pic" + } + } + feature { + name: "per_object_debug_info" + flag_set { + action: "c-compile" + action: "c++-compile" + action: "c++-module-codegen" + action: "assemble" + action: "preprocess-assemble" + action: "lto-backend" + flag_group { + flag: "-gsplit-dwarf" + } + expand_if_all_available: "per_object_debug_info_file" + } + } + feature { name: "preprocessor_defines" flag_set { action: "preprocess-assemble" @@ -5701,30 +6396,125 @@ toolchain { } } feature { + name: "fdo_instrument" + flag_set { + action: "c-compile" + action: "c++-compile" + action: "c++-link-interface-dynamic-library" + action: "c++-link-dynamic-library" + action: "c++-link-executable" + flag_group { + flag: "-fprofile-generate=%{fdo_instrument_path}" + flag: "-fno-data-sections" + } + } + provides: "profile" + } + feature { + name: "fdo_optimize" + flag_set { + action: "c-compile" + action: "c++-compile" + flag_group { + flag: "-fprofile-use=%{fdo_profile_path}" + flag: "-Xclang-only=-Wno-profile-instr-unprofiled" + flag: "-Xclang-only=-Wno-profile-instr-out-of-date" + flag: "-fprofile-correction" + } + expand_if_all_available: "fdo_profile_path" + } + provides: "profile" + } + feature { + name: "autofdo" + flag_set { + action: "c-compile" + action: "c++-compile" + flag_group { + flag: "-fauto-profile=%{fdo_profile_path}" + flag: "-fprofile-correction" + } + expand_if_all_available: "fdo_profile_path" + } + provides: "profile" + } + feature { + name: "lipo" + flag_set { + action: "c-compile" + action: "c++-compile" + flag_group { + flag: "-fripa" + } + } + requires { + feature: "autofdo" + } + requires { + feature: "fdo_optimize" + } + requires { + feature: "fdo_instrument" + } + } + feature { name: "coverage" + } + feature { + name: "llvm_coverage_map_format" flag_set { action: "preprocess-assemble" action: "c-compile" action: "c++-compile" - action: "c++-header-parsing" - action: "c++-header-preprocessing" action: "c++-module-compile" action: "objc-compile" action: "objc++-compile" flag_group { flag: "-fprofile-instr-generate" flag: "-fcoverage-mapping" + flag: "-g" } } flag_set { action: "c++-link-interface-dynamic-library" action: "c++-link-dynamic-library" action: "c++-link-executable" + action: "objc-executable" + action: "objc++-executable" flag_group { flag: "-fprofile-instr-generate" } } - provides: "profile" + requires { + feature: "coverage" + } + } + feature { + name: "gcc_coverage_map_format" + flag_set { + action: "preprocess-assemble" + action: "c-compile" + action: "c++-compile" + action: "c++-module-compile" + action: "objc-compile" + action: "objc++-compile" + flag_group { + flag: "-fprofile-arcs" + flag: "-ftest-coverage" + flag: "-g" + } + } + flag_set { + action: "c++-link-interface-dynamic-library" + action: "c++-link-dynamic-library" + action: "c++-link-executable" + flag_group { + flag: "-lgcov" + } + } + requires { + feature: "coverage" + } } feature { name: "apply_default_compiler_flags" @@ -5918,41 +6708,6 @@ toolchain { } } feature { - name: "run_coverage" - } - feature { - name: "llvm_coverage_map_format" - flag_set { - action: "c-compile" - action: "c++-compile" - action: "objc-compile" - action: "objc++-compile" - flag_group { - flag: "-fprofile-instr-generate" - flag: "-fcoverage-mapping" - } - } - requires { - feature: "run_coverage" - } - } - feature { - name: "gcc_coverage_map_format" - flag_set { - action: "c-compile" - action: "c++-compile" - action: "objc-compile" - action: "objc++-compile" - flag_group { - flag: "-fprofile-arcs" - flag: "-ftest-coverage" - } - } - requires { - feature: "run_coverage" - } - } - feature { name: "apply_implicit_frameworks" flag_set { action: "objc-executable" @@ -6507,6 +7262,9 @@ toolchain { name: "fastbuild" } feature { + name: "no_legacy_features" + } + feature { name: "opt" } feature { @@ -6935,6 +7693,94 @@ toolchain { } } 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" + action: "clif-match" + action: "objc-compile" + action: "objc++-compile" + flag_group { + flag: "-iquote" + flag: "%{quote_include_paths}" + iterate_over: "quote_include_paths" + } + flag_group { + flag: "-I%{include_paths}" + iterate_over: "include_paths" + } + flag_group { + flag: "-isystem" + flag: "%{system_include_paths}" + iterate_over: "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: "objc-compile" + action: "objc++-compile" + action: "c++-header-preprocessing" + action: "c++-header-parsing" + flag_group { + flag: "-MD" + flag: "-MF" + flag: "%{dependency_file}" + } + expand_if_all_available: "dependency_file" + } + } + feature { + name: "random_seed" + flag_set { + action: "c++-compile" + action: "c++-module-codegen" + action: "c++-module-compile" + flag_group { + flag: "-frandom-seed=%{output_file}" + } + } + } + feature { + name: "pic" + flag_set { + action: "c-compile" + action: "c++-compile" + action: "c++-module-codegen" + action: "c++-module-compile" + action: "preprocess-assemble" + flag_group { + flag: "-fPIC" + } + expand_if_all_available: "pic" + } + } + feature { + name: "per_object_debug_info" + flag_set { + action: "c-compile" + action: "c++-compile" + action: "c++-module-codegen" + action: "assemble" + action: "preprocess-assemble" + action: "lto-backend" + flag_group { + flag: "-gsplit-dwarf" + } + expand_if_all_available: "per_object_debug_info_file" + } + } + feature { name: "preprocessor_defines" flag_set { action: "preprocess-assemble" @@ -6963,30 +7809,125 @@ toolchain { } } feature { + name: "fdo_instrument" + flag_set { + action: "c-compile" + action: "c++-compile" + action: "c++-link-interface-dynamic-library" + action: "c++-link-dynamic-library" + action: "c++-link-executable" + flag_group { + flag: "-fprofile-generate=%{fdo_instrument_path}" + flag: "-fno-data-sections" + } + } + provides: "profile" + } + feature { + name: "fdo_optimize" + flag_set { + action: "c-compile" + action: "c++-compile" + flag_group { + flag: "-fprofile-use=%{fdo_profile_path}" + flag: "-Xclang-only=-Wno-profile-instr-unprofiled" + flag: "-Xclang-only=-Wno-profile-instr-out-of-date" + flag: "-fprofile-correction" + } + expand_if_all_available: "fdo_profile_path" + } + provides: "profile" + } + feature { + name: "autofdo" + flag_set { + action: "c-compile" + action: "c++-compile" + flag_group { + flag: "-fauto-profile=%{fdo_profile_path}" + flag: "-fprofile-correction" + } + expand_if_all_available: "fdo_profile_path" + } + provides: "profile" + } + feature { + name: "lipo" + flag_set { + action: "c-compile" + action: "c++-compile" + flag_group { + flag: "-fripa" + } + } + requires { + feature: "autofdo" + } + requires { + feature: "fdo_optimize" + } + requires { + feature: "fdo_instrument" + } + } + feature { name: "coverage" + } + feature { + name: "llvm_coverage_map_format" flag_set { action: "preprocess-assemble" action: "c-compile" action: "c++-compile" - action: "c++-header-parsing" - action: "c++-header-preprocessing" action: "c++-module-compile" action: "objc-compile" action: "objc++-compile" flag_group { flag: "-fprofile-instr-generate" flag: "-fcoverage-mapping" + flag: "-g" } } flag_set { action: "c++-link-interface-dynamic-library" action: "c++-link-dynamic-library" action: "c++-link-executable" + action: "objc-executable" + action: "objc++-executable" flag_group { flag: "-fprofile-instr-generate" } } - provides: "profile" + requires { + feature: "coverage" + } + } + feature { + name: "gcc_coverage_map_format" + flag_set { + action: "preprocess-assemble" + action: "c-compile" + action: "c++-compile" + action: "c++-module-compile" + action: "objc-compile" + action: "objc++-compile" + flag_group { + flag: "-fprofile-arcs" + flag: "-ftest-coverage" + flag: "-g" + } + } + flag_set { + action: "c++-link-interface-dynamic-library" + action: "c++-link-dynamic-library" + action: "c++-link-executable" + flag_group { + flag: "-lgcov" + } + } + requires { + feature: "coverage" + } } feature { name: "apply_default_compiler_flags" @@ -7180,41 +8121,6 @@ toolchain { } } feature { - name: "run_coverage" - } - feature { - name: "llvm_coverage_map_format" - flag_set { - action: "c-compile" - action: "c++-compile" - action: "objc-compile" - action: "objc++-compile" - flag_group { - flag: "-fprofile-instr-generate" - flag: "-fcoverage-mapping" - } - } - requires { - feature: "run_coverage" - } - } - feature { - name: "gcc_coverage_map_format" - flag_set { - action: "c-compile" - action: "c++-compile" - action: "objc-compile" - action: "objc++-compile" - flag_group { - flag: "-fprofile-arcs" - flag: "-ftest-coverage" - } - } - requires { - feature: "run_coverage" - } - } - feature { name: "apply_implicit_frameworks" flag_set { action: "objc-executable" @@ -7754,6 +8660,9 @@ toolchain { name: "fastbuild" } feature { + name: "no_legacy_features" + } + feature { name: "opt" } feature { @@ -8182,6 +9091,94 @@ toolchain { } } 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" + action: "clif-match" + action: "objc-compile" + action: "objc++-compile" + flag_group { + flag: "-iquote" + flag: "%{quote_include_paths}" + iterate_over: "quote_include_paths" + } + flag_group { + flag: "-I%{include_paths}" + iterate_over: "include_paths" + } + flag_group { + flag: "-isystem" + flag: "%{system_include_paths}" + iterate_over: "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: "objc-compile" + action: "objc++-compile" + action: "c++-header-preprocessing" + action: "c++-header-parsing" + flag_group { + flag: "-MD" + flag: "-MF" + flag: "%{dependency_file}" + } + expand_if_all_available: "dependency_file" + } + } + feature { + name: "random_seed" + flag_set { + action: "c++-compile" + action: "c++-module-codegen" + action: "c++-module-compile" + flag_group { + flag: "-frandom-seed=%{output_file}" + } + } + } + feature { + name: "pic" + flag_set { + action: "c-compile" + action: "c++-compile" + action: "c++-module-codegen" + action: "c++-module-compile" + action: "preprocess-assemble" + flag_group { + flag: "-fPIC" + } + expand_if_all_available: "pic" + } + } + feature { + name: "per_object_debug_info" + flag_set { + action: "c-compile" + action: "c++-compile" + action: "c++-module-codegen" + action: "assemble" + action: "preprocess-assemble" + action: "lto-backend" + flag_group { + flag: "-gsplit-dwarf" + } + expand_if_all_available: "per_object_debug_info_file" + } + } + feature { name: "preprocessor_defines" flag_set { action: "preprocess-assemble" @@ -8210,30 +9207,125 @@ toolchain { } } feature { + name: "fdo_instrument" + flag_set { + action: "c-compile" + action: "c++-compile" + action: "c++-link-interface-dynamic-library" + action: "c++-link-dynamic-library" + action: "c++-link-executable" + flag_group { + flag: "-fprofile-generate=%{fdo_instrument_path}" + flag: "-fno-data-sections" + } + } + provides: "profile" + } + feature { + name: "fdo_optimize" + flag_set { + action: "c-compile" + action: "c++-compile" + flag_group { + flag: "-fprofile-use=%{fdo_profile_path}" + flag: "-Xclang-only=-Wno-profile-instr-unprofiled" + flag: "-Xclang-only=-Wno-profile-instr-out-of-date" + flag: "-fprofile-correction" + } + expand_if_all_available: "fdo_profile_path" + } + provides: "profile" + } + feature { + name: "autofdo" + flag_set { + action: "c-compile" + action: "c++-compile" + flag_group { + flag: "-fauto-profile=%{fdo_profile_path}" + flag: "-fprofile-correction" + } + expand_if_all_available: "fdo_profile_path" + } + provides: "profile" + } + feature { + name: "lipo" + flag_set { + action: "c-compile" + action: "c++-compile" + flag_group { + flag: "-fripa" + } + } + requires { + feature: "autofdo" + } + requires { + feature: "fdo_optimize" + } + requires { + feature: "fdo_instrument" + } + } + feature { name: "coverage" + } + feature { + name: "llvm_coverage_map_format" flag_set { action: "preprocess-assemble" action: "c-compile" action: "c++-compile" - action: "c++-header-parsing" - action: "c++-header-preprocessing" action: "c++-module-compile" action: "objc-compile" action: "objc++-compile" flag_group { flag: "-fprofile-instr-generate" flag: "-fcoverage-mapping" + flag: "-g" } } flag_set { action: "c++-link-interface-dynamic-library" action: "c++-link-dynamic-library" action: "c++-link-executable" + action: "objc-executable" + action: "objc++-executable" flag_group { flag: "-fprofile-instr-generate" } } - provides: "profile" + requires { + feature: "coverage" + } + } + feature { + name: "gcc_coverage_map_format" + flag_set { + action: "preprocess-assemble" + action: "c-compile" + action: "c++-compile" + action: "c++-module-compile" + action: "objc-compile" + action: "objc++-compile" + flag_group { + flag: "-fprofile-arcs" + flag: "-ftest-coverage" + flag: "-g" + } + } + flag_set { + action: "c++-link-interface-dynamic-library" + action: "c++-link-dynamic-library" + action: "c++-link-executable" + flag_group { + flag: "-lgcov" + } + } + requires { + feature: "coverage" + } } feature { name: "apply_default_compiler_flags" @@ -8429,41 +9521,6 @@ toolchain { } } feature { - name: "run_coverage" - } - feature { - name: "llvm_coverage_map_format" - flag_set { - action: "c-compile" - action: "c++-compile" - action: "objc-compile" - action: "objc++-compile" - flag_group { - flag: "-fprofile-instr-generate" - flag: "-fcoverage-mapping" - } - } - requires { - feature: "run_coverage" - } - } - feature { - name: "gcc_coverage_map_format" - flag_set { - action: "c-compile" - action: "c++-compile" - action: "objc-compile" - action: "objc++-compile" - flag_group { - flag: "-fprofile-arcs" - flag: "-ftest-coverage" - } - } - requires { - feature: "run_coverage" - } - } - feature { name: "apply_implicit_frameworks" flag_set { action: "objc-executable" @@ -9004,6 +10061,9 @@ toolchain { name: "fastbuild" } feature { + name: "no_legacy_features" + } + feature { name: "opt" } feature { @@ -9432,6 +10492,94 @@ toolchain { } } 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" + action: "clif-match" + action: "objc-compile" + action: "objc++-compile" + flag_group { + flag: "-iquote" + flag: "%{quote_include_paths}" + iterate_over: "quote_include_paths" + } + flag_group { + flag: "-I%{include_paths}" + iterate_over: "include_paths" + } + flag_group { + flag: "-isystem" + flag: "%{system_include_paths}" + iterate_over: "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: "objc-compile" + action: "objc++-compile" + action: "c++-header-preprocessing" + action: "c++-header-parsing" + flag_group { + flag: "-MD" + flag: "-MF" + flag: "%{dependency_file}" + } + expand_if_all_available: "dependency_file" + } + } + feature { + name: "random_seed" + flag_set { + action: "c++-compile" + action: "c++-module-codegen" + action: "c++-module-compile" + flag_group { + flag: "-frandom-seed=%{output_file}" + } + } + } + feature { + name: "pic" + flag_set { + action: "c-compile" + action: "c++-compile" + action: "c++-module-codegen" + action: "c++-module-compile" + action: "preprocess-assemble" + flag_group { + flag: "-fPIC" + } + expand_if_all_available: "pic" + } + } + feature { + name: "per_object_debug_info" + flag_set { + action: "c-compile" + action: "c++-compile" + action: "c++-module-codegen" + action: "assemble" + action: "preprocess-assemble" + action: "lto-backend" + flag_group { + flag: "-gsplit-dwarf" + } + expand_if_all_available: "per_object_debug_info_file" + } + } + feature { name: "preprocessor_defines" flag_set { action: "preprocess-assemble" @@ -9460,30 +10608,125 @@ toolchain { } } feature { + name: "fdo_instrument" + flag_set { + action: "c-compile" + action: "c++-compile" + action: "c++-link-interface-dynamic-library" + action: "c++-link-dynamic-library" + action: "c++-link-executable" + flag_group { + flag: "-fprofile-generate=%{fdo_instrument_path}" + flag: "-fno-data-sections" + } + } + provides: "profile" + } + feature { + name: "fdo_optimize" + flag_set { + action: "c-compile" + action: "c++-compile" + flag_group { + flag: "-fprofile-use=%{fdo_profile_path}" + flag: "-Xclang-only=-Wno-profile-instr-unprofiled" + flag: "-Xclang-only=-Wno-profile-instr-out-of-date" + flag: "-fprofile-correction" + } + expand_if_all_available: "fdo_profile_path" + } + provides: "profile" + } + feature { + name: "autofdo" + flag_set { + action: "c-compile" + action: "c++-compile" + flag_group { + flag: "-fauto-profile=%{fdo_profile_path}" + flag: "-fprofile-correction" + } + expand_if_all_available: "fdo_profile_path" + } + provides: "profile" + } + feature { + name: "lipo" + flag_set { + action: "c-compile" + action: "c++-compile" + flag_group { + flag: "-fripa" + } + } + requires { + feature: "autofdo" + } + requires { + feature: "fdo_optimize" + } + requires { + feature: "fdo_instrument" + } + } + feature { name: "coverage" + } + feature { + name: "llvm_coverage_map_format" flag_set { action: "preprocess-assemble" action: "c-compile" action: "c++-compile" - action: "c++-header-parsing" - action: "c++-header-preprocessing" action: "c++-module-compile" action: "objc-compile" action: "objc++-compile" flag_group { flag: "-fprofile-instr-generate" flag: "-fcoverage-mapping" + flag: "-g" } } flag_set { action: "c++-link-interface-dynamic-library" action: "c++-link-dynamic-library" action: "c++-link-executable" + action: "objc-executable" + action: "objc++-executable" flag_group { flag: "-fprofile-instr-generate" } } - provides: "profile" + requires { + feature: "coverage" + } + } + feature { + name: "gcc_coverage_map_format" + flag_set { + action: "preprocess-assemble" + action: "c-compile" + action: "c++-compile" + action: "c++-module-compile" + action: "objc-compile" + action: "objc++-compile" + flag_group { + flag: "-fprofile-arcs" + flag: "-ftest-coverage" + flag: "-g" + } + } + flag_set { + action: "c++-link-interface-dynamic-library" + action: "c++-link-dynamic-library" + action: "c++-link-executable" + flag_group { + flag: "-lgcov" + } + } + requires { + feature: "coverage" + } } feature { name: "apply_default_compiler_flags" @@ -9677,41 +10920,6 @@ toolchain { } } feature { - name: "run_coverage" - } - feature { - name: "llvm_coverage_map_format" - flag_set { - action: "c-compile" - action: "c++-compile" - action: "objc-compile" - action: "objc++-compile" - flag_group { - flag: "-fprofile-instr-generate" - flag: "-fcoverage-mapping" - } - } - requires { - feature: "run_coverage" - } - } - feature { - name: "gcc_coverage_map_format" - flag_set { - action: "c-compile" - action: "c++-compile" - action: "objc-compile" - action: "objc++-compile" - flag_group { - flag: "-fprofile-arcs" - flag: "-ftest-coverage" - } - } - requires { - feature: "run_coverage" - } - } - feature { name: "apply_implicit_frameworks" flag_set { action: "objc-executable" @@ -10289,6 +11497,9 @@ toolchain { name: "fastbuild" } feature { + name: "no_legacy_features" + } + feature { name: "opt" } feature { @@ -10717,6 +11928,94 @@ toolchain { } } 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" + action: "clif-match" + action: "objc-compile" + action: "objc++-compile" + flag_group { + flag: "-iquote" + flag: "%{quote_include_paths}" + iterate_over: "quote_include_paths" + } + flag_group { + flag: "-I%{include_paths}" + iterate_over: "include_paths" + } + flag_group { + flag: "-isystem" + flag: "%{system_include_paths}" + iterate_over: "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: "objc-compile" + action: "objc++-compile" + action: "c++-header-preprocessing" + action: "c++-header-parsing" + flag_group { + flag: "-MD" + flag: "-MF" + flag: "%{dependency_file}" + } + expand_if_all_available: "dependency_file" + } + } + feature { + name: "random_seed" + flag_set { + action: "c++-compile" + action: "c++-module-codegen" + action: "c++-module-compile" + flag_group { + flag: "-frandom-seed=%{output_file}" + } + } + } + feature { + name: "pic" + flag_set { + action: "c-compile" + action: "c++-compile" + action: "c++-module-codegen" + action: "c++-module-compile" + action: "preprocess-assemble" + flag_group { + flag: "-fPIC" + } + expand_if_all_available: "pic" + } + } + feature { + name: "per_object_debug_info" + flag_set { + action: "c-compile" + action: "c++-compile" + action: "c++-module-codegen" + action: "assemble" + action: "preprocess-assemble" + action: "lto-backend" + flag_group { + flag: "-gsplit-dwarf" + } + expand_if_all_available: "per_object_debug_info_file" + } + } + feature { name: "preprocessor_defines" flag_set { action: "preprocess-assemble" @@ -10745,30 +12044,125 @@ toolchain { } } feature { + name: "fdo_instrument" + flag_set { + action: "c-compile" + action: "c++-compile" + action: "c++-link-interface-dynamic-library" + action: "c++-link-dynamic-library" + action: "c++-link-executable" + flag_group { + flag: "-fprofile-generate=%{fdo_instrument_path}" + flag: "-fno-data-sections" + } + } + provides: "profile" + } + feature { + name: "fdo_optimize" + flag_set { + action: "c-compile" + action: "c++-compile" + flag_group { + flag: "-fprofile-use=%{fdo_profile_path}" + flag: "-Xclang-only=-Wno-profile-instr-unprofiled" + flag: "-Xclang-only=-Wno-profile-instr-out-of-date" + flag: "-fprofile-correction" + } + expand_if_all_available: "fdo_profile_path" + } + provides: "profile" + } + feature { + name: "autofdo" + flag_set { + action: "c-compile" + action: "c++-compile" + flag_group { + flag: "-fauto-profile=%{fdo_profile_path}" + flag: "-fprofile-correction" + } + expand_if_all_available: "fdo_profile_path" + } + provides: "profile" + } + feature { + name: "lipo" + flag_set { + action: "c-compile" + action: "c++-compile" + flag_group { + flag: "-fripa" + } + } + requires { + feature: "autofdo" + } + requires { + feature: "fdo_optimize" + } + requires { + feature: "fdo_instrument" + } + } + feature { name: "coverage" + } + feature { + name: "llvm_coverage_map_format" flag_set { action: "preprocess-assemble" action: "c-compile" action: "c++-compile" - action: "c++-header-parsing" - action: "c++-header-preprocessing" action: "c++-module-compile" action: "objc-compile" action: "objc++-compile" flag_group { flag: "-fprofile-instr-generate" flag: "-fcoverage-mapping" + flag: "-g" } } flag_set { action: "c++-link-interface-dynamic-library" action: "c++-link-dynamic-library" action: "c++-link-executable" + action: "objc-executable" + action: "objc++-executable" flag_group { flag: "-fprofile-instr-generate" } } - provides: "profile" + requires { + feature: "coverage" + } + } + feature { + name: "gcc_coverage_map_format" + flag_set { + action: "preprocess-assemble" + action: "c-compile" + action: "c++-compile" + action: "c++-module-compile" + action: "objc-compile" + action: "objc++-compile" + flag_group { + flag: "-fprofile-arcs" + flag: "-ftest-coverage" + flag: "-g" + } + } + flag_set { + action: "c++-link-interface-dynamic-library" + action: "c++-link-dynamic-library" + action: "c++-link-executable" + flag_group { + flag: "-lgcov" + } + } + requires { + feature: "coverage" + } } feature { name: "apply_default_compiler_flags" @@ -10962,41 +12356,6 @@ toolchain { } } feature { - name: "run_coverage" - } - feature { - name: "llvm_coverage_map_format" - flag_set { - action: "c-compile" - action: "c++-compile" - action: "objc-compile" - action: "objc++-compile" - flag_group { - flag: "-fprofile-instr-generate" - flag: "-fcoverage-mapping" - } - } - requires { - feature: "run_coverage" - } - } - feature { - name: "gcc_coverage_map_format" - flag_set { - action: "c-compile" - action: "c++-compile" - action: "objc-compile" - action: "objc++-compile" - flag_group { - flag: "-fprofile-arcs" - flag: "-ftest-coverage" - } - } - requires { - feature: "run_coverage" - } - } - feature { name: "apply_implicit_frameworks" flag_set { action: "objc-executable" @@ -11542,6 +12901,9 @@ toolchain { name: "fastbuild" } feature { + name: "no_legacy_features" + } + feature { name: "opt" } feature { @@ -11970,6 +13332,94 @@ toolchain { } } 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" + action: "clif-match" + action: "objc-compile" + action: "objc++-compile" + flag_group { + flag: "-iquote" + flag: "%{quote_include_paths}" + iterate_over: "quote_include_paths" + } + flag_group { + flag: "-I%{include_paths}" + iterate_over: "include_paths" + } + flag_group { + flag: "-isystem" + flag: "%{system_include_paths}" + iterate_over: "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: "objc-compile" + action: "objc++-compile" + action: "c++-header-preprocessing" + action: "c++-header-parsing" + flag_group { + flag: "-MD" + flag: "-MF" + flag: "%{dependency_file}" + } + expand_if_all_available: "dependency_file" + } + } + feature { + name: "random_seed" + flag_set { + action: "c++-compile" + action: "c++-module-codegen" + action: "c++-module-compile" + flag_group { + flag: "-frandom-seed=%{output_file}" + } + } + } + feature { + name: "pic" + flag_set { + action: "c-compile" + action: "c++-compile" + action: "c++-module-codegen" + action: "c++-module-compile" + action: "preprocess-assemble" + flag_group { + flag: "-fPIC" + } + expand_if_all_available: "pic" + } + } + feature { + name: "per_object_debug_info" + flag_set { + action: "c-compile" + action: "c++-compile" + action: "c++-module-codegen" + action: "assemble" + action: "preprocess-assemble" + action: "lto-backend" + flag_group { + flag: "-gsplit-dwarf" + } + expand_if_all_available: "per_object_debug_info_file" + } + } + feature { name: "preprocessor_defines" flag_set { action: "preprocess-assemble" @@ -11998,30 +13448,125 @@ toolchain { } } feature { + name: "fdo_instrument" + flag_set { + action: "c-compile" + action: "c++-compile" + action: "c++-link-interface-dynamic-library" + action: "c++-link-dynamic-library" + action: "c++-link-executable" + flag_group { + flag: "-fprofile-generate=%{fdo_instrument_path}" + flag: "-fno-data-sections" + } + } + provides: "profile" + } + feature { + name: "fdo_optimize" + flag_set { + action: "c-compile" + action: "c++-compile" + flag_group { + flag: "-fprofile-use=%{fdo_profile_path}" + flag: "-Xclang-only=-Wno-profile-instr-unprofiled" + flag: "-Xclang-only=-Wno-profile-instr-out-of-date" + flag: "-fprofile-correction" + } + expand_if_all_available: "fdo_profile_path" + } + provides: "profile" + } + feature { + name: "autofdo" + flag_set { + action: "c-compile" + action: "c++-compile" + flag_group { + flag: "-fauto-profile=%{fdo_profile_path}" + flag: "-fprofile-correction" + } + expand_if_all_available: "fdo_profile_path" + } + provides: "profile" + } + feature { + name: "lipo" + flag_set { + action: "c-compile" + action: "c++-compile" + flag_group { + flag: "-fripa" + } + } + requires { + feature: "autofdo" + } + requires { + feature: "fdo_optimize" + } + requires { + feature: "fdo_instrument" + } + } + feature { name: "coverage" + } + feature { + name: "llvm_coverage_map_format" flag_set { action: "preprocess-assemble" action: "c-compile" action: "c++-compile" - action: "c++-header-parsing" - action: "c++-header-preprocessing" action: "c++-module-compile" action: "objc-compile" action: "objc++-compile" flag_group { flag: "-fprofile-instr-generate" flag: "-fcoverage-mapping" + flag: "-g" } } flag_set { action: "c++-link-interface-dynamic-library" action: "c++-link-dynamic-library" action: "c++-link-executable" + action: "objc-executable" + action: "objc++-executable" flag_group { flag: "-fprofile-instr-generate" } } - provides: "profile" + requires { + feature: "coverage" + } + } + feature { + name: "gcc_coverage_map_format" + flag_set { + action: "preprocess-assemble" + action: "c-compile" + action: "c++-compile" + action: "c++-module-compile" + action: "objc-compile" + action: "objc++-compile" + flag_group { + flag: "-fprofile-arcs" + flag: "-ftest-coverage" + flag: "-g" + } + } + flag_set { + action: "c++-link-interface-dynamic-library" + action: "c++-link-dynamic-library" + action: "c++-link-executable" + flag_group { + flag: "-lgcov" + } + } + requires { + feature: "coverage" + } } feature { name: "apply_default_compiler_flags" @@ -12215,41 +13760,6 @@ toolchain { } } feature { - name: "run_coverage" - } - feature { - name: "llvm_coverage_map_format" - flag_set { - action: "c-compile" - action: "c++-compile" - action: "objc-compile" - action: "objc++-compile" - flag_group { - flag: "-fprofile-instr-generate" - flag: "-fcoverage-mapping" - } - } - requires { - feature: "run_coverage" - } - } - feature { - name: "gcc_coverage_map_format" - flag_set { - action: "c-compile" - action: "c++-compile" - action: "objc-compile" - action: "objc++-compile" - flag_group { - flag: "-fprofile-arcs" - flag: "-ftest-coverage" - } - } - requires { - feature: "run_coverage" - } - } - feature { name: "apply_implicit_frameworks" flag_set { action: "objc-executable" |