Skip to content

Commit

Permalink
Remove mac_sdk_min_build_override.
Browse files Browse the repository at this point in the history
All projects that need to change the default mac min SDK now directly do so via
a GN arg.

Bug: chromium:740693
Change-Id: I99f04d482177e6ec8a5d1306f68cb2410b0beb0e
Reviewed-on: https://chromium-review.googlesource.com/566078
Commit-Queue: Erik Chen <erikchen@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#486514}
  • Loading branch information
erikchen authored and Commit Bot committed Jul 13, 2017
1 parent f889f44 commit 2820caa
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 20 deletions.
4 changes: 2 additions & 2 deletions build/config/mac/mac_sdk.gni
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ xcode_version = _mac_sdk_result.xcode_version
xcode_build = _mac_sdk_result.xcode_build
machine_os_build = _mac_sdk_result.machine_os_build

if (mac_sdk_version != mac_sdk_min_build_override &&
if (mac_sdk_version != mac_sdk_min &&
exec_script("//build/check_return_value.py",
[
"test",
Expand All @@ -89,7 +89,7 @@ if (mac_sdk_version != mac_sdk_min_build_override &&
print(
" either upgrade Xcode to the latest version or install the Mac OS X")
print(
" $mac_sdk_min_build_override SDK. For more information, see https://crbug.com/620127.")
" $mac_sdk_min SDK. For more information, see https://crbug.com/620127.")
print()
print(" Current SDK Version: $mac_sdk_version")
print(" Current Xcode Version: $xcode_version ($xcode_build)")
Expand Down
14 changes: 7 additions & 7 deletions build/config/mac/mac_sdk_overrides.gni
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
# This file contains arguments that subprojects may choose to override. It
# asserts that those overrides are used, to prevent unused args warnings.

# See https://bugs.chromium.org/p/webrtc/issues/detail?id=5453.
# We can drop the rtc_require_mac_10_7_deployment flag when Chromium
# also requires a 10.7 deployment target.
import("//build_overrides/build.gni")

_sdk_min_from_env = getenv("FORCE_MAC_SDK_MIN")
declare_args() {
# Minimum supported version of the Mac SDK.
mac_sdk_min = mac_sdk_min_build_override
if (_sdk_min_from_env == "") {
mac_sdk_min = "10.10"
} else {
mac_sdk_min = _sdk_min_from_env
}
}

# Always assert that mac_sdk_min is used on non-macOS platforms to prevent
# unused args warnings.
if (!is_mac) {
assert(mac_sdk_min == mac_sdk_min_build_override || true)
assert(mac_sdk_min == "10.10" || true)
}
11 changes: 0 additions & 11 deletions build_overrides/build.gni
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,6 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

# Several dependencies of Chrome require a different min sdk when built
# as stand-alone projects. If this is ever not the case, these variables
# can be removed.
# See https://bugs.chromium.org/p/webrtc/issues/detail?id=5453.
_sdk_min_from_env = getenv("FORCE_MAC_SDK_MIN")
if (_sdk_min_from_env == "") {
mac_sdk_min_build_override = "10.10"
} else {
mac_sdk_min_build_override = _sdk_min_from_env
}

# Variable that can be used to support multiple build scenarios, like having
# Chromium specific targets in a client project's GN file etc.
build_with_chromium = true
Expand Down

0 comments on commit 2820caa

Please sign in to comment.