From 235e76b0e756d05599a6cbe1663ff8e13df84a86 Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Thu, 28 Feb 2019 16:46:01 -0800 Subject: [PATCH] Reorganize version_min osx feature The watchOS platforms weren't grouped together, and this placeholder appears to not be handled Closes #7544. PiperOrigin-RevId: 236222586 --- .../osx/crosstool/cc_toolchain_config.bzl.tpl | 36 +++---------------- 1 file changed, 5 insertions(+), 31 deletions(-) diff --git a/tools/osx/crosstool/cc_toolchain_config.bzl.tpl b/tools/osx/crosstool/cc_toolchain_config.bzl.tpl index bc6d49b49e8f0a..0a1d49986dd169 100644 --- a/tools/osx/crosstool/cc_toolchain_config.bzl.tpl +++ b/tools/osx/crosstool/cc_toolchain_config.bzl.tpl @@ -3619,35 +3619,9 @@ def _impl(ctx): ], ) - if (ctx.attr.cpu == "armeabi-v7a" - or ctx.attr.cpu == "watchos_arm64_32" - or ctx.attr.cpu == "watchos_x86_64"): - version_min_feature = feature( - name = "version_min", - flag_sets = [ - flag_set( - actions = [ - "objc-executable", - "objc++-executable", - ACTION_NAMES.cpp_link_executable, - ACTION_NAMES.cpp_link_dynamic_library, - ACTION_NAMES.cpp_link_nodeps_dynamic_library, - ACTION_NAMES.preprocess_assemble, - ACTION_NAMES.c_compile, - ACTION_NAMES.cpp_compile, - ACTION_NAMES.cpp_header_parsing, - ACTION_NAMES.cpp_module_compile, - ACTION_NAMES.objc_compile, - ACTION_NAMES.objcpp_compile, - ], - flag_groups = [ - flag_group( - flags = ["-m-version-min=%{version_min}"], - ), - ], - ), - ], - ) + if ctx.attr.cpu == "armeabi-v7a": + # This stub doesn't have a sensible value for this feature + version_min_feature = feature(name = "version_min") elif (ctx.attr.cpu == "ios_i386" or ctx.attr.cpu == "ios_x86_64"): version_min_feature = feature( @@ -3732,7 +3706,7 @@ def _impl(ctx): ), ], ) - elif (ctx.attr.cpu == "watchos_i386"): + elif (ctx.attr.cpu == "watchos_i386" or ctx.attr.cpu == "watchos_x86_64"): version_min_feature = feature( name = "version_min", flag_sets = [ @@ -3759,7 +3733,7 @@ def _impl(ctx): ), ], ) - elif (ctx.attr.cpu == "watchos_armv7k"): + elif (ctx.attr.cpu == "watchos_armv7k" or ctx.attr.cpu == "watchos_arm64_32"): version_min_feature = feature( name = "version_min", flag_sets = [