From d2b6975eb7593a9aece06e880fdd2a18e7005e41 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Wed, 4 Nov 2020 16:24:38 -0500 Subject: Issue #1676 - Part 21: Use js-cxxflags.mozbuild in testing code and js shell --- js/src/gdb/moz.build | 9 ++------- js/src/jsapi-tests/moz.build | 9 ++------- js/src/shell/moz.build | 9 ++------- 3 files changed, 6 insertions(+), 21 deletions(-) (limited to 'js') diff --git a/js/src/gdb/moz.build b/js/src/gdb/moz.build index a2e935624..01f6cb0b6 100644 --- a/js/src/gdb/moz.build +++ b/js/src/gdb/moz.build @@ -5,6 +5,8 @@ GeckoProgram('gdb-tests', linkage=None) +include('../js-cxxflags.mozbuild') + UNIFIED_SOURCES += [ 'gdb-tests.cpp', 'tests/test-asmjs.cpp', @@ -40,13 +42,6 @@ if CONFIG['MOZ_ICU_DATA_ARCHIVE']: OS_LIBS += CONFIG['MOZ_ZLIB_LIBS'] -if CONFIG['GNU_CXX']: - CXXFLAGS += ['-Wno-shadow', '-fno-strict-aliasing'] - -# This is intended as a temporary workaround to enable VS2015. -if CONFIG['_MSC_VER']: - CXXFLAGS += ['-wd4312'] - DEFINES['topsrcdir'] = '%s/js/src' % TOPSRCDIR FINAL_TARGET_PP_FILES += ['gdb-tests-gdb.py.in'] OBJDIR_FILES.js.src.gdb += ['!/dist/bin/gdb-tests-gdb.py'] diff --git a/js/src/jsapi-tests/moz.build b/js/src/jsapi-tests/moz.build index 378b2ed7f..35bc69b85 100644 --- a/js/src/jsapi-tests/moz.build +++ b/js/src/jsapi-tests/moz.build @@ -3,6 +3,8 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. +include(../js-cxxflags.mozbuild) + GeckoProgram('jsapi-tests', linkage=None) UNIFIED_SOURCES += [ @@ -142,12 +144,5 @@ USE_LIBS += [ OS_LIBS += CONFIG['MOZ_ZLIB_LIBS'] -if CONFIG['GNU_CXX']: - CXXFLAGS += ['-Wno-shadow', '-Werror=format', '-fno-strict-aliasing'] - -# This is intended as a temporary workaround to enable VS2015. -if CONFIG['_MSC_VER']: - CXXFLAGS += ['-wd4312'] - DEFINES['topsrcdir'] = '%s/js/src' % TOPSRCDIR OBJDIR_PP_FILES.js.src['jsapi-tests'] += ['jsapi-tests-gdb.py.in'] diff --git a/js/src/shell/moz.build b/js/src/shell/moz.build index 7c861fb0d..93812da74 100644 --- a/js/src/shell/moz.build +++ b/js/src/shell/moz.build @@ -3,6 +3,8 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. +include('../js-cxxflags.mozbuild') + if CONFIG['JS_SHELL_NAME']: GeckoProgram(CONFIG['JS_SHELL_NAME'], linkage=None) if CONFIG['JS_BUNDLED_EDITLINE']: @@ -49,13 +51,6 @@ shellmoduleloader.inputs = [ 'ModuleLoader.js', ] -if CONFIG['GNU_CXX']: - CXXFLAGS += ['-Wno-shadow', '-Werror=format'] - -# This is intended as a temporary workaround to enable VS2015. -if CONFIG['_MSC_VER']: - CXXFLAGS += ['-wd4312'] - # Place a GDB Python auto-load file next to the shell executable, both in # the build directory and in the dist/bin directory. DEFINES['topsrcdir'] = '%s/js/src' % TOPSRCDIR -- cgit v1.2.3