Bug 1495672 - Block configure if the Mac OS X headers are not installed on 10.14. r=froydnj
authorMark Banner <standard8@mozilla.com>
Thu, 25 Apr 2019 16:27:18 +0000
changeset 530162 04e6c1201e2ac5f7c3ddc42dace8d8963e609fff
parent 530161 1b8a2f9ec207342c854be793c3202908414d108e
child 530163 d6c676a1ef3e239e66e71b31e1d6570efa52df2d
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1495672
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1495672 - Block configure if the Mac OS X headers are not installed on 10.14. r=froydnj Differential Revision: https://phabricator.services.mozilla.com/D28817
build/moz.configure/toolchain.configure
--- a/build/moz.configure/toolchain.configure
+++ b/build/moz.configure/toolchain.configure
@@ -1181,16 +1181,29 @@ def msvs_version(info):
 
 
 set_config('MSVS_VERSION', msvs_version)
 
 include('compile-checks.configure')
 include('arm.configure', when=depends(target.cpu)(lambda cpu: cpu == 'arm'))
 
 
+@depends(host,
+         host_os_kernel_major_version,
+         cxx_compiler.try_run(header='#include_next <inttypes.h>'))
+def check_have_mac_10_14_sdk(host, version, value):
+    # Only an issue on Mac OS X 10.14 (and probably above).
+    if host.kernel != 'Darwin' or version < '18' or value:
+        return
+
+    die('System inttypes.h not found. Please try running '
+         '`open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg` '
+         'and following the instructions to install the necessary headers')
+
+
 @depends(have_64_bit,
          try_compile(body='static_assert(sizeof(void *) == 8, "")',
                      check_msg='for 64-bit OS'))
 def check_have_64_bit(have_64_bit, compiler_have_64_bit):
     if have_64_bit != compiler_have_64_bit:
         configure_error('The target compiler does not agree with configure '
                         'about the target bitness.')