Bug 1422607 - move PREPROCESS_OPTION to moz.configure; r=chmanchester
authorNathan Froyd <froydnj@mozilla.com>
Mon, 04 Dec 2017 08:14:06 -0500
changeset 394869 67f7f688f2c70b59c50ef8f038a8cec5d8c5c7ce
parent 394868 fccaa1cbc6c6abfc05c05971750618d7be75f619
child 394870 d4d0410db8209793f1d9ee45f580ac9cc83b03a8
push id33020
push userbtara@mozilla.com
push dateMon, 04 Dec 2017 20:21:20 +0000
treeherdermozilla-central@7d191882de19 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerschmanchester
bugs1422607
milestone59.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 1422607 - move PREPROCESS_OPTION to moz.configure; r=chmanchester
build/moz.configure/toolchain.configure
js/src/old-configure.in
old-configure.in
--- a/build/moz.configure/toolchain.configure
+++ b/build/moz.configure/toolchain.configure
@@ -1251,16 +1251,29 @@ def pgo_flags(compiler):
         )
 
 
 set_config('PROFILE_GEN_CFLAGS', pgo_flags.gen_cflags)
 set_config('PROFILE_GEN_LDFLAGS', pgo_flags.gen_ldflags)
 set_config('PROFILE_USE_CFLAGS', pgo_flags.use_cflags)
 set_config('PROFILE_USE_LDFLAGS', pgo_flags.use_ldflags)
 
+
+@depends(c_compiler)
+def preprocess_option(compiler):
+    # The uses of PREPROCESS_OPTION depend on the spacing for -o/-Fi.
+    if compiler.type in ('gcc', 'clang'):
+        return '-E -o '
+    else:
+        return '-P -Fi'
+
+
+set_config('PREPROCESS_OPTION', preprocess_option)
+
+
 # We only want to include windows.configure when we are compiling on
 # Windows, for Windows.
 
 
 @depends(target, host)
 def is_windows(target, host):
     return host.kernel == 'WINNT' and target.kernel == 'WINNT'
 
--- a/js/src/old-configure.in
+++ b/js/src/old-configure.in
@@ -1919,28 +1919,16 @@ if test "$MOZ_DEBUG"; then
 fi
 
 AC_SUBST(MOZ_DEV_EDITION)
 if test -n "$MOZ_DEV_EDITION"; then
     AC_DEFINE(MOZ_DEV_EDITION)
 fi
 
 dnl ========================================================
-dnl Determine options to use for running the preprocessor.
-dnl ========================================================
-
-if test -z "$GNU_CC" -a "$OS_ARCH" = "WINNT"; then
-    PREPROCESS_OPTION="-P -Fi"
-else
-    PREPROCESS_OPTION="-E -o "
-fi
-
-AC_SUBST(PREPROCESS_OPTION)
-
-dnl ========================================================
 dnl JavaScript shell
 dnl ========================================================
 
 MOZ_CHECK_ALLOCATOR
 
 AC_CHECK_FUNCS(setlocale localeconv)
 
 AC_SUBST(MOZILLA_VERSION)
--- a/old-configure.in
+++ b/old-configure.in
@@ -4970,28 +4970,16 @@ HAVE_STATVFS
 HAVE_STATFS64
 HAVE_STATFS
 HAVE_SYS_STATVFS_H
 HAVE_SYS_STATFS_H
 HAVE_SYS_VFS_H
 HAVE_SYS_MOUNT_H
 "
 
-dnl ========================================================
-dnl Determine options to use for running the preprocessor.
-dnl ========================================================
-
-if test -z "$GNU_CC" -a "$OS_ARCH" = "WINNT"; then
-    PREPROCESS_OPTION="-P -Fi"
-else
-    PREPROCESS_OPTION="-E -o "
-fi
-
-AC_SUBST(PREPROCESS_OPTION)
-
 # Avoid using obsolete NSPR features
 AC_DEFINE(NO_NSPR_10_SUPPORT)
 
 # Don't build NSS libpkix
 NSS_DISABLE_LIBPKIX=1
 AC_SUBST(NSS_DISABLE_LIBPKIX)
 
 MOZ_CREATE_CONFIG_STATUS()