aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/osx/crosstool/CROSSTOOL.tpl
diff options
context:
space:
mode:
authorGravatar hlopko <hlopko@google.com>2017-08-04 15:56:54 +0200
committerGravatar Dmitry Lomov <dslomov@google.com>2017-08-04 17:19:12 +0200
commit2079a5ca8b3adc645a6df1968f1bd616eab010ca (patch)
tree13be6bfe163123051d70a14f9e1604656588cfe7 /tools/osx/crosstool/CROSSTOOL.tpl
parentfe9ba893c0ebec19228086356af5fa8d81f2809b (diff)
Make sure copts is the last feature in osx crosstools
Change https://github.com/bazelbuild/bazel/commit/646cfd81793fc3b87979089aab873310d14e95e6 moved copts to the build variable and in order to keep the ordering of the flags as before the copts feature needs to be the last feature in the toolchain. Osx crosstool generator sometimes appended additional features, that broke this assumption. This cl makes sure copts is the last feature. In addition, flags directly from action_config will be added first, not last as they were before. RELNOTES: Flags from action_config get added first to the command line first, before the flags from features. PiperOrigin-RevId: 164257469
Diffstat (limited to 'tools/osx/crosstool/CROSSTOOL.tpl')
-rw-r--r--tools/osx/crosstool/CROSSTOOL.tpl553
1 files changed, 253 insertions, 300 deletions
diff --git a/tools/osx/crosstool/CROSSTOOL.tpl b/tools/osx/crosstool/CROSSTOOL.tpl
index 5b9d5abf27..668e1c8e6d 100644
--- a/tools/osx/crosstool/CROSSTOOL.tpl
+++ b/tools/osx/crosstool/CROSSTOOL.tpl
@@ -869,23 +869,9 @@ toolchain {
}
feature {
name: "bitcode_embedded"
- flag_set {
- action: "objc-compile"
- action: "objc++-compile"
- flag_group {
- flag: "-fembed-bitcode"
- }
- }
}
feature {
name: "bitcode_embedded_markers"
- flag_set {
- action: "objc-compile"
- action: "objc++-compile"
- flag_group {
- flag: "-fembed-bitcode-marker"
- }
- }
}
feature {
name: "objc_arc"
@@ -1029,24 +1015,7 @@ toolchain {
}
}
feature {
- name: "copts"
- flag_set {
- 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"
- action: "objc-compile"
- action: "objc++-compile"
- flag_group {
- flag: "%{copts}"
- iterate_over: "copts"
- }
- expand_if_all_available: "copts"
- }
+ name: "cpp_linker_flags"
}
feature {
name: "apply_implicit_frameworks"
@@ -1068,6 +1037,32 @@ toolchain {
}
}
}
+ feature {
+ name: "apply_simulator_compiler_flags"
+ }
+ feature {
+ name: "unfiltered_cxx_flags"
+ }
+ feature {
+ name: "copts"
+ flag_set {
+ 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"
+ action: "objc-compile"
+ action: "objc++-compile"
+ flag_group {
+ flag: "%{copts}"
+ iterate_over: "copts"
+ }
+ expand_if_all_available: "copts"
+ }
+ }
action_config {
config_name: "strip"
action_name: "strip"
@@ -2370,23 +2365,9 @@ toolchain {
}
feature {
name: "bitcode_embedded"
- flag_set {
- action: "objc-compile"
- action: "objc++-compile"
- flag_group {
- flag: "-fembed-bitcode"
- }
- }
}
feature {
name: "bitcode_embedded_markers"
- flag_set {
- action: "objc-compile"
- action: "objc++-compile"
- flag_group {
- flag: "-fembed-bitcode-marker"
- }
- }
}
feature {
name: "objc_arc"
@@ -2531,24 +2512,7 @@ toolchain {
}
}
feature {
- name: "copts"
- flag_set {
- 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"
- action: "objc-compile"
- action: "objc++-compile"
- flag_group {
- flag: "%{copts}"
- iterate_over: "copts"
- }
- expand_if_all_available: "copts"
- }
+ name: "cpp_linker_flags"
}
feature {
name: "apply_implicit_frameworks"
@@ -2562,6 +2526,9 @@ toolchain {
}
}
feature {
+ name: "link_cocoa"
+ }
+ feature {
name: "apply_simulator_compiler_flags"
flag_set {
action: "objc-compile"
@@ -2574,6 +2541,29 @@ toolchain {
}
}
}
+ feature {
+ name: "unfiltered_cxx_flags"
+ }
+ feature {
+ name: "copts"
+ flag_set {
+ 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"
+ action: "objc-compile"
+ action: "objc++-compile"
+ flag_group {
+ flag: "%{copts}"
+ iterate_over: "copts"
+ }
+ expand_if_all_available: "copts"
+ }
+ }
action_config {
config_name: "strip"
action_name: "strip"
@@ -3880,23 +3870,9 @@ toolchain {
}
feature {
name: "bitcode_embedded"
- flag_set {
- action: "objc-compile"
- action: "objc++-compile"
- flag_group {
- flag: "-fembed-bitcode"
- }
- }
}
feature {
name: "bitcode_embedded_markers"
- flag_set {
- action: "objc-compile"
- action: "objc++-compile"
- flag_group {
- flag: "-fembed-bitcode-marker"
- }
- }
}
feature {
name: "objc_arc"
@@ -4041,24 +4017,7 @@ toolchain {
}
}
feature {
- name: "copts"
- flag_set {
- 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"
- action: "objc-compile"
- action: "objc++-compile"
- flag_group {
- flag: "%{copts}"
- iterate_over: "copts"
- }
- expand_if_all_available: "copts"
- }
+ name: "cpp_linker_flags"
}
feature {
name: "apply_implicit_frameworks"
@@ -4072,6 +4031,9 @@ toolchain {
}
}
feature {
+ name: "link_cocoa"
+ }
+ feature {
name: "apply_simulator_compiler_flags"
flag_set {
action: "objc-compile"
@@ -4084,6 +4046,29 @@ toolchain {
}
}
}
+ feature {
+ name: "unfiltered_cxx_flags"
+ }
+ feature {
+ name: "copts"
+ flag_set {
+ 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"
+ action: "objc-compile"
+ action: "objc++-compile"
+ flag_group {
+ flag: "%{copts}"
+ iterate_over: "copts"
+ }
+ expand_if_all_available: "copts"
+ }
+ }
action_config {
config_name: "strip"
action_name: "strip"
@@ -5389,23 +5374,9 @@ toolchain {
}
feature {
name: "bitcode_embedded"
- flag_set {
- action: "objc-compile"
- action: "objc++-compile"
- flag_group {
- flag: "-fembed-bitcode"
- }
- }
}
feature {
name: "bitcode_embedded_markers"
- flag_set {
- action: "objc-compile"
- action: "objc++-compile"
- flag_group {
- flag: "-fembed-bitcode-marker"
- }
- }
}
feature {
name: "objc_arc"
@@ -5550,23 +5521,17 @@ toolchain {
}
}
feature {
- name: "copts"
+ name: "cpp_linker_flags"
flag_set {
- 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"
- action: "objc-compile"
- action: "objc++-compile"
+ action: "c++-link-executable"
+ action: "c++-link-dynamic-library"
flag_group {
- flag: "%{copts}"
- iterate_over: "copts"
+ flag: "-lc++"
+ flag: "-undefined"
+ flag: "dynamic_lookup"
+ flag: "-target"
+ flag: "x86_64-apple-tvos"
}
- expand_if_all_available: "copts"
}
}
feature {
@@ -5581,6 +5546,9 @@ toolchain {
}
}
feature {
+ name: "link_cocoa"
+ }
+ feature {
name: "apply_simulator_compiler_flags"
flag_set {
action: "objc-compile"
@@ -5609,17 +5577,23 @@ toolchain {
}
}
feature {
- name: "cpp_linker_flags"
+ name: "copts"
flag_set {
- action: "c++-link-executable"
- action: "c++-link-dynamic-library"
+ 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"
+ action: "objc-compile"
+ action: "objc++-compile"
flag_group {
- flag: "-lc++"
- flag: "-undefined"
- flag: "dynamic_lookup"
- flag: "-target"
- flag: "x86_64-apple-tvos"
+ flag: "%{copts}"
+ iterate_over: "copts"
}
+ expand_if_all_available: "copts"
}
}
action_config {
@@ -6935,23 +6909,9 @@ toolchain {
}
feature {
name: "bitcode_embedded"
- flag_set {
- action: "objc-compile"
- action: "objc++-compile"
- flag_group {
- flag: "-fembed-bitcode"
- }
- }
}
feature {
name: "bitcode_embedded_markers"
- flag_set {
- action: "objc-compile"
- action: "objc++-compile"
- flag_group {
- flag: "-fembed-bitcode-marker"
- }
- }
}
feature {
name: "objc_arc"
@@ -7096,24 +7056,7 @@ toolchain {
}
}
feature {
- name: "copts"
- flag_set {
- 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"
- action: "objc-compile"
- action: "objc++-compile"
- flag_group {
- flag: "%{copts}"
- iterate_over: "copts"
- }
- expand_if_all_available: "copts"
- }
+ name: "cpp_linker_flags"
}
feature {
name: "apply_implicit_frameworks"
@@ -7127,6 +7070,9 @@ toolchain {
}
}
feature {
+ name: "link_cocoa"
+ }
+ feature {
name: "apply_simulator_compiler_flags"
flag_set {
action: "objc-compile"
@@ -7139,6 +7085,29 @@ toolchain {
}
}
}
+ feature {
+ name: "unfiltered_cxx_flags"
+ }
+ feature {
+ name: "copts"
+ flag_set {
+ 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"
+ action: "objc-compile"
+ action: "objc++-compile"
+ flag_group {
+ flag: "%{copts}"
+ iterate_over: "copts"
+ }
+ expand_if_all_available: "copts"
+ }
+ }
action_config {
config_name: "strip"
action_name: "strip"
@@ -8443,23 +8412,9 @@ toolchain {
}
feature {
name: "bitcode_embedded"
- flag_set {
- action: "objc-compile"
- action: "objc++-compile"
- flag_group {
- flag: "-fembed-bitcode"
- }
- }
}
feature {
name: "bitcode_embedded_markers"
- flag_set {
- action: "objc-compile"
- action: "objc++-compile"
- flag_group {
- flag: "-fembed-bitcode-marker"
- }
- }
}
feature {
name: "objc_arc"
@@ -8604,6 +8559,29 @@ toolchain {
}
}
feature {
+ name: "cpp_linker_flags"
+ }
+ feature {
+ name: "apply_implicit_frameworks"
+ flag_set {
+ action: "objc-executable"
+ action: "objc++-executable"
+ flag_group {
+ flag: "-framework Foundation"
+ flag: "-framework UIKit"
+ }
+ }
+ }
+ feature {
+ name: "link_cocoa"
+ }
+ feature {
+ name: "apply_simulator_compiler_flags"
+ }
+ feature {
+ name: "unfiltered_cxx_flags"
+ }
+ feature {
name: "copts"
flag_set {
action: "assemble"
@@ -8623,17 +8601,6 @@ toolchain {
expand_if_all_available: "copts"
}
}
- feature {
- name: "apply_implicit_frameworks"
- flag_set {
- action: "objc-executable"
- action: "objc++-executable"
- flag_group {
- flag: "-framework Foundation"
- flag: "-framework UIKit"
- }
- }
- }
action_config {
config_name: "strip"
action_name: "strip"
@@ -9938,23 +9905,9 @@ toolchain {
}
feature {
name: "bitcode_embedded"
- flag_set {
- action: "objc-compile"
- action: "objc++-compile"
- flag_group {
- flag: "-fembed-bitcode"
- }
- }
}
feature {
name: "bitcode_embedded_markers"
- flag_set {
- action: "objc-compile"
- action: "objc++-compile"
- flag_group {
- flag: "-fembed-bitcode-marker"
- }
- }
}
feature {
name: "objc_arc"
@@ -10099,6 +10052,29 @@ toolchain {
}
}
feature {
+ name: "cpp_linker_flags"
+ }
+ feature {
+ name: "apply_implicit_frameworks"
+ flag_set {
+ action: "objc-executable"
+ action: "objc++-executable"
+ flag_group {
+ flag: "-framework Foundation"
+ flag: "-framework UIKit"
+ }
+ }
+ }
+ feature {
+ name: "link_cocoa"
+ }
+ feature {
+ name: "apply_simulator_compiler_flags"
+ }
+ feature {
+ name: "unfiltered_cxx_flags"
+ }
+ feature {
name: "copts"
flag_set {
action: "assemble"
@@ -10118,17 +10094,6 @@ toolchain {
expand_if_all_available: "copts"
}
}
- feature {
- name: "apply_implicit_frameworks"
- flag_set {
- action: "objc-executable"
- action: "objc++-executable"
- flag_group {
- flag: "-framework Foundation"
- flag: "-framework UIKit"
- }
- }
- }
action_config {
config_name: "strip"
action_name: "strip"
@@ -11432,23 +11397,9 @@ toolchain {
}
feature {
name: "bitcode_embedded"
- flag_set {
- action: "objc-compile"
- action: "objc++-compile"
- flag_group {
- flag: "-fembed-bitcode"
- }
- }
}
feature {
name: "bitcode_embedded_markers"
- flag_set {
- action: "objc-compile"
- action: "objc++-compile"
- flag_group {
- flag: "-fembed-bitcode-marker"
- }
- }
}
feature {
name: "objc_arc"
@@ -11593,23 +11544,17 @@ toolchain {
}
}
feature {
- name: "copts"
+ name: "cpp_linker_flags"
flag_set {
- 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"
- action: "objc-compile"
- action: "objc++-compile"
+ action: "c++-link-executable"
+ action: "c++-link-dynamic-library"
flag_group {
- flag: "%{copts}"
- iterate_over: "copts"
+ flag: "-lc++"
+ flag: "-undefined"
+ flag: "dynamic_lookup"
+ flag: "-target"
+ flag: "arm64-apple-tvos"
}
- expand_if_all_available: "copts"
}
}
feature {
@@ -11624,6 +11569,12 @@ toolchain {
}
}
feature {
+ name: "link_cocoa"
+ }
+ feature {
+ name: "apply_simulator_compiler_flags"
+ }
+ feature {
name: "unfiltered_cxx_flags"
flag_set {
action: "c-compile"
@@ -11639,17 +11590,23 @@ toolchain {
}
}
feature {
- name: "cpp_linker_flags"
+ name: "copts"
flag_set {
- action: "c++-link-executable"
- action: "c++-link-dynamic-library"
+ 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"
+ action: "objc-compile"
+ action: "objc++-compile"
flag_group {
- flag: "-lc++"
- flag: "-undefined"
- flag: "dynamic_lookup"
- flag: "-target"
- flag: "arm64-apple-tvos"
+ flag: "%{copts}"
+ iterate_over: "copts"
}
+ expand_if_all_available: "copts"
}
}
action_config {
@@ -12963,23 +12920,9 @@ toolchain {
}
feature {
name: "bitcode_embedded"
- flag_set {
- action: "objc-compile"
- action: "objc++-compile"
- flag_group {
- flag: "-fembed-bitcode"
- }
- }
}
feature {
name: "bitcode_embedded_markers"
- flag_set {
- action: "objc-compile"
- action: "objc++-compile"
- flag_group {
- flag: "-fembed-bitcode-marker"
- }
- }
}
feature {
name: "objc_arc"
@@ -13124,6 +13067,29 @@ toolchain {
}
}
feature {
+ name: "cpp_linker_flags"
+ }
+ feature {
+ name: "apply_implicit_frameworks"
+ flag_set {
+ action: "objc-executable"
+ action: "objc++-executable"
+ flag_group {
+ flag: "-framework Foundation"
+ flag: "-framework UIKit"
+ }
+ }
+ }
+ feature {
+ name: "link_cocoa"
+ }
+ feature {
+ name: "apply_simulator_compiler_flags"
+ }
+ feature {
+ name: "unfiltered_cxx_flags"
+ }
+ feature {
name: "copts"
flag_set {
action: "assemble"
@@ -13143,17 +13109,6 @@ toolchain {
expand_if_all_available: "copts"
}
}
- feature {
- name: "apply_implicit_frameworks"
- flag_set {
- action: "objc-executable"
- action: "objc++-executable"
- flag_group {
- flag: "-framework Foundation"
- flag: "-framework UIKit"
- }
- }
- }
action_config {
config_name: "strip"
action_name: "strip"
@@ -14462,23 +14417,9 @@ toolchain {
}
feature {
name: "bitcode_embedded"
- flag_set {
- action: "objc-compile"
- action: "objc++-compile"
- flag_group {
- flag: "-fembed-bitcode"
- }
- }
}
feature {
name: "bitcode_embedded_markers"
- flag_set {
- action: "objc-compile"
- action: "objc++-compile"
- flag_group {
- flag: "-fembed-bitcode-marker"
- }
- }
}
feature {
name: "objc_arc"
@@ -14623,6 +14564,29 @@ toolchain {
}
}
feature {
+ name: "cpp_linker_flags"
+ }
+ feature {
+ name: "apply_implicit_frameworks"
+ flag_set {
+ action: "objc-executable"
+ action: "objc++-executable"
+ flag_group {
+ flag: "-framework Foundation"
+ flag: "-framework UIKit"
+ }
+ }
+ }
+ feature {
+ name: "link_cocoa"
+ }
+ feature {
+ name: "apply_simulator_compiler_flags"
+ }
+ feature {
+ name: "unfiltered_cxx_flags"
+ }
+ feature {
name: "copts"
flag_set {
action: "assemble"
@@ -14642,17 +14606,6 @@ toolchain {
expand_if_all_available: "copts"
}
}
- feature {
- name: "apply_implicit_frameworks"
- flag_set {
- action: "objc-executable"
- action: "objc++-executable"
- flag_group {
- flag: "-framework Foundation"
- flag: "-framework UIKit"
- }
- }
- }
action_config {
config_name: "strip"
action_name: "strip"