Bug 1489698 - Cleanup CXXFLAGS in js/src/moz.build. r=froydnj
authorTed Campbell <tcampbell@mozilla.com>
Fri, 07 Sep 2018 18:07:44 -0400
changeset 493040 caa56a2cab83b62b722dbbd1191f759d87d2850a
parent 493039 80c1f51adc77306086ed3cc6e97da9eede4e379b
child 493041 6a27ee7d892bbc85ce8b2223724929ce783c5a76
push id9984
push userffxbld-merge
push dateMon, 15 Oct 2018 21:07:35 +0000
treeherdermozilla-beta@183d27ea8570 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1489698
milestone64.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 1489698 - Cleanup CXXFLAGS in js/src/moz.build. r=froydnj - Remove CFLAGS definitions since we don't build any non-C++. They were misleading cruft, particularly references to fp:precise. - Split fno-strict-aliasing from warnings list to make it clearer. MozReview-Commit-ID: JND7TULAzLc
js/src/moz.build
--- a/js/src/moz.build
+++ b/js/src/moz.build
@@ -746,35 +746,31 @@ DEFINES['EXPORT_JS_API'] = True
 
 if CONFIG['JS_HAS_CTYPES']:
     DEFINES['JS_HAS_CTYPES'] = True
 
 if CONFIG['MOZ_LINKER']:
     DEFINES['MOZ_LINKER'] = True
 
 if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
-    # Prevent floating point errors caused by VC++ optimizations
-    # XXX We should add this to CXXFLAGS, too?
-    CFLAGS += ['-fp:precise']
     # C4805 warns mixing bool with other integral types in computation.
     # But given the conversion from bool is specified, and this is a
     # pattern widely used in code in js/src, suppress this warning here.
     CXXFLAGS += ['-wd4805']
     # C4661 ("no suitable definition provided for explicit template
     # instantiation request") is emitted for all Parser methods that
     # have a Parser<FullParseHandler> definition but no
     # Parser<SyntaxParseHandler> definition, see bug 1167030.
     CXXFLAGS += ['-wd4661']
     # FIXME: unary minus operator applied to unsigned type (bug 1229189)
     CXXFLAGS += ['-wd4146']
     # FIXME: 'operation' : conversion from 'type1' to 'type2' of
     # greater size (bug 1259304)
     CXXFLAGS += ['-wd4312']
 
-CFLAGS += CONFIG['MOZ_ICU_CFLAGS']
 CXXFLAGS += CONFIG['MOZ_ICU_CFLAGS']
 
 # Prepare self-hosted JS code for embedding
 GENERATED_FILES += [('selfhosted.out.h', 'selfhosted.js')]
 selfhosted = GENERATED_FILES[('selfhosted.out.h', 'selfhosted.js')]
 selfhosted.script = 'builtin/embedjs.py:generate_selfhosted'
 selfhosted.inputs = [
     'js.msg',
@@ -819,19 +815,20 @@ selfhosted.inputs = [
 if CONFIG['JS_HAS_CTYPES']:
     if CONFIG['MOZ_SYSTEM_FFI']:
         CXXFLAGS += CONFIG['MOZ_FFI_CFLAGS']
     else:
         # Windows needs this to be linked with a static library.
         DEFINES['FFI_BUILDING'] = True
 
 if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
+    CXXFLAGS += ['-Wno-shadow', '-Werror=format']
     # Also disable strict-aliasing for GCC compiler, that is enabled by default
     # starting with version 7.1, see Bug 1363009
-    CXXFLAGS += ['-Wno-shadow', '-Werror=format', '-fno-strict-aliasing']
+    CXXFLAGS += ['-fno-strict-aliasing']
 
 # Suppress warnings in third-party code.
 if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     SOURCES['util/DoubleToString.cpp'].flags += ['-Wno-implicit-fallthrough']
 
 # Generate GC statistics phase data.
 GENERATED_FILES += ['gc/StatsPhasesGenerated.h']
 StatsPhasesGeneratedHeader = GENERATED_FILES['gc/StatsPhasesGenerated.h']