зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1604814 - change the OS X SDK headers check to only run on OS X; r=rstewart
The doubling of `when` is needed: the `try_run` when ensures that we only execute the compiler on OS X, and the `@depends` when ensures that we don't look at the `None` result (which would normally indicate failure) on non-OS X hosts. Differential Revision: https://phabricator.services.mozilla.com/D57636 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
0e0d7f71a9
Коммит
8058ebbc5b
|
@ -1180,13 +1180,21 @@ include('compile-checks.configure')
|
|||
include('arm.configure', when=depends(target.cpu)(lambda cpu: cpu == 'arm'))
|
||||
|
||||
|
||||
@depends(host,
|
||||
host_os_kernel_major_version,
|
||||
target,
|
||||
cxx_compiler.try_run(header='#include_next <inttypes.h>'))
|
||||
def check_have_mac_10_14_sdk(host, version, target, value):
|
||||
@depends(host, host_os_kernel_major_version, target)
|
||||
def needs_macos_sdk_headers_check(host, version, target):
|
||||
# Only an issue on Mac OS X 10.14 (and probably above).
|
||||
if host.kernel != 'Darwin' or target.kernel !='Darwin' or version < '18' or value:
|
||||
if host.kernel != 'Darwin' or target.kernel !='Darwin' or version < '18':
|
||||
return
|
||||
|
||||
return True
|
||||
|
||||
|
||||
@depends(cxx_compiler.try_run(header='#include_next <inttypes.h>',
|
||||
check_msg='for macOS SDK headers',
|
||||
when=needs_macos_sdk_headers_check),
|
||||
when=needs_macos_sdk_headers_check)
|
||||
def check_have_mac_10_14_sdk(value):
|
||||
if value:
|
||||
return
|
||||
|
||||
die('System inttypes.h not found. Please try running '
|
||||
|
|
Загрузка…
Ссылка в новой задаче