aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/build_defs
diff options
context:
space:
mode:
authorGravatar Chris Parsons <cparsons@google.com>2016-09-29 21:55:45 +0000
committerGravatar Yun Peng <pcloudy@google.com>2016-09-30 08:15:01 +0000
commit1eac7e8195158a1b88dd6d1f11e5690ec387e077 (patch)
treedd8082c264e969c6f84ec5d10c6f89cccc29df1a /tools/build_defs
parent29dc3f7dabc24f9e032ffc3602c0f928babdf1ad (diff)
Use minimum OS flags for watchOS and tvOS actions.
Also: - Move minimum os information into AppleConfiguration - Update watchos and tvos minimum version defaulting behavior such that, if unspecified in flags, the minimum OS is equal to the SDK version. - Expose Apple Platform to apple_common in skylark -- MOS_MIGRATED_REVID=134712763
Diffstat (limited to 'tools/build_defs')
-rw-r--r--tools/build_defs/apple/swift.bzl7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/build_defs/apple/swift.bzl b/tools/build_defs/apple/swift.bzl
index 6345f77120..98b6f7e17d 100644
--- a/tools/build_defs/apple/swift.bzl
+++ b/tools/build_defs/apple/swift.bzl
@@ -86,7 +86,12 @@ def _swift_library_impl(ctx):
cpu = apple_fragment.single_arch_cpu
platform = apple_fragment.single_arch_platform
- target_os = ctx.fragments.objc.ios_minimum_os
+ # TODO(cparsons): Remove after blaze release.
+ if hasattr(ctx.fragments.apple, "minimum_os_for_platform_type"):
+ target_os = ctx.fragments.apple.minimum_os_for_platform_type(
+ apple_common.platform_type.ios)
+ else:
+ target_os = ctx.fragments.objc.ios_minimum_os
target = _swift_target(cpu, platform, target_os)
apple_toolchain = apple_common.apple_toolchain()