Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unnecessary macOS crosstool branches #13499

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
109 changes: 34 additions & 75 deletions tools/osx/crosstool/cc_toolchain_config.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -843,28 +843,24 @@ 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 = [
flag_set(
actions = [
ACTION_NAMES.c_compile,
ACTION_NAMES.cpp_compile,
ACTION_NAMES.cpp_module_compile,
ACTION_NAMES.cpp_header_parsing,
ACTION_NAMES.assemble,
ACTION_NAMES.preprocess_assemble,
],
flag_groups = [
flag_group(flags = ["-no-canonical-prefixes", "-pthread"]),
],
),
],
)
else:
unfiltered_cxx_flags_feature = feature(name = "unfiltered_cxx_flags")
unfiltered_cxx_flags_feature = feature(
name = "unfiltered_cxx_flags",
flag_sets = [
flag_set(
actions = [
ACTION_NAMES.c_compile,
ACTION_NAMES.cpp_compile,
ACTION_NAMES.cpp_module_compile,
ACTION_NAMES.cpp_header_parsing,
ACTION_NAMES.assemble,
ACTION_NAMES.preprocess_assemble,
],
flag_groups = [
flag_group(flags = ["-no-canonical-prefixes", "-pthread"]),
],
),
],
)

compiler_input_flags_feature = feature(
name = "compiler_input_flags",
Expand Down Expand Up @@ -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"],
Copy link
Member Author

@keith keith May 21, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not 100% sure on this one leaving out the -target flag, we'll see what CI thinks

),
],
),
],
)
else:
default_link_flags_feature = feature(
name = "default_link_flags",
Expand Down Expand Up @@ -2093,42 +2072,22 @@ def _impl(ctx):
],
)

if (ctx.attr.cpu == "tvos_arm64"):
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", "arm64-apple-tvos"],
),
],
),
],
)
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")
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", target_system_name],
),
],
),
],
)

exclude_private_headers_in_module_maps_feature = feature(name = "exclude_private_headers_in_module_maps")

Expand Down