Remove unnecessary macOS crosstool branches
None of these features are exclusive to the cpus they were limited to
Closes
@@ -843,8 +843,6 @@ def _impl(ctx):
],
)
- if (ctx.attr.cpu == "tvos_arm64" or
- ctx.attr.cpu == "tvos_x86_64"):
unfiltered_cxx_flags_feature = feature(
name = "unfiltered_cxx_flags",
flag_sets = [
@@ -863,8 +861,6 @@ def _impl(ctx):
),
],
)
- else:
- unfiltered_cxx_flags_feature = feature(name = "unfiltered_cxx_flags")
compiler_input_flags_feature = feature(
name = "compiler_input_flags",
@@ -1132,23 +1128,6 @@ def _impl(ctx):
),
],
)
- elif (ctx.attr.cpu == "watchos_arm64_32" or
- ctx.attr.cpu == "watchos_x86_64"):
- default_link_flags_feature = feature(
- name = "default_link_flags",
- enabled = True,
- flag_sets = [
- flag_set(
- actions = all_link_actions +
- ["objc-executable", "objc++-executable"],
- flag_groups = [
- flag_group(
- flags = ["-no-canonical-prefixes"],
- ),
- ],
- ),
- ],
- )
else:
default_link_flags_feature = feature(
name = "default_link_flags",
@@ -2093,7 +2072,6 @@ def _impl(ctx):
],
)
- if (ctx.attr.cpu == "tvos_arm64"):
cpp_linker_flags_feature = feature(
name = "cpp_linker_flags",
flag_sets = [
@@ -2104,31 +2082,12 @@ def _impl(ctx):
],
flag_groups = [
flag_group(
- flags = ["-lc++", "-target", "arm64-apple-tvos"],
+ flags = ["-lc++", "-target", target_system_name],
),
],
),
],
)
- elif (ctx.attr.cpu == "tvos_x86_64"):
- cpp_linker_flags_feature = feature(
- name = "cpp_linker_flags",
- flag_sets = [
- flag_set(
- actions = [
- ACTION_NAMES.cpp_link_executable,
- ACTION_NAMES.cpp_link_dynamic_library,
- ],
- flag_groups = [
- flag_group(
- flags = ["-lc++", "-target", "x86_64-apple-tvos"],
- ),
- ],
- ),
- ],
- )
- else:
- cpp_linker_flags_feature = feature(name = "cpp_linker_flags")
exclude_private_headers_in_module_maps_feature = feature(name = "exclude_private_headers_in_module_maps")
