mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 22:32:46 +00:00
Bug 1926473 - Consider x86_64-apple-ios as a simulator target. r=firefox-build-system-reviewers,sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D226581
This commit is contained in:
parent
d401094841
commit
0750ac3e5a
@ -333,13 +333,20 @@ with only_when(target_is_ios):
|
|||||||
help="Location of platform SDK to use",
|
help="Location of platform SDK to use",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@depends(target)
|
||||||
|
def target_is_ios_simulator(target):
|
||||||
|
# x86_64-apple-ios is simulator
|
||||||
|
# aarch64-apple-ios is iphone
|
||||||
|
# aarch64-apple-ios-sim is simulator
|
||||||
|
return target.cpu == "x86_64" or target.raw_os == "ios-sim"
|
||||||
|
|
||||||
def ios_sdk_min_version():
|
def ios_sdk_min_version():
|
||||||
return "17.4"
|
return "17.4"
|
||||||
|
|
||||||
@depends(target)
|
@depends(target_is_ios_simulator)
|
||||||
def ios_sdk_name(target):
|
def ios_sdk_name(target_is_ios_simulator):
|
||||||
return "iPhone{}{}.sdk".format(
|
return "iPhone{}{}.sdk".format(
|
||||||
"Simulator" if target.raw_os == "ios-sim" else "OS",
|
"Simulator" if target_is_ios_simulator else "OS",
|
||||||
ios_sdk_min_version(),
|
ios_sdk_min_version(),
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -347,15 +354,16 @@ with only_when(target_is_ios):
|
|||||||
"--with-ios-sdk",
|
"--with-ios-sdk",
|
||||||
host,
|
host,
|
||||||
target,
|
target,
|
||||||
|
target_is_ios_simulator,
|
||||||
bootstrap_path(ios_sdk_name, when=depends("--with-ios-sdk")(lambda x: not x)),
|
bootstrap_path(ios_sdk_name, when=depends("--with-ios-sdk")(lambda x: not x)),
|
||||||
)
|
)
|
||||||
@imports(_from="__builtin__", _import="Exception")
|
@imports(_from="__builtin__", _import="Exception")
|
||||||
@imports(_from="os.path", _import="isdir")
|
@imports(_from="os.path", _import="isdir")
|
||||||
@imports(_from="os", _import="listdir")
|
@imports(_from="os", _import="listdir")
|
||||||
def ios_sdk(sdk, host, target, bootstrapped):
|
def ios_sdk(sdk, host, target, target_is_ios_simulator, bootstrapped):
|
||||||
if bootstrapped:
|
if bootstrapped:
|
||||||
sdk = [bootstrapped]
|
sdk = [bootstrapped]
|
||||||
sdk_name = "iphonesimulator" if target.raw_os == "ios-sim" else "iphoneos"
|
sdk_name = "iphonesimulator" if target_is_ios_simulator else "iphoneos"
|
||||||
if sdk:
|
if sdk:
|
||||||
sdk = sdk[0]
|
sdk = sdk[0]
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user