Bug 1164109 - Target MacOS X 10.7 or later for rust. r=ted
authorRalph Giles <giles@mozilla.com>
Tue, 12 May 2015 14:18:50 -0700
changeset 244900 33e255599053a8fd3fa41a124f9e7e405b3908b9
parent 244899 611907765657cda8176da5447ed5aaa74e3eab20
child 244901 c081648c06e33d9c2d9c0a587fdb83320f231efd
push id28792
push usercbook@mozilla.com
push dateThu, 21 May 2015 12:56:47 +0000
treeherdermozilla-central@e5d4a9bc3e23 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs1164109
milestone41.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 1164109 - Target MacOS X 10.7 or later for rust. r=ted The rust compiler uses thread-local storage features which aren't available on MacOS X 10.6. Until that's worked around or we drop support for 10.6 in Firefox, we'll need to require a higher minimum target version when building rust code.
configure.in
--- a/configure.in
+++ b/configure.in
@@ -461,16 +461,34 @@ case "$target" in
         export MACOSX_DEPLOYMENT_TARGET=10.6
     fi
     ;;
 esac
 
 AC_SUBST(MACOSX_DEPLOYMENT_TARGET)
 
 dnl ========================================================
+dnl Special MacOS X checks
+dnl ========================================================
+
+if test -n "$MACOSX_DEPLOYMENT_TARGET" -a -n "$MOZ_RUST"; then
+  AC_MSG_CHECKING([MacOS X compatibility with rust])
+  # rustc doesn't support MacOS X 10.6 or earlier.
+  # https://github.com/rust-lang/rust/issues/25342
+  _MACOSX_TARGET_MINOR=`echo "$MACOSX_DEPLOYMENT_TARGET" | cut -d. -f2`
+  if test "$_MACOSX_TARGET_MINOR" -lt 7; then
+    AC_MSG_ERROR([rustc does not support MacOS X $MACOSX_DEPLOYMENT_TARGET
+      Add 'ac_add_options --enable-macos-target=10.7' (or later)
+      to mozconfig, or disable rust support.])
+  else
+    AC_MSG_RESULT([$MACOSX_DEPLOYMENT_TARGET is ok])
+  fi
+fi
+
+dnl ========================================================
 dnl Special win32 checks
 dnl ========================================================
 
 # Target the Windows 8.1 SDK by default
 WINSDK_TARGETVER=603
 WINVER=502
 
 MOZ_ARG_WITH_STRING(windows-version,