From 395ef79b913ca414e9f69bdfd40662e3a73973e8 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Tue, 3 Nov 2020 14:19:03 -0500 Subject: Issue #1676 - Part 1: Split MozTesting directives out of js/src/moz.build --- js/src/js-testing.mozbuild | 48 ++++++++++++++++++++++++++++++++++++++++++++++ js/src/moz.build | 46 +------------------------------------------- 2 files changed, 49 insertions(+), 45 deletions(-) create mode 100644 js/src/js-testing.mozbuild (limited to 'js') diff --git a/js/src/js-testing.mozbuild b/js/src/js-testing.mozbuild new file mode 100644 index 000000000..a880d9831 --- /dev/null +++ b/js/src/js-testing.mozbuild @@ -0,0 +1,48 @@ +# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- +# This Source Code Form is subject to the terms of the Mozilla Public +# 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/. + +component_engine = ('Core', 'JavaScript Engine') +component_gc = ('Core', 'JavaScript: GC') +component_intl = ('Core', 'JavaScript: Internationalization API') +component_jit = ('Core', 'JavaScript Engine: JIT') +component_stl = ('Core', 'JavaScript: Standard Library') + +with Files('../public/**'): + BUG_COMPONENT = component_engine +with Files('*'): + BUG_COMPONENT = component_engine + +with Files('wasm/**'): + BUG_COMPONENT = component_jit +with Files('builtin/**'): + BUG_COMPONENT = component_stl +with Files('ctypes/**'): + BUG_COMPONENT = ('Core', 'js-ctypes') +with Files('gc/**'): + BUG_COMPONENT = component_gc +with Files('jit/**'): + BUG_COMPONENT = component_jit + +# File-specific metadata +for gcfile in ['jsgc*', 'devtools/rootAnalysis', 'devtools/gc-ubench', 'devtools/gctrace']: + with Files(gcfile): + BUG_COMPONENT = component_gc +for header in ('GCAnnotations.h', 'GCAPI.h', 'HeapAPI.h', 'RootingAPI.h', 'SliceBudget.h', 'SweepingAPI.h', 'TraceKind.h', 'TracingAPI.h', 'WeakMapPtr.h'): + with Files('../public/' + header): + BUG_COMPONENT = component_gc + +for stlfile in ['jsarray.*', 'jsbool*', 'jsdate.*', 'jsnum.*', 'json.*', 'jsstr.*']: + with Files(stlfile): + BUG_COMPONENT = component_stl + +with Files('builtin/Intl*'): + BUG_COMPONENT = component_intl +with Files('builtin/make_intl_data.py'): + BUG_COMPONENT = component_intl + +with Files('../public/TrackedOptimizationInfo.h'): + BUG_COMPONENT = component_jit + +TEST_DIRS += ['jsapi-tests', 'tests', 'gdb'] \ No newline at end of file diff --git a/js/src/moz.build b/js/src/moz.build index 46a44603e..c8988fafc 100644 --- a/js/src/moz.build +++ b/js/src/moz.build @@ -3,60 +3,16 @@ # 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/. -# Directory metadata -component_engine = ('Core', 'JavaScript Engine') -component_gc = ('Core', 'JavaScript: GC') -component_intl = ('Core', 'JavaScript: Internationalization API') -component_jit = ('Core', 'JavaScript Engine: JIT') -component_stl = ('Core', 'JavaScript: Standard Library') +include('js-testing.mozbuild') FILES_PER_UNIFIED_FILE = 6 -with Files('../public/**'): - BUG_COMPONENT = component_engine -with Files('*'): - BUG_COMPONENT = component_engine - -with Files('wasm/**'): - BUG_COMPONENT = component_jit -with Files('builtin/**'): - BUG_COMPONENT = component_stl -with Files('ctypes/**'): - BUG_COMPONENT = ('Core', 'js-ctypes') -with Files('gc/**'): - BUG_COMPONENT = component_gc -with Files('jit/**'): - BUG_COMPONENT = component_jit - -# File-specific metadata -for gcfile in ['jsgc*', 'devtools/rootAnalysis', 'devtools/gc-ubench', 'devtools/gctrace']: - with Files(gcfile): - BUG_COMPONENT = component_gc -for header in ('GCAnnotations.h', 'GCAPI.h', 'HeapAPI.h', 'RootingAPI.h', 'SliceBudget.h', 'SweepingAPI.h', 'TraceKind.h', 'TracingAPI.h', 'WeakMapPtr.h'): - with Files('../public/' + header): - BUG_COMPONENT = component_gc - -for stlfile in ['jsarray.*', 'jsbool*', 'jsdate.*', 'jsnum.*', 'json.*', 'jsstr.*']: - with Files(stlfile): - BUG_COMPONENT = component_stl - -with Files('builtin/Intl*'): - BUG_COMPONENT = component_intl -with Files('builtin/make_intl_data.py'): - BUG_COMPONENT = component_intl - -with Files('../public/TrackedOptimizationInfo.h'): - BUG_COMPONENT = component_jit - - if CONFIG['JS_BUNDLED_EDITLINE']: DIRS += ['editline'] if not CONFIG['JS_DISABLE_SHELL']: DIRS += ['shell'] -TEST_DIRS += ['jsapi-tests', 'tests', 'gdb'] - CONFIGURE_SUBST_FILES += [ 'devtools/rootAnalysis/Makefile', 'js-config', -- cgit v1.2.3 From 5bf19933d83d4c018eb222d2fd7b13c0e9df3c5f Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Tue, 3 Nov 2020 14:20:26 -0500 Subject: Issue #1676 - Part 2: Split CFLAGS and CXXFLAGS directives out of js/src/moz.build --- js/src/js-cxxflags.mozbuild | 42 ++++++++++++++++++++++++++++++++++++++++++ js/src/moz.build | 37 +++---------------------------------- 2 files changed, 45 insertions(+), 34 deletions(-) create mode 100644 js/src/js-cxxflags.mozbuild (limited to 'js') diff --git a/js/src/js-cxxflags.mozbuild b/js/src/js-cxxflags.mozbuild new file mode 100644 index 000000000..3cab923f1 --- /dev/null +++ b/js/src/js-cxxflags.mozbuild @@ -0,0 +1,42 @@ +# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- +# This Source Code Form is subject to the terms of the Mozilla Public +# 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/. + +CFLAGS += CONFIG['MOZ_ICU_CFLAGS'] +CXXFLAGS += CONFIG['MOZ_ICU_CFLAGS'] + +if CONFIG['_MSC_VER']: + # Prevent floating point errors caused by VC++ optimizations + CFLAGS += ['-fp:precise'] + CXXFLAGS += ['-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 definition but no + # Parser definition, see bug 1167030. + CXXFLAGS += ['-wd4661', '-we4067', '-we4258', '-we4275'] + CXXFLAGS += ['-wd4146'] # FIXME: unary minus operator applied to unsigned type (bug 1229189) + + # This is intended as a temporary hack to support building with VS2015. + # 'noexcept' used with no exception handling mode specified; + # termination on exception is not guaranteed. Specify /EHsc + CXXFLAGS += ['-wd4577', '-wd4312'] + +if CONFIG['GNU_CXX']: + # Disable strict-aliasing for GCC, which is enabled by default + # starting with version 7.1, see Mozilla bug 1363009. + CXXFLAGS += ['-Wno-shadow', '-Werror=format', '-fno-strict-aliasing'] + +if CONFIG['JS_HAS_CTYPES'] and CONFIG['MOZ_SYSTEM_FFI']: + CXXFLAGS += CONFIG['MOZ_FFI_CFLAGS'] + +if CONFIG['JS_CODEGEN_ARM'] and CONFIG['JS_SIMULATOR_ARM']: + # Configuration used only for testing. + if CONFIG['OS_ARCH'] == 'Linux' or CONFIG['OS_ARCH'] == 'Darwin': + CXXFLAGS += [ '-msse2', '-mfpmath=sse' ] \ No newline at end of file diff --git a/js/src/moz.build b/js/src/moz.build index c8988fafc..09e471416 100644 --- a/js/src/moz.build +++ b/js/src/moz.build @@ -3,6 +3,7 @@ # 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') include('js-testing.mozbuild') FILES_PER_UNIFIED_FILE = 6 @@ -446,9 +447,6 @@ elif CONFIG['JS_CODEGEN_ARM']: UNIFIED_SOURCES += [ 'jit/arm/Simulator-arm.cpp' ] - # Configuration used only for testing. - if CONFIG['OS_ARCH'] == 'Linux' or CONFIG['OS_ARCH'] == 'Darwin': - CXXFLAGS += [ '-msse2', '-mfpmath=sse' ] elif CONFIG['OS_ARCH'] == 'Darwin': SOURCES += [ 'jit/arm/llvm-compiler-rt/arm/aeabi_idivmod.S', @@ -641,26 +639,6 @@ if CONFIG['_MSC_VER']: SOURCES['builtin/RegExp.cpp'].no_pgo = True # Bug 772303 elif CONFIG['CPU_ARCH'] == 'x86_64' and CONFIG['JS_HAS_CTYPES']: SOURCES['ctypes/CTypes.cpp'].no_pgo = True # Bug 810661 - # Prevent floating point errors caused by VC++ optimizations - CFLAGS += ['-fp:precise'] - CXXFLAGS += ['-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 definition but no - # Parser definition, see bug 1167030. - CXXFLAGS += ['-wd4661'] - CXXFLAGS += ['-we4067', '-we4258', '-we4275'] - CXXFLAGS += ['-wd4146'] # FIXME: unary minus operator applied to unsigned type (bug 1229189) - - # This is intended as a temporary hack to support building with VS2015. - # 'noexcept' used with no exception handling mode specified; - # termination on exception is not guaranteed. Specify /EHsc - CXXFLAGS += ['-wd4577'] - CXXFLAGS += ['-wd4312'] if CONFIG['OS_ARCH'] not in ('WINNT'): OS_LIBS += [ @@ -687,9 +665,6 @@ if CONFIG['OS_ARCH'] == 'SunOS': OS_LIBS += CONFIG['REALTIME_LIBS'] -CFLAGS += CONFIG['MOZ_ICU_CFLAGS'] -CXXFLAGS += CONFIG['MOZ_ICU_CFLAGS'] - NO_EXPAND_LIBS = True DIST_INSTALL = True @@ -732,18 +707,12 @@ selfhosted.inputs = [ ] if CONFIG['JS_HAS_CTYPES']: - if CONFIG['MOZ_SYSTEM_FFI']: - CXXFLAGS += CONFIG['MOZ_FFI_CFLAGS'] - else: + if not CONFIG['MOZ_SYSTEM_FFI']: # Windows needs this to be linked with a static library. DEFINES['FFI_BUILDING'] = True -if CONFIG['GNU_CXX']: - # Disable strict-aliasing for GCC, which is enabled by default - # starting with version 7.1, see Mozilla bug 1363009. - CXXFLAGS += ['-Wno-shadow', '-Werror=format', '-fno-strict-aliasing'] - # Suppress warnings in third-party code. +# We are keeping this in the main moz.build because it is file specific if CONFIG['CLANG_CXX'] or CONFIG['GNU_CXX']: SOURCES['jsdtoa.cpp'].flags += ['-Wno-implicit-fallthrough'] -- cgit v1.2.3 From 0cdd39ff120ecf40f8a3443529ec917cf50b867a Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Tue, 3 Nov 2020 15:20:38 -0500 Subject: Issue #1676 - Part 3: Split DEFINES out of js/src/moz.build --- js/src/js-config.mozbuild | 32 ++++++++++++++++++++++++++++++++ js/src/moz.build | 41 +++++------------------------------------ 2 files changed, 37 insertions(+), 36 deletions(-) create mode 100644 js/src/js-config.mozbuild (limited to 'js') diff --git a/js/src/js-config.mozbuild b/js/src/js-config.mozbuild new file mode 100644 index 000000000..82fb4e53e --- /dev/null +++ b/js/src/js-config.mozbuild @@ -0,0 +1,32 @@ +# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- +# This Source Code Form is subject to the terms of the Mozilla Public +# 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/. + +# Also set in shell/moz.build +DEFINES['ENABLE_SHARED_ARRAY_BUFFER'] = True + +DEFINES['EXPORT_JS_API'] = True + +if CONFIG['NIGHTLY_BUILD']: + DEFINES['ENABLE_BINARYDATA'] = True + +if CONFIG['NIGHTLY_BUILD']: + DEFINES['ENABLE_SIMD'] = True + +if CONFIG['JS_HAS_CTYPES']: + DEFINES['JS_HAS_CTYPES'] = True + for var in ('DLL_PREFIX', 'DLL_SUFFIX'): + DEFINES[var] = '"%s"' % CONFIG[var] + +if CONFIG['MOZ_LINKER']: + DEFINES['MOZ_LINKER'] = True + +if CONFIG['JS_HAS_CTYPES']: + if not CONFIG['MOZ_SYSTEM_FFI']: + # Windows needs this to be linked with a static library. + DEFINES['FFI_BUILDING'] = True + +if CONFIG['OS_ARCH'] == 'WINNT': + DEFINES['_CRT_RAND_S'] = True + DEFINES['NOMINMAX'] = True \ No newline at end of file diff --git a/js/src/moz.build b/js/src/moz.build index 09e471416..144f21aeb 100644 --- a/js/src/moz.build +++ b/js/src/moz.build @@ -3,6 +3,7 @@ # 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-config.mozbuild') include('js-cxxflags.mozbuild') include('js-testing.mozbuild') @@ -37,7 +38,6 @@ CONFIGURE_DEFINE_FILES += [ if CONFIG['HAVE_DTRACE']: GENERATED_FILES += ['javascript-trace.h'] - EXPORTS += ['!javascript-trace.h'] # Changes to internal header files, used externally, massively slow down @@ -538,7 +538,6 @@ if CONFIG['OS_ARCH'] == 'WINNT': 'threading/windows/Thread.cpp', ] # _CRT_RAND_S must be #defined before #including stdlib.h to get rand_s() - DEFINES['_CRT_RAND_S'] = True else: SOURCES += [ 'threading/posix/ConditionVariable.cpp', @@ -615,24 +614,6 @@ USE_LIBS += [ 'zlib', ] -if CONFIG['NIGHTLY_BUILD']: - DEFINES['ENABLE_BINARYDATA'] = True - -if CONFIG['NIGHTLY_BUILD']: - DEFINES['ENABLE_SIMD'] = True - -# Also set in shell/moz.build -DEFINES['ENABLE_SHARED_ARRAY_BUFFER'] = True - -DEFINES['EXPORT_JS_API'] = True - -if CONFIG['JS_HAS_CTYPES']: - DEFINES['JS_HAS_CTYPES'] = True - for var in ('DLL_PREFIX', 'DLL_SUFFIX'): - DEFINES[var] = '"%s"' % CONFIG[var] - -if CONFIG['MOZ_LINKER']: - DEFINES['MOZ_LINKER'] = True if CONFIG['_MSC_VER']: if CONFIG['CPU_ARCH'] == 'x86': @@ -641,19 +622,13 @@ if CONFIG['_MSC_VER']: SOURCES['ctypes/CTypes.cpp'].no_pgo = True # Bug 810661 if CONFIG['OS_ARCH'] not in ('WINNT'): - OS_LIBS += [ - 'm', - ] + OS_LIBS += ['m'] if CONFIG['OS_ARCH'] == 'FreeBSD': - OS_LIBS += [ - '-pthread', - ] + OS_LIBS += ['-pthread'] if CONFIG['OS_ARCH'] == 'Linux': - OS_LIBS += [ - 'dl', - ] + OS_LIBS += ['dl'] if CONFIG['OS_ARCH'] == 'SunOS': OS_LIBS += [ @@ -706,15 +681,9 @@ selfhosted.inputs = [ 'builtin/WeakSet.js' ] -if CONFIG['JS_HAS_CTYPES']: - if not CONFIG['MOZ_SYSTEM_FFI']: - # Windows needs this to be linked with a static library. - DEFINES['FFI_BUILDING'] = True - # Suppress warnings in third-party code. # We are keeping this in the main moz.build because it is file specific if CONFIG['CLANG_CXX'] or CONFIG['GNU_CXX']: SOURCES['jsdtoa.cpp'].flags += ['-Wno-implicit-fallthrough'] -if CONFIG['OS_ARCH'] == 'WINNT': - DEFINES['NOMINMAX'] = True + -- cgit v1.2.3 From ec13658ab9384260fe4e05ab14c4a73ef9a2f5a5 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Tue, 3 Nov 2020 16:11:37 -0500 Subject: Issue #80 - De-unify js/src Three debug sources are producing link warnings and will be solved as Issue #1676 progresses. This does not include JS Testing sources. Specifically: js/src/gdb or js/src/jsapi-tests --- js/src/editline/moz.build | 2 +- js/src/moz.build | 30 +++++++++++++++--------------- js/src/shell/moz.build | 2 +- 3 files changed, 17 insertions(+), 17 deletions(-) (limited to 'js') diff --git a/js/src/editline/moz.build b/js/src/editline/moz.build index 420c98df2..1213854c1 100644 --- a/js/src/editline/moz.build +++ b/js/src/editline/moz.build @@ -5,7 +5,7 @@ Library('editline') -UNIFIED_SOURCES += [ +SOURCES += [ 'editline.c', 'sysunix.c', ] diff --git a/js/src/moz.build b/js/src/moz.build index 144f21aeb..25773b3b2 100644 --- a/js/src/moz.build +++ b/js/src/moz.build @@ -111,7 +111,7 @@ EXPORTS.js += [ '../public/WeakMapPtr.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'builtin/AtomicsObject.cpp', 'builtin/Eval.cpp', 'builtin/Intl.cpp', @@ -368,7 +368,7 @@ SOURCES += [ ] if CONFIG['JS_POSIX_NSPR']: - UNIFIED_SOURCES += [ + SOURCES += [ 'vm/PosixNSPR.cpp', ] @@ -385,11 +385,11 @@ if CONFIG['ENABLE_TRACE_LOGGING']: ] if not CONFIG['ENABLE_ION']: - UNIFIED_SOURCES += [ + SOURCES += [ 'jit/none/Trampoline-none.cpp' ] elif CONFIG['JS_CODEGEN_X86'] or CONFIG['JS_CODEGEN_X64']: - UNIFIED_SOURCES += [ + SOURCES += [ 'jit/x86-shared/Architecture-x86-shared.cpp', 'jit/x86-shared/Assembler-x86-shared.cpp', 'jit/x86-shared/AssemblerBuffer-x86-shared.cpp', @@ -404,7 +404,7 @@ elif CONFIG['JS_CODEGEN_X86'] or CONFIG['JS_CODEGEN_X64']: 'jit/x86-shared/Disassembler-x86-shared.cpp', # using namespace js::jit::X86Encoding; ] if CONFIG['JS_CODEGEN_X64']: - UNIFIED_SOURCES += [ + SOURCES += [ 'jit/x64/Assembler-x64.cpp', 'jit/x64/Bailouts-x64.cpp', 'jit/x64/BaselineCompiler-x64.cpp', @@ -416,7 +416,7 @@ elif CONFIG['JS_CODEGEN_X86'] or CONFIG['JS_CODEGEN_X64']: 'jit/x64/Trampoline-x64.cpp', ] else: - UNIFIED_SOURCES += [ + SOURCES += [ 'jit/x86/Assembler-x86.cpp', 'jit/x86/Bailouts-x86.cpp', 'jit/x86/BaselineCompiler-x86.cpp', @@ -428,7 +428,7 @@ elif CONFIG['JS_CODEGEN_X86'] or CONFIG['JS_CODEGEN_X64']: 'jit/x86/Trampoline-x86.cpp', ] elif CONFIG['JS_CODEGEN_ARM']: - UNIFIED_SOURCES += [ + SOURCES += [ 'jit/arm/Architecture-arm.cpp', 'jit/arm/Assembler-arm.cpp', 'jit/arm/Bailouts-arm.cpp', @@ -444,7 +444,7 @@ elif CONFIG['JS_CODEGEN_ARM']: 'jit/arm/Trampoline-arm.cpp', ] if CONFIG['JS_SIMULATOR_ARM']: - UNIFIED_SOURCES += [ + SOURCES += [ 'jit/arm/Simulator-arm.cpp' ] elif CONFIG['OS_ARCH'] == 'Darwin': @@ -453,7 +453,7 @@ elif CONFIG['JS_CODEGEN_ARM']: 'jit/arm/llvm-compiler-rt/arm/aeabi_uidivmod.S', ] elif CONFIG['JS_CODEGEN_ARM64']: - UNIFIED_SOURCES += [ + SOURCES += [ 'jit/arm64/Architecture-arm64.cpp', 'jit/arm64/Assembler-arm64.cpp', 'jit/arm64/Bailouts-arm64.cpp', @@ -476,14 +476,14 @@ elif CONFIG['JS_CODEGEN_ARM64']: 'jit/arm64/vixl/Utils-vixl.cpp' ] if CONFIG['JS_SIMULATOR_ARM64']: - UNIFIED_SOURCES += [ + SOURCES += [ 'jit/arm64/vixl/Debugger-vixl.cpp', 'jit/arm64/vixl/Logic-vixl.cpp', 'jit/arm64/vixl/MozSimulator-vixl.cpp', 'jit/arm64/vixl/Simulator-vixl.cpp' ] elif CONFIG['JS_CODEGEN_MIPS32'] or CONFIG['JS_CODEGEN_MIPS64']: - UNIFIED_SOURCES += [ + SOURCES += [ 'jit/mips-shared/Architecture-mips-shared.cpp', 'jit/mips-shared/Assembler-mips-shared.cpp', 'jit/mips-shared/Bailouts-mips-shared.cpp', @@ -495,7 +495,7 @@ elif CONFIG['JS_CODEGEN_MIPS32'] or CONFIG['JS_CODEGEN_MIPS64']: 'jit/mips-shared/MoveEmitter-mips-shared.cpp', ] if CONFIG['JS_CODEGEN_MIPS32']: - UNIFIED_SOURCES += [ + SOURCES += [ 'jit/mips32/Architecture-mips32.cpp', 'jit/mips32/Assembler-mips32.cpp', 'jit/mips32/Bailouts-mips32.cpp', @@ -509,11 +509,11 @@ elif CONFIG['JS_CODEGEN_MIPS32'] or CONFIG['JS_CODEGEN_MIPS64']: 'jit/mips32/Trampoline-mips32.cpp', ] if CONFIG['JS_SIMULATOR_MIPS32']: - UNIFIED_SOURCES += [ + SOURCES += [ 'jit/mips32/Simulator-mips32.cpp' ] elif CONFIG['JS_CODEGEN_MIPS64']: - UNIFIED_SOURCES += [ + SOURCES += [ 'jit/mips64/Architecture-mips64.cpp', 'jit/mips64/Assembler-mips64.cpp', 'jit/mips64/Bailouts-mips64.cpp', @@ -527,7 +527,7 @@ elif CONFIG['JS_CODEGEN_MIPS32'] or CONFIG['JS_CODEGEN_MIPS64']: 'jit/mips64/Trampoline-mips64.cpp', ] if CONFIG['JS_SIMULATOR_MIPS64']: - UNIFIED_SOURCES += [ + SOURCES += [ 'jit/mips64/Simulator-mips64.cpp' ] diff --git a/js/src/shell/moz.build b/js/src/shell/moz.build index 4f04be73c..7c861fb0d 100644 --- a/js/src/shell/moz.build +++ b/js/src/shell/moz.build @@ -9,7 +9,7 @@ if CONFIG['JS_SHELL_NAME']: USE_LIBS += ['editline'] USE_LIBS += ['static:js'] -UNIFIED_SOURCES += [ +SOURCES += [ 'js.cpp', 'jsoptparse.cpp', 'jsshell.cpp', -- cgit v1.2.3 From 24a5a7f7c98d2ea6396a79cbbfd3c4fb07376374 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Tue, 3 Nov 2020 16:57:05 -0500 Subject: Issue #1676 - Part 4: Split builtin sources out of js/src/moz.build --- js/src/builtin/moz.build | 73 ++++++++++++++++++++++++++++++++++++++++++++++++ js/src/moz.build | 64 ++++-------------------------------------- 2 files changed, 78 insertions(+), 59 deletions(-) create mode 100644 js/src/builtin/moz.build (limited to 'js') diff --git a/js/src/builtin/moz.build b/js/src/builtin/moz.build new file mode 100644 index 000000000..ebf9318db --- /dev/null +++ b/js/src/builtin/moz.build @@ -0,0 +1,73 @@ +# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- +# This Source Code Form is subject to the terms of the Mozilla Public +# 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-config.mozbuild') +include('../js-cxxflags.mozbuild') + +FINAL_LIBRARY = "js" + +# Includes should be relative to parent path +LOCAL_INCLUDES += ["!..", ".."] + +SOURCES += [ + 'AtomicsObject.cpp', + 'Eval.cpp', + 'Intl.cpp', + 'MapObject.cpp', + 'ModuleObject.cpp', + 'Object.cpp', + 'Profilers.cpp', + 'Promise.cpp', + 'Reflect.cpp', + 'ReflectParse.cpp', + 'RegExp.cpp', + 'SIMD.cpp', + 'SymbolObject.cpp', + 'TestingFunctions.cpp', + 'TypedObject.cpp', + 'WeakMapObject.cpp', + 'WeakSetObject.cpp', +] + +if CONFIG['_MSC_VER']: + if CONFIG['CPU_ARCH'] == 'x86': + SOURCES['RegExp.cpp'].no_pgo = True # Bug 772303 + +# Prepare self-hosted JS code for embedding +GENERATED_FILES += [('selfhosted.out.h', 'selfhosted.js')] +selfhosted = GENERATED_FILES[('selfhosted.out.h', 'selfhosted.js')] +selfhosted.script = 'embedjs.py:generate_selfhosted' +selfhosted.inputs = [ + '../js.msg', + 'TypedObjectConstants.h', + 'SelfHostingDefines.h', + 'Utilities.js', + 'Array.js', + 'AsyncIteration.js', + 'Classes.js', + 'Date.js', + 'Error.js', + 'Function.js', + 'Generator.js', + 'Intl.js', + 'IntlData.js', + 'Iterator.js', + 'Map.js', + 'Module.js', + 'Number.js', + 'Object.js', + 'Promise.js', + 'Reflect.js', + 'RegExp.js', + 'RegExpGlobalReplaceOpt.h.js', + 'RegExpLocalReplaceOpt.h.js', + 'String.js', + 'Set.js', + 'Sorting.js', + 'TypedArray.js', + 'TypedObject.js', + 'WeakMap.js', + 'WeakSet.js', +] diff --git a/js/src/moz.build b/js/src/moz.build index 25773b3b2..67b25470c 100644 --- a/js/src/moz.build +++ b/js/src/moz.build @@ -9,6 +9,10 @@ include('js-testing.mozbuild') FILES_PER_UNIFIED_FILE = 6 +DIRS += [ + 'builtin', +] + if CONFIG['JS_BUNDLED_EDITLINE']: DIRS += ['editline'] @@ -112,22 +116,6 @@ EXPORTS.js += [ ] SOURCES += [ - 'builtin/AtomicsObject.cpp', - 'builtin/Eval.cpp', - 'builtin/Intl.cpp', - 'builtin/MapObject.cpp', - 'builtin/ModuleObject.cpp', - 'builtin/Object.cpp', - 'builtin/Profilers.cpp', - 'builtin/Promise.cpp', - 'builtin/Reflect.cpp', - 'builtin/ReflectParse.cpp', - 'builtin/SIMD.cpp', - 'builtin/SymbolObject.cpp', - 'builtin/TestingFunctions.cpp', - 'builtin/TypedObject.cpp', - 'builtin/WeakMapObject.cpp', - 'builtin/WeakSetObject.cpp', 'devtools/sharkctl.cpp', 'ds/LifoAlloc.cpp', 'ds/MemoryProtectionExceptionHandler.cpp', @@ -342,8 +330,6 @@ SOURCES += [ # jsarray.cpp and jsatom.cpp cannot be built in unified mode because # xpcshell is broken during packaging when compiled with gcc-4.8.2 -# builtin/RegExp.cpp cannot be built in unified mode because it is built -# without PGO # frontend/Parser.cpp cannot be built in unified mode because of explicit # template instantiations. # jsdtoa.cpp cannot be built in unified mode because we want to suppress @@ -356,7 +342,6 @@ SOURCES += [ # instantiations may or may not be needed depending on what it gets bundled # with. SOURCES += [ - 'builtin/RegExp.cpp', 'frontend/Parser.cpp', 'gc/StoreBuffer.cpp', 'jsarray.cpp', @@ -616,9 +601,7 @@ USE_LIBS += [ if CONFIG['_MSC_VER']: - if CONFIG['CPU_ARCH'] == 'x86': - SOURCES['builtin/RegExp.cpp'].no_pgo = True # Bug 772303 - elif CONFIG['CPU_ARCH'] == 'x86_64' and CONFIG['JS_HAS_CTYPES']: + if CONFIG['CPU_ARCH'] == 'x86_64' and CONFIG['JS_HAS_CTYPES']: SOURCES['ctypes/CTypes.cpp'].no_pgo = True # Bug 810661 if CONFIG['OS_ARCH'] not in ('WINNT'): @@ -644,43 +627,6 @@ NO_EXPAND_LIBS = True DIST_INSTALL = True -# 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', - 'builtin/TypedObjectConstants.h', - 'builtin/SelfHostingDefines.h', - 'builtin/Utilities.js', - 'builtin/Array.js', - 'builtin/AsyncIteration.js', - 'builtin/Classes.js', - 'builtin/Date.js', - 'builtin/Error.js', - 'builtin/Function.js', - 'builtin/Generator.js', - 'builtin/Intl.js', - 'builtin/IntlData.js', - 'builtin/Iterator.js', - 'builtin/Map.js', - 'builtin/Module.js', - 'builtin/Number.js', - 'builtin/Object.js', - 'builtin/Promise.js', - 'builtin/Reflect.js', - 'builtin/RegExp.js', - 'builtin/RegExpGlobalReplaceOpt.h.js', - 'builtin/RegExpLocalReplaceOpt.h.js', - 'builtin/String.js', - 'builtin/Set.js', - 'builtin/Sorting.js', - 'builtin/TypedArray.js', - 'builtin/TypedObject.js', - 'builtin/WeakMap.js', - 'builtin/WeakSet.js' -] - # Suppress warnings in third-party code. # We are keeping this in the main moz.build because it is file specific if CONFIG['CLANG_CXX'] or CONFIG['GNU_CXX']: -- cgit v1.2.3 From 24b835f0a92881903c6e5f0cebb7ffa93c5e9d05 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Tue, 3 Nov 2020 17:09:00 -0500 Subject: Issue #1676 - Part 5: Split devtools sources out of js/src/moz.build --- js/src/devtools/moz.build | 25 +++++++++++++++++++++++++ js/src/moz.build | 8 +------- 2 files changed, 26 insertions(+), 7 deletions(-) create mode 100644 js/src/devtools/moz.build (limited to 'js') diff --git a/js/src/devtools/moz.build b/js/src/devtools/moz.build new file mode 100644 index 000000000..cb2fc3256 --- /dev/null +++ b/js/src/devtools/moz.build @@ -0,0 +1,25 @@ +# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- +# This Source Code Form is subject to the terms of the Mozilla Public +# 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-config.mozbuild') +include('../js-cxxflags.mozbuild') + +FINAL_LIBRARY = "js" + +# Includes should be relative to parent path +LOCAL_INCLUDES += ["!..", ".."] + +CONFIGURE_SUBST_FILES += [ + 'rootAnalysis/Makefile', +] + +SOURCES += [ + 'sharkctl.cpp', +] + +if CONFIG['MOZ_INSTRUMENTS']: + SOURCES += [ + 'Instruments.cpp', + ] diff --git a/js/src/moz.build b/js/src/moz.build index 67b25470c..8c22ce71d 100644 --- a/js/src/moz.build +++ b/js/src/moz.build @@ -11,6 +11,7 @@ FILES_PER_UNIFIED_FILE = 6 DIRS += [ 'builtin', + 'devtools', ] if CONFIG['JS_BUNDLED_EDITLINE']: @@ -20,7 +21,6 @@ if not CONFIG['JS_DISABLE_SHELL']: DIRS += ['shell'] CONFIGURE_SUBST_FILES += [ - 'devtools/rootAnalysis/Makefile', 'js-config', 'js.pc', ] @@ -116,7 +116,6 @@ EXPORTS.js += [ ] SOURCES += [ - 'devtools/sharkctl.cpp', 'ds/LifoAlloc.cpp', 'ds/MemoryProtectionExceptionHandler.cpp', 'frontend/BytecodeCompiler.cpp', @@ -357,11 +356,6 @@ if CONFIG['JS_POSIX_NSPR']: 'vm/PosixNSPR.cpp', ] -if CONFIG['MOZ_INSTRUMENTS']: - SOURCES += [ - 'devtools/Instruments.cpp', - ] - if CONFIG['ENABLE_TRACE_LOGGING']: SOURCES += [ 'vm/TraceLogging.cpp', -- cgit v1.2.3 From eedfa63a1d244426df38be6d72ee35422a5d9d82 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Tue, 3 Nov 2020 17:33:42 -0500 Subject: Issue #1676 - Part 6: Split ds sources out of js/src/moz.build --- js/src/ds/moz.build | 17 +++++++++++++++++ js/src/moz.build | 3 +-- 2 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 js/src/ds/moz.build (limited to 'js') diff --git a/js/src/ds/moz.build b/js/src/ds/moz.build new file mode 100644 index 000000000..a0b869706 --- /dev/null +++ b/js/src/ds/moz.build @@ -0,0 +1,17 @@ +# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- +# This Source Code Form is subject to the terms of the Mozilla Public +# 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-config.mozbuild') +include('../js-cxxflags.mozbuild') + +FINAL_LIBRARY = "js" + +# Includes should be relative to parent path +LOCAL_INCLUDES += ["!..", ".."] + +SOURCES += [ + 'LifoAlloc.cpp', + 'MemoryProtectionExceptionHandler.cpp', +] \ No newline at end of file diff --git a/js/src/moz.build b/js/src/moz.build index 8c22ce71d..ca8d95b64 100644 --- a/js/src/moz.build +++ b/js/src/moz.build @@ -12,6 +12,7 @@ FILES_PER_UNIFIED_FILE = 6 DIRS += [ 'builtin', 'devtools', + 'ds', ] if CONFIG['JS_BUNDLED_EDITLINE']: @@ -116,8 +117,6 @@ EXPORTS.js += [ ] SOURCES += [ - 'ds/LifoAlloc.cpp', - 'ds/MemoryProtectionExceptionHandler.cpp', 'frontend/BytecodeCompiler.cpp', 'frontend/BytecodeEmitter.cpp', 'frontend/FoldConstants.cpp', -- cgit v1.2.3 From 1396383aeed414c23b3dce639932987000412be0 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Tue, 3 Nov 2020 17:37:32 -0500 Subject: Issue #1676 - Part 7: Split frontend sources out of js/src/moz.build --- js/src/frontend/moz.build | 27 +++++++++++++++++++++++++++ js/src/moz.build | 17 +---------------- 2 files changed, 28 insertions(+), 16 deletions(-) create mode 100644 js/src/frontend/moz.build (limited to 'js') diff --git a/js/src/frontend/moz.build b/js/src/frontend/moz.build new file mode 100644 index 000000000..55037dd5a --- /dev/null +++ b/js/src/frontend/moz.build @@ -0,0 +1,27 @@ +# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- +# This Source Code Form is subject to the terms of the Mozilla Public +# 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-config.mozbuild') +include('../js-cxxflags.mozbuild') + +FINAL_LIBRARY = "js" + +# Includes should be relative to parent path +LOCAL_INCLUDES += ["!..", ".."] + +SOURCES += [ + 'BytecodeCompiler.cpp', + 'BytecodeEmitter.cpp', + 'FoldConstants.cpp', + 'NameFunctions.cpp', + 'ParseNode.cpp', + 'Parser.cpp', + 'TokenStream.cpp', +] + +GENERATED_FILES += ['ReservedWordsGenerated.h'] +ReservedWordsGenerated = GENERATED_FILES['ReservedWordsGenerated.h'] +ReservedWordsGenerated.script = 'GenerateReservedWords.py' +ReservedWordsGenerated.inputs += ['ReservedWords.h'] \ No newline at end of file diff --git a/js/src/moz.build b/js/src/moz.build index ca8d95b64..bcf768065 100644 --- a/js/src/moz.build +++ b/js/src/moz.build @@ -13,6 +13,7 @@ DIRS += [ 'builtin', 'devtools', 'ds', + 'frontend', ] if CONFIG['JS_BUNDLED_EDITLINE']: @@ -117,12 +118,6 @@ EXPORTS.js += [ ] SOURCES += [ - 'frontend/BytecodeCompiler.cpp', - 'frontend/BytecodeEmitter.cpp', - 'frontend/FoldConstants.cpp', - 'frontend/NameFunctions.cpp', - 'frontend/ParseNode.cpp', - 'frontend/TokenStream.cpp', 'gc/Allocator.cpp', 'gc/Barrier.cpp', 'gc/GCTrace.cpp', @@ -328,8 +323,6 @@ SOURCES += [ # jsarray.cpp and jsatom.cpp cannot be built in unified mode because # xpcshell is broken during packaging when compiled with gcc-4.8.2 -# frontend/Parser.cpp cannot be built in unified mode because of explicit -# template instantiations. # jsdtoa.cpp cannot be built in unified mode because we want to suppress # compiler warnings in third-party dtoa.c. # jsmath.cpp cannot be built in unified mode because it needs to pull rand_s @@ -340,7 +333,6 @@ SOURCES += [ # instantiations may or may not be needed depending on what it gets bundled # with. SOURCES += [ - 'frontend/Parser.cpp', 'gc/StoreBuffer.cpp', 'jsarray.cpp', 'jsatom.cpp', @@ -550,13 +542,6 @@ else: 'perf/pm_stub.cpp' ] -GENERATED_FILES += ['frontend/ReservedWordsGenerated.h'] -ReservedWordsGenerated = GENERATED_FILES['frontend/ReservedWordsGenerated.h'] -ReservedWordsGenerated.script = 'frontend/GenerateReservedWords.py' -ReservedWordsGenerated.inputs += [ - 'frontend/ReservedWords.h' -] - # JavaScript must be built shared, even for static builds, as it is used by # other modules which are always built shared. Failure to do so results in # the js code getting copied into xpinstall and jsd as well as mozilla-bin, -- cgit v1.2.3 From bc450dab41695f85290f83c53c2c6914c1710883 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Tue, 3 Nov 2020 19:07:51 -0500 Subject: Issue #1676 - Part 8: Fix up include for selfhosted.out.h --- js/src/vm/SelfHosting.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js') diff --git a/js/src/vm/SelfHosting.cpp b/js/src/vm/SelfHosting.cpp index b7d62efc1..dc1dfb9fa 100644 --- a/js/src/vm/SelfHosting.cpp +++ b/js/src/vm/SelfHosting.cpp @@ -20,8 +20,8 @@ #include "jsstr.h" #include "jsweakmap.h" #include "jswrapper.h" -#include "selfhosted.out.h" +#include "builtin/selfhosted.out.h" #include "builtin/Intl.h" #include "builtin/MapObject.h" #include "builtin/ModuleObject.h" -- cgit v1.2.3 From 957f19d2bd52e193882e098a529dddc326e63a44 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Tue, 3 Nov 2020 19:08:56 -0500 Subject: Issue #1676 - Part 9: Move DIRS down in js/src/moz.build --- js/src/moz.build | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) (limited to 'js') diff --git a/js/src/moz.build b/js/src/moz.build index bcf768065..f3552db1c 100644 --- a/js/src/moz.build +++ b/js/src/moz.build @@ -7,21 +7,6 @@ include('js-config.mozbuild') include('js-cxxflags.mozbuild') include('js-testing.mozbuild') -FILES_PER_UNIFIED_FILE = 6 - -DIRS += [ - 'builtin', - 'devtools', - 'ds', - 'frontend', -] - -if CONFIG['JS_BUNDLED_EDITLINE']: - DIRS += ['editline'] - -if not CONFIG['JS_DISABLE_SHELL']: - DIRS += ['shell'] - CONFIGURE_SUBST_FILES += [ 'js-config', 'js.pc', @@ -117,6 +102,19 @@ EXPORTS.js += [ '../public/WeakMapPtr.h', ] +DIRS += [ + 'builtin', + 'devtools', + 'ds', + 'frontend', +] + +if CONFIG['JS_BUNDLED_EDITLINE']: + DIRS += ['editline'] + +if not CONFIG['JS_DISABLE_SHELL']: + DIRS += ['shell'] + SOURCES += [ 'gc/Allocator.cpp', 'gc/Barrier.cpp', -- cgit v1.2.3 From 65eac50e2dd9d2c4773a927aa7909eff13bc121c Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Tue, 3 Nov 2020 20:02:33 -0500 Subject: Issue #1676 - Part 10: Split gc sources out of js/src/moz.build --- js/src/gc/moz.build | 29 +++++++++++++++++++++++++++++ js/src/moz.build | 15 +-------------- 2 files changed, 30 insertions(+), 14 deletions(-) create mode 100644 js/src/gc/moz.build (limited to 'js') diff --git a/js/src/gc/moz.build b/js/src/gc/moz.build new file mode 100644 index 000000000..8f3188cf1 --- /dev/null +++ b/js/src/gc/moz.build @@ -0,0 +1,29 @@ +# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- +# This Source Code Form is subject to the terms of the Mozilla Public +# 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-config.mozbuild') +include('../js-cxxflags.mozbuild') + +FINAL_LIBRARY = "js" + +# Includes should be relative to parent path +LOCAL_INCLUDES += ["!..", ".."] + +SOURCES += [ + 'Allocator.cpp', + 'Barrier.cpp', + 'GCTrace.cpp', + 'Iteration.cpp', + 'Marking.cpp', + 'Memory.cpp', + 'MemoryProfiler.cpp', + 'Nursery.cpp', + 'RootMarking.cpp', + 'Statistics.cpp', + 'StoreBuffer.cpp', + 'Tracer.cpp', + 'Verifier.cpp', + 'Zone.cpp', +] diff --git a/js/src/moz.build b/js/src/moz.build index f3552db1c..7797670c8 100644 --- a/js/src/moz.build +++ b/js/src/moz.build @@ -107,6 +107,7 @@ DIRS += [ 'devtools', 'ds', 'frontend', + 'gc', ] if CONFIG['JS_BUNDLED_EDITLINE']: @@ -116,19 +117,6 @@ if not CONFIG['JS_DISABLE_SHELL']: DIRS += ['shell'] SOURCES += [ - 'gc/Allocator.cpp', - 'gc/Barrier.cpp', - 'gc/GCTrace.cpp', - 'gc/Iteration.cpp', - 'gc/Marking.cpp', - 'gc/Memory.cpp', - 'gc/MemoryProfiler.cpp', - 'gc/Nursery.cpp', - 'gc/RootMarking.cpp', - 'gc/Statistics.cpp', - 'gc/Tracer.cpp', - 'gc/Verifier.cpp', - 'gc/Zone.cpp', 'irregexp/NativeRegExpMacroAssembler.cpp', 'irregexp/RegExpAST.cpp', 'irregexp/RegExpCharacters.cpp', @@ -331,7 +319,6 @@ SOURCES += [ # instantiations may or may not be needed depending on what it gets bundled # with. SOURCES += [ - 'gc/StoreBuffer.cpp', 'jsarray.cpp', 'jsatom.cpp', 'jsdtoa.cpp', -- cgit v1.2.3 From 3d9bf5d7a32eb7076ad4e1782ca677981efff150 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Wed, 4 Nov 2020 13:05:19 -0500 Subject: Issue #1676 - Part 11: Split irregexp sources out of js/src/moz.build --- js/src/irregexp/moz.build | 23 +++++++++++++++++++++++ js/src/moz.build | 9 +-------- 2 files changed, 24 insertions(+), 8 deletions(-) create mode 100644 js/src/irregexp/moz.build (limited to 'js') diff --git a/js/src/irregexp/moz.build b/js/src/irregexp/moz.build new file mode 100644 index 000000000..fc4fe6218 --- /dev/null +++ b/js/src/irregexp/moz.build @@ -0,0 +1,23 @@ +# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- +# This Source Code Form is subject to the terms of the Mozilla Public +# 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-config.mozbuild') +include('../js-cxxflags.mozbuild') + +FINAL_LIBRARY = "js" + +# Includes should be relative to parent path +LOCAL_INCLUDES += ["!..", ".."] + +SOURCES += [ + 'NativeRegExpMacroAssembler.cpp', + 'RegExpAST.cpp', + 'RegExpCharacters.cpp', + 'RegExpEngine.cpp', + 'RegExpInterpreter.cpp', + 'RegExpMacroAssembler.cpp', + 'RegExpParser.cpp', + 'RegExpStack.cpp', +] \ No newline at end of file diff --git a/js/src/moz.build b/js/src/moz.build index 7797670c8..363bb4263 100644 --- a/js/src/moz.build +++ b/js/src/moz.build @@ -108,6 +108,7 @@ DIRS += [ 'ds', 'frontend', 'gc', + 'irregexp', ] if CONFIG['JS_BUNDLED_EDITLINE']: @@ -117,14 +118,6 @@ if not CONFIG['JS_DISABLE_SHELL']: DIRS += ['shell'] SOURCES += [ - 'irregexp/NativeRegExpMacroAssembler.cpp', - 'irregexp/RegExpAST.cpp', - 'irregexp/RegExpCharacters.cpp', - 'irregexp/RegExpEngine.cpp', - 'irregexp/RegExpInterpreter.cpp', - 'irregexp/RegExpMacroAssembler.cpp', - 'irregexp/RegExpParser.cpp', - 'irregexp/RegExpStack.cpp', 'jit/AliasAnalysis.cpp', 'jit/AliasAnalysisShared.cpp', 'jit/AlignmentMaskAnalysis.cpp', -- cgit v1.2.3 From 95e057e737e3edcb270c256000b893365e1d9a9b Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Wed, 4 Nov 2020 13:43:10 -0500 Subject: Issue #1676 - Part 12: Split jit sources out of js/src/moz.build --- js/src/jit/moz.build | 231 +++++++++++++++++++++++++++++++++++++++++++++++++++ js/src/moz.build | 217 +---------------------------------------------- 2 files changed, 232 insertions(+), 216 deletions(-) create mode 100644 js/src/jit/moz.build (limited to 'js') diff --git a/js/src/jit/moz.build b/js/src/jit/moz.build new file mode 100644 index 000000000..bcd9b7dbf --- /dev/null +++ b/js/src/jit/moz.build @@ -0,0 +1,231 @@ +# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- +# This Source Code Form is subject to the terms of the Mozilla Public +# 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-config.mozbuild') +include('../js-cxxflags.mozbuild') + +FINAL_LIBRARY = "js" + +# Includes should be relative to parent path +LOCAL_INCLUDES += ["!..", ".."] + +SOURCES += [ + 'AliasAnalysis.cpp', + 'AliasAnalysisShared.cpp', + 'AlignmentMaskAnalysis.cpp', + 'BacktrackingAllocator.cpp', + 'Bailouts.cpp', + 'BaselineBailouts.cpp', + 'BaselineCacheIR.cpp', + 'BaselineCompiler.cpp', + 'BaselineDebugModeOSR.cpp', + 'BaselineFrame.cpp', + 'BaselineFrameInfo.cpp', + 'BaselineIC.cpp', + 'BaselineInspector.cpp', + 'BaselineJIT.cpp', + 'BitSet.cpp', + 'BytecodeAnalysis.cpp', + 'C1Spewer.cpp', + 'CacheIR.cpp', + 'CodeGenerator.cpp', + 'CompileWrappers.cpp', + 'Disassembler.cpp', + 'EagerSimdUnbox.cpp', + 'EdgeCaseAnalysis.cpp', + 'EffectiveAddressAnalysis.cpp', + 'ExecutableAllocator.cpp', + 'FlowAliasAnalysis.cpp', + 'FoldLinearArithConstants.cpp', + 'InstructionReordering.cpp', + 'Ion.cpp', + 'IonAnalysis.cpp', + 'IonBuilder.cpp', + 'IonCaches.cpp', + 'IonOptimizationLevels.cpp', + 'JitcodeMap.cpp', + 'JitFrames.cpp', + 'JitOptions.cpp', + 'JitSpewer.cpp', + 'JSONSpewer.cpp', + 'LICM.cpp', + 'Linker.cpp', + 'LIR.cpp', + 'LoopUnroller.cpp', + 'Lowering.cpp', + 'MacroAssembler.cpp', + 'MCallOptimize.cpp', + 'MIR.cpp', + 'MIRGraph.cpp', + 'MoveResolver.cpp', + 'OptimizationTracking.cpp', + 'PerfSpewer.cpp', + 'ProcessExecutableMemory.cpp', + 'RangeAnalysis.cpp', + 'Recover.cpp', + 'RegisterAllocator.cpp', + 'RematerializedFrame.cpp', + 'Safepoints.cpp', + 'ScalarReplacement.cpp', + 'shared/BaselineCompiler-shared.cpp', + 'shared/CodeGenerator-shared.cpp', + 'shared/Lowering-shared.cpp', + 'SharedIC.cpp', + 'Sink.cpp', + 'Snapshots.cpp', + 'StupidAllocator.cpp', + 'TypedObjectPrediction.cpp', + 'TypePolicy.cpp', + 'ValueNumbering.cpp', + 'VMFunctions.cpp', + 'WasmBCE.cpp', +] + +if not CONFIG['ENABLE_ION']: + SOURCES += [ + 'none/Trampoline-none.cpp' + ] +elif CONFIG['JS_CODEGEN_X86'] or CONFIG['JS_CODEGEN_X64']: + SOURCES += [ + 'x86-shared/Architecture-x86-shared.cpp', + 'x86-shared/Assembler-x86-shared.cpp', + 'x86-shared/AssemblerBuffer-x86-shared.cpp', + 'x86-shared/BaselineCompiler-x86-shared.cpp', + 'x86-shared/BaselineIC-x86-shared.cpp', + 'x86-shared/CodeGenerator-x86-shared.cpp', + 'x86-shared/Lowering-x86-shared.cpp', + 'x86-shared/MacroAssembler-x86-shared.cpp', + 'x86-shared/MoveEmitter-x86-shared.cpp', + ] + SOURCES += [ + 'x86-shared/Disassembler-x86-shared.cpp', # using namespace js::jit::X86Encoding; + ] + if CONFIG['JS_CODEGEN_X64']: + SOURCES += [ + 'x64/Assembler-x64.cpp', + 'x64/Bailouts-x64.cpp', + 'x64/BaselineCompiler-x64.cpp', + 'x64/BaselineIC-x64.cpp', + 'x64/CodeGenerator-x64.cpp', + 'x64/Lowering-x64.cpp', + 'x64/MacroAssembler-x64.cpp', + 'x64/SharedIC-x64.cpp', + 'x64/Trampoline-x64.cpp', + ] + else: + SOURCES += [ + 'x86/Assembler-x86.cpp', + 'x86/Bailouts-x86.cpp', + 'x86/BaselineCompiler-x86.cpp', + 'x86/BaselineIC-x86.cpp', + 'x86/CodeGenerator-x86.cpp', + 'x86/Lowering-x86.cpp', + 'x86/MacroAssembler-x86.cpp', + 'x86/SharedIC-x86.cpp', + 'x86/Trampoline-x86.cpp', + ] +elif CONFIG['JS_CODEGEN_ARM']: + SOURCES += [ + 'arm/Architecture-arm.cpp', + 'arm/Assembler-arm.cpp', + 'arm/Bailouts-arm.cpp', + 'arm/BaselineCompiler-arm.cpp', + 'arm/BaselineIC-arm.cpp', + 'arm/CodeGenerator-arm.cpp', + 'arm/disasm/Constants-arm.cpp', + 'arm/disasm/Disasm-arm.cpp', + 'arm/Lowering-arm.cpp', + 'arm/MacroAssembler-arm.cpp', + 'arm/MoveEmitter-arm.cpp', + 'arm/SharedIC-arm.cpp', + 'arm/Trampoline-arm.cpp', + ] + if CONFIG['JS_SIMULATOR_ARM']: + SOURCES += [ + 'arm/Simulator-arm.cpp' + ] + elif CONFIG['OS_ARCH'] == 'Darwin': + SOURCES += [ + 'arm/llvm-compiler-rt/arm/aeabi_idivmod.S', + 'arm/llvm-compiler-rt/arm/aeabi_uidivmod.S', + ] +elif CONFIG['JS_CODEGEN_ARM64']: + SOURCES += [ + 'arm64/Architecture-arm64.cpp', + 'arm64/Assembler-arm64.cpp', + 'arm64/Bailouts-arm64.cpp', + 'arm64/BaselineIC-arm64.cpp', + 'arm64/CodeGenerator-arm64.cpp', + 'arm64/Lowering-arm64.cpp', + 'arm64/MacroAssembler-arm64.cpp', + 'arm64/MoveEmitter-arm64.cpp', + 'arm64/SharedIC-arm64.cpp', + 'arm64/Trampoline-arm64.cpp', + 'arm64/vixl/Assembler-vixl.cpp', + 'arm64/vixl/Cpu-vixl.cpp', + 'arm64/vixl/Decoder-vixl.cpp', + 'arm64/vixl/Disasm-vixl.cpp', + 'arm64/vixl/Instructions-vixl.cpp', + 'arm64/vixl/Instrument-vixl.cpp', + 'arm64/vixl/MacroAssembler-vixl.cpp', + 'arm64/vixl/MozAssembler-vixl.cpp', + 'arm64/vixl/MozInstructions-vixl.cpp', + 'arm64/vixl/Utils-vixl.cpp' + ] + if CONFIG['JS_SIMULATOR_ARM64']: + SOURCES += [ + 'arm64/vixl/Debugger-vixl.cpp', + 'arm64/vixl/Logic-vixl.cpp', + 'arm64/vixl/MozSimulator-vixl.cpp', + 'arm64/vixl/Simulator-vixl.cpp' + ] +elif CONFIG['JS_CODEGEN_MIPS32'] or CONFIG['JS_CODEGEN_MIPS64']: + SOURCES += [ + 'mips-shared/Architecture-mips-shared.cpp', + 'mips-shared/Assembler-mips-shared.cpp', + 'mips-shared/Bailouts-mips-shared.cpp', + 'mips-shared/BaselineCompiler-mips-shared.cpp', + 'mips-shared/BaselineIC-mips-shared.cpp', + 'mips-shared/CodeGenerator-mips-shared.cpp', + 'mips-shared/Lowering-mips-shared.cpp', + 'mips-shared/MacroAssembler-mips-shared.cpp', + 'mips-shared/MoveEmitter-mips-shared.cpp', + ] + if CONFIG['JS_CODEGEN_MIPS32']: + SOURCES += [ + 'mips32/Architecture-mips32.cpp', + 'mips32/Assembler-mips32.cpp', + 'mips32/Bailouts-mips32.cpp', + 'mips32/BaselineCompiler-mips32.cpp', + 'mips32/BaselineIC-mips32.cpp', + 'mips32/CodeGenerator-mips32.cpp', + 'mips32/Lowering-mips32.cpp', + 'mips32/MacroAssembler-mips32.cpp', + 'mips32/MoveEmitter-mips32.cpp', + 'mips32/SharedIC-mips32.cpp', + 'mips32/Trampoline-mips32.cpp', + ] + if CONFIG['JS_SIMULATOR_MIPS32']: + SOURCES += [ + 'mips32/Simulator-mips32.cpp' + ] + elif CONFIG['JS_CODEGEN_MIPS64']: + SOURCES += [ + 'mips64/Architecture-mips64.cpp', + 'mips64/Assembler-mips64.cpp', + 'mips64/Bailouts-mips64.cpp', + 'mips64/BaselineCompiler-mips64.cpp', + 'mips64/BaselineIC-mips64.cpp', + 'mips64/CodeGenerator-mips64.cpp', + 'mips64/Lowering-mips64.cpp', + 'mips64/MacroAssembler-mips64.cpp', + 'mips64/MoveEmitter-mips64.cpp', + 'mips64/SharedIC-mips64.cpp', + 'mips64/Trampoline-mips64.cpp', + ] + if CONFIG['JS_SIMULATOR_MIPS64']: + SOURCES += [ + 'mips64/Simulator-mips64.cpp' + ] diff --git a/js/src/moz.build b/js/src/moz.build index 363bb4263..906d5c0f7 100644 --- a/js/src/moz.build +++ b/js/src/moz.build @@ -109,6 +109,7 @@ DIRS += [ 'frontend', 'gc', 'irregexp', + 'jit', ] if CONFIG['JS_BUNDLED_EDITLINE']: @@ -118,75 +119,6 @@ if not CONFIG['JS_DISABLE_SHELL']: DIRS += ['shell'] SOURCES += [ - 'jit/AliasAnalysis.cpp', - 'jit/AliasAnalysisShared.cpp', - 'jit/AlignmentMaskAnalysis.cpp', - 'jit/BacktrackingAllocator.cpp', - 'jit/Bailouts.cpp', - 'jit/BaselineBailouts.cpp', - 'jit/BaselineCacheIR.cpp', - 'jit/BaselineCompiler.cpp', - 'jit/BaselineDebugModeOSR.cpp', - 'jit/BaselineFrame.cpp', - 'jit/BaselineFrameInfo.cpp', - 'jit/BaselineIC.cpp', - 'jit/BaselineInspector.cpp', - 'jit/BaselineJIT.cpp', - 'jit/BitSet.cpp', - 'jit/BytecodeAnalysis.cpp', - 'jit/C1Spewer.cpp', - 'jit/CacheIR.cpp', - 'jit/CodeGenerator.cpp', - 'jit/CompileWrappers.cpp', - 'jit/Disassembler.cpp', - 'jit/EagerSimdUnbox.cpp', - 'jit/EdgeCaseAnalysis.cpp', - 'jit/EffectiveAddressAnalysis.cpp', - 'jit/ExecutableAllocator.cpp', - 'jit/FlowAliasAnalysis.cpp', - 'jit/FoldLinearArithConstants.cpp', - 'jit/InstructionReordering.cpp', - 'jit/Ion.cpp', - 'jit/IonAnalysis.cpp', - 'jit/IonBuilder.cpp', - 'jit/IonCaches.cpp', - 'jit/IonOptimizationLevels.cpp', - 'jit/JitcodeMap.cpp', - 'jit/JitFrames.cpp', - 'jit/JitOptions.cpp', - 'jit/JitSpewer.cpp', - 'jit/JSONSpewer.cpp', - 'jit/LICM.cpp', - 'jit/Linker.cpp', - 'jit/LIR.cpp', - 'jit/LoopUnroller.cpp', - 'jit/Lowering.cpp', - 'jit/MacroAssembler.cpp', - 'jit/MCallOptimize.cpp', - 'jit/MIR.cpp', - 'jit/MIRGraph.cpp', - 'jit/MoveResolver.cpp', - 'jit/OptimizationTracking.cpp', - 'jit/PerfSpewer.cpp', - 'jit/ProcessExecutableMemory.cpp', - 'jit/RangeAnalysis.cpp', - 'jit/Recover.cpp', - 'jit/RegisterAllocator.cpp', - 'jit/RematerializedFrame.cpp', - 'jit/Safepoints.cpp', - 'jit/ScalarReplacement.cpp', - 'jit/shared/BaselineCompiler-shared.cpp', - 'jit/shared/CodeGenerator-shared.cpp', - 'jit/shared/Lowering-shared.cpp', - 'jit/SharedIC.cpp', - 'jit/Sink.cpp', - 'jit/Snapshots.cpp', - 'jit/StupidAllocator.cpp', - 'jit/TypedObjectPrediction.cpp', - 'jit/TypePolicy.cpp', - 'jit/ValueNumbering.cpp', - 'jit/VMFunctions.cpp', - 'jit/WasmBCE.cpp', 'jsalloc.cpp', 'jsapi.cpp', 'jsbool.cpp', @@ -332,153 +264,6 @@ if CONFIG['ENABLE_TRACE_LOGGING']: 'vm/TraceLoggingTypes.cpp', ] -if not CONFIG['ENABLE_ION']: - SOURCES += [ - 'jit/none/Trampoline-none.cpp' - ] -elif CONFIG['JS_CODEGEN_X86'] or CONFIG['JS_CODEGEN_X64']: - SOURCES += [ - 'jit/x86-shared/Architecture-x86-shared.cpp', - 'jit/x86-shared/Assembler-x86-shared.cpp', - 'jit/x86-shared/AssemblerBuffer-x86-shared.cpp', - 'jit/x86-shared/BaselineCompiler-x86-shared.cpp', - 'jit/x86-shared/BaselineIC-x86-shared.cpp', - 'jit/x86-shared/CodeGenerator-x86-shared.cpp', - 'jit/x86-shared/Lowering-x86-shared.cpp', - 'jit/x86-shared/MacroAssembler-x86-shared.cpp', - 'jit/x86-shared/MoveEmitter-x86-shared.cpp', - ] - SOURCES += [ - 'jit/x86-shared/Disassembler-x86-shared.cpp', # using namespace js::jit::X86Encoding; - ] - if CONFIG['JS_CODEGEN_X64']: - SOURCES += [ - 'jit/x64/Assembler-x64.cpp', - 'jit/x64/Bailouts-x64.cpp', - 'jit/x64/BaselineCompiler-x64.cpp', - 'jit/x64/BaselineIC-x64.cpp', - 'jit/x64/CodeGenerator-x64.cpp', - 'jit/x64/Lowering-x64.cpp', - 'jit/x64/MacroAssembler-x64.cpp', - 'jit/x64/SharedIC-x64.cpp', - 'jit/x64/Trampoline-x64.cpp', - ] - else: - SOURCES += [ - 'jit/x86/Assembler-x86.cpp', - 'jit/x86/Bailouts-x86.cpp', - 'jit/x86/BaselineCompiler-x86.cpp', - 'jit/x86/BaselineIC-x86.cpp', - 'jit/x86/CodeGenerator-x86.cpp', - 'jit/x86/Lowering-x86.cpp', - 'jit/x86/MacroAssembler-x86.cpp', - 'jit/x86/SharedIC-x86.cpp', - 'jit/x86/Trampoline-x86.cpp', - ] -elif CONFIG['JS_CODEGEN_ARM']: - SOURCES += [ - 'jit/arm/Architecture-arm.cpp', - 'jit/arm/Assembler-arm.cpp', - 'jit/arm/Bailouts-arm.cpp', - 'jit/arm/BaselineCompiler-arm.cpp', - 'jit/arm/BaselineIC-arm.cpp', - 'jit/arm/CodeGenerator-arm.cpp', - 'jit/arm/disasm/Constants-arm.cpp', - 'jit/arm/disasm/Disasm-arm.cpp', - 'jit/arm/Lowering-arm.cpp', - 'jit/arm/MacroAssembler-arm.cpp', - 'jit/arm/MoveEmitter-arm.cpp', - 'jit/arm/SharedIC-arm.cpp', - 'jit/arm/Trampoline-arm.cpp', - ] - if CONFIG['JS_SIMULATOR_ARM']: - SOURCES += [ - 'jit/arm/Simulator-arm.cpp' - ] - elif CONFIG['OS_ARCH'] == 'Darwin': - SOURCES += [ - 'jit/arm/llvm-compiler-rt/arm/aeabi_idivmod.S', - 'jit/arm/llvm-compiler-rt/arm/aeabi_uidivmod.S', - ] -elif CONFIG['JS_CODEGEN_ARM64']: - SOURCES += [ - 'jit/arm64/Architecture-arm64.cpp', - 'jit/arm64/Assembler-arm64.cpp', - 'jit/arm64/Bailouts-arm64.cpp', - 'jit/arm64/BaselineIC-arm64.cpp', - 'jit/arm64/CodeGenerator-arm64.cpp', - 'jit/arm64/Lowering-arm64.cpp', - 'jit/arm64/MacroAssembler-arm64.cpp', - 'jit/arm64/MoveEmitter-arm64.cpp', - 'jit/arm64/SharedIC-arm64.cpp', - 'jit/arm64/Trampoline-arm64.cpp', - 'jit/arm64/vixl/Assembler-vixl.cpp', - 'jit/arm64/vixl/Cpu-vixl.cpp', - 'jit/arm64/vixl/Decoder-vixl.cpp', - 'jit/arm64/vixl/Disasm-vixl.cpp', - 'jit/arm64/vixl/Instructions-vixl.cpp', - 'jit/arm64/vixl/Instrument-vixl.cpp', - 'jit/arm64/vixl/MacroAssembler-vixl.cpp', - 'jit/arm64/vixl/MozAssembler-vixl.cpp', - 'jit/arm64/vixl/MozInstructions-vixl.cpp', - 'jit/arm64/vixl/Utils-vixl.cpp' - ] - if CONFIG['JS_SIMULATOR_ARM64']: - SOURCES += [ - 'jit/arm64/vixl/Debugger-vixl.cpp', - 'jit/arm64/vixl/Logic-vixl.cpp', - 'jit/arm64/vixl/MozSimulator-vixl.cpp', - 'jit/arm64/vixl/Simulator-vixl.cpp' - ] -elif CONFIG['JS_CODEGEN_MIPS32'] or CONFIG['JS_CODEGEN_MIPS64']: - SOURCES += [ - 'jit/mips-shared/Architecture-mips-shared.cpp', - 'jit/mips-shared/Assembler-mips-shared.cpp', - 'jit/mips-shared/Bailouts-mips-shared.cpp', - 'jit/mips-shared/BaselineCompiler-mips-shared.cpp', - 'jit/mips-shared/BaselineIC-mips-shared.cpp', - 'jit/mips-shared/CodeGenerator-mips-shared.cpp', - 'jit/mips-shared/Lowering-mips-shared.cpp', - 'jit/mips-shared/MacroAssembler-mips-shared.cpp', - 'jit/mips-shared/MoveEmitter-mips-shared.cpp', - ] - if CONFIG['JS_CODEGEN_MIPS32']: - SOURCES += [ - 'jit/mips32/Architecture-mips32.cpp', - 'jit/mips32/Assembler-mips32.cpp', - 'jit/mips32/Bailouts-mips32.cpp', - 'jit/mips32/BaselineCompiler-mips32.cpp', - 'jit/mips32/BaselineIC-mips32.cpp', - 'jit/mips32/CodeGenerator-mips32.cpp', - 'jit/mips32/Lowering-mips32.cpp', - 'jit/mips32/MacroAssembler-mips32.cpp', - 'jit/mips32/MoveEmitter-mips32.cpp', - 'jit/mips32/SharedIC-mips32.cpp', - 'jit/mips32/Trampoline-mips32.cpp', - ] - if CONFIG['JS_SIMULATOR_MIPS32']: - SOURCES += [ - 'jit/mips32/Simulator-mips32.cpp' - ] - elif CONFIG['JS_CODEGEN_MIPS64']: - SOURCES += [ - 'jit/mips64/Architecture-mips64.cpp', - 'jit/mips64/Assembler-mips64.cpp', - 'jit/mips64/Bailouts-mips64.cpp', - 'jit/mips64/BaselineCompiler-mips64.cpp', - 'jit/mips64/BaselineIC-mips64.cpp', - 'jit/mips64/CodeGenerator-mips64.cpp', - 'jit/mips64/Lowering-mips64.cpp', - 'jit/mips64/MacroAssembler-mips64.cpp', - 'jit/mips64/MoveEmitter-mips64.cpp', - 'jit/mips64/SharedIC-mips64.cpp', - 'jit/mips64/Trampoline-mips64.cpp', - ] - if CONFIG['JS_SIMULATOR_MIPS64']: - SOURCES += [ - 'jit/mips64/Simulator-mips64.cpp' - ] - if CONFIG['OS_ARCH'] == 'WINNT': SOURCES += [ 'threading/windows/ConditionVariable.cpp', -- cgit v1.2.3 From 383bc182e3a3fe53cf79a51bc36c6218334d93b5 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Wed, 4 Nov 2020 13:48:57 -0500 Subject: Issue #1676 - Part 13: Split perf sources out of js/src/moz.build --- js/src/moz.build | 14 +------------- js/src/perf/moz.build | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 13 deletions(-) create mode 100644 js/src/perf/moz.build (limited to 'js') diff --git a/js/src/moz.build b/js/src/moz.build index 906d5c0f7..71147dc8d 100644 --- a/js/src/moz.build +++ b/js/src/moz.build @@ -49,7 +49,6 @@ EXPORTS += [ 'jstypes.h', 'jsversion.h', 'jswrapper.h', - 'perf/jsperf.h', ] # If you add a header here, add it to js/src/jsapi-tests/testIntTypesABI.cpp so @@ -110,6 +109,7 @@ DIRS += [ 'gc', 'irregexp', 'jit', + 'perf', ] if CONFIG['JS_BUNDLED_EDITLINE']: @@ -140,7 +140,6 @@ SOURCES += [ 'jsscript.cpp', 'jsstr.cpp', 'jsweakmap.cpp', - 'perf/jsperf.cpp', 'proxy/BaseProxyHandler.cpp', 'proxy/CrossCompartmentWrapper.cpp', 'proxy/DeadObjectProxy.cpp', @@ -294,17 +293,6 @@ if CONFIG['MOZ_VTUNE']: 'vtune/jitprofiling.c' ] -if CONFIG['HAVE_LINUX_PERF_EVENT_H']: - SOURCES += [ - 'perf/pm_linux.cpp' - ] - if CONFIG['LINUX_HEADERS_INCLUDES']: - SOURCES['perf/pm_linux.cpp'].flags += [CONFIG['LINUX_HEADERS_INCLUDES']] -else: - SOURCES += [ - 'perf/pm_stub.cpp' - ] - # JavaScript must be built shared, even for static builds, as it is used by # other modules which are always built shared. Failure to do so results in # the js code getting copied into xpinstall and jsd as well as mozilla-bin, diff --git a/js/src/perf/moz.build b/js/src/perf/moz.build new file mode 100644 index 000000000..f0dd7e1d6 --- /dev/null +++ b/js/src/perf/moz.build @@ -0,0 +1,29 @@ +# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- +# This Source Code Form is subject to the terms of the Mozilla Public +# 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-config.mozbuild') +include('../js-cxxflags.mozbuild') + +FINAL_LIBRARY = "js" + +# Includes should be relative to parent path +LOCAL_INCLUDES += ["!..", ".."] + +EXPORTS += ['jsperf.h'] + +SOURCES += [ + 'jsperf.cpp', +] + +if CONFIG['HAVE_LINUX_PERF_EVENT_H']: + SOURCES += [ + 'pm_linux.cpp' + ] + if CONFIG['LINUX_HEADERS_INCLUDES']: + SOURCES['pm_linux.cpp'].flags += [CONFIG['LINUX_HEADERS_INCLUDES']] +else: + SOURCES += [ + 'pm_stub.cpp' + ] \ No newline at end of file -- cgit v1.2.3 From 6f76f1cb362b98fc617c5c0735cdacee64103e89 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Wed, 4 Nov 2020 13:59:16 -0500 Subject: Issue #1676 - Part 14: Split proxy sources out of js/src/moz.build --- js/src/moz.build | 9 +-------- js/src/proxy/moz.build | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 8 deletions(-) create mode 100644 js/src/proxy/moz.build (limited to 'js') diff --git a/js/src/moz.build b/js/src/moz.build index 71147dc8d..ceadfa3fd 100644 --- a/js/src/moz.build +++ b/js/src/moz.build @@ -110,6 +110,7 @@ DIRS += [ 'irregexp', 'jit', 'perf', + 'proxy', ] if CONFIG['JS_BUNDLED_EDITLINE']: @@ -140,14 +141,6 @@ SOURCES += [ 'jsscript.cpp', 'jsstr.cpp', 'jsweakmap.cpp', - 'proxy/BaseProxyHandler.cpp', - 'proxy/CrossCompartmentWrapper.cpp', - 'proxy/DeadObjectProxy.cpp', - 'proxy/OpaqueCrossCompartmentWrapper.cpp', - 'proxy/Proxy.cpp', - 'proxy/ScriptedProxyHandler.cpp', - 'proxy/SecurityWrapper.cpp', - 'proxy/Wrapper.cpp', 'threading/Mutex.cpp', 'vm/ArgumentsObject.cpp', 'vm/ArrayBufferObject.cpp', diff --git a/js/src/proxy/moz.build b/js/src/proxy/moz.build new file mode 100644 index 000000000..72082df85 --- /dev/null +++ b/js/src/proxy/moz.build @@ -0,0 +1,23 @@ +# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- +# This Source Code Form is subject to the terms of the Mozilla Public +# 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-config.mozbuild') +include('../js-cxxflags.mozbuild') + +FINAL_LIBRARY = "js" + +# Includes should be relative to parent path +LOCAL_INCLUDES += ["!..", ".."] + +SOURCES += [ + 'BaseProxyHandler.cpp', + 'CrossCompartmentWrapper.cpp', + 'DeadObjectProxy.cpp', + 'OpaqueCrossCompartmentWrapper.cpp', + 'Proxy.cpp', + 'ScriptedProxyHandler.cpp', + 'SecurityWrapper.cpp', + 'Wrapper.cpp', +] -- cgit v1.2.3 From 2f50f543a245a559a277505dfa6906f1888ef0d9 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Wed, 4 Nov 2020 14:11:22 -0500 Subject: Issue #1676 - Part 15: Split threading sources out of js/src/moz.build --- js/src/moz.build | 17 ++--------------- js/src/threading/moz.build | 30 ++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 15 deletions(-) create mode 100644 js/src/threading/moz.build (limited to 'js') diff --git a/js/src/moz.build b/js/src/moz.build index ceadfa3fd..e7832709d 100644 --- a/js/src/moz.build +++ b/js/src/moz.build @@ -11,6 +11,7 @@ CONFIGURE_SUBST_FILES += [ 'js-config', 'js.pc', ] + CONFIGURE_DEFINE_FILES += [ 'js-confdefs.h', ] @@ -111,6 +112,7 @@ DIRS += [ 'jit', 'perf', 'proxy', + 'threading', ] if CONFIG['JS_BUNDLED_EDITLINE']: @@ -141,7 +143,6 @@ SOURCES += [ 'jsscript.cpp', 'jsstr.cpp', 'jsweakmap.cpp', - 'threading/Mutex.cpp', 'vm/ArgumentsObject.cpp', 'vm/ArrayBufferObject.cpp', 'vm/AsyncFunction.cpp', @@ -256,20 +257,6 @@ if CONFIG['ENABLE_TRACE_LOGGING']: 'vm/TraceLoggingTypes.cpp', ] -if CONFIG['OS_ARCH'] == 'WINNT': - SOURCES += [ - 'threading/windows/ConditionVariable.cpp', - 'threading/windows/MutexImpl.cpp', - 'threading/windows/Thread.cpp', - ] - # _CRT_RAND_S must be #defined before #including stdlib.h to get rand_s() -else: - SOURCES += [ - 'threading/posix/ConditionVariable.cpp', - 'threading/posix/MutexImpl.cpp', - 'threading/posix/Thread.cpp', - ] - if CONFIG['JS_HAS_CTYPES']: SOURCES += [ 'ctypes/CTypes.cpp', diff --git a/js/src/threading/moz.build b/js/src/threading/moz.build new file mode 100644 index 000000000..97673d0c6 --- /dev/null +++ b/js/src/threading/moz.build @@ -0,0 +1,30 @@ +# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- +# This Source Code Form is subject to the terms of the Mozilla Public +# 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-config.mozbuild') +include('../js-cxxflags.mozbuild') + +FINAL_LIBRARY = "js" + +# Includes should be relative to parent path +LOCAL_INCLUDES += ["!..", ".."] + +SOURCES += [ + 'Mutex.cpp', +] + +if CONFIG['OS_ARCH'] == 'WINNT': + SOURCES += [ + 'windows/ConditionVariable.cpp', + 'windows/MutexImpl.cpp', + 'windows/Thread.cpp', + ] + # _CRT_RAND_S must be #defined before #including stdlib.h to get rand_s() +else: + SOURCES += [ + 'posix/ConditionVariable.cpp', + 'posix/MutexImpl.cpp', + 'posix/Thread.cpp', + ] \ No newline at end of file -- cgit v1.2.3 From 1abc696f87d175ab967e0e86fdf375255c43e98d Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Wed, 4 Nov 2020 14:31:48 -0500 Subject: Issue #1676 - Part 16: Split WASM sources out of js/src/moz.build Also puts WasmBinaryIterator.cpp which is debug code ifdef'd behind MOZ_DEBUG --- js/src/moz.build | 23 +---------------------- js/src/wasm/moz.build | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 22 deletions(-) create mode 100644 js/src/wasm/moz.build (limited to 'js') diff --git a/js/src/moz.build b/js/src/moz.build index e7832709d..3c4093ade 100644 --- a/js/src/moz.build +++ b/js/src/moz.build @@ -113,6 +113,7 @@ DIRS += [ 'perf', 'proxy', 'threading', + 'wasm', ] if CONFIG['JS_BUNDLED_EDITLINE']: @@ -201,28 +202,6 @@ SOURCES += [ 'vm/Value.cpp', 'vm/WeakMapPtr.cpp', 'vm/Xdr.cpp', - 'wasm/AsmJS.cpp', - 'wasm/WasmBaselineCompile.cpp', - 'wasm/WasmBinaryFormat.cpp', - 'wasm/WasmBinaryIterator.cpp', - 'wasm/WasmBinaryToAST.cpp', - 'wasm/WasmBinaryToExperimentalText.cpp', - 'wasm/WasmBinaryToText.cpp', - 'wasm/WasmCode.cpp', - 'wasm/WasmCompartment.cpp', - 'wasm/WasmCompile.cpp', - 'wasm/WasmFrameIterator.cpp', - 'wasm/WasmGenerator.cpp', - 'wasm/WasmInstance.cpp', - 'wasm/WasmIonCompile.cpp', - 'wasm/WasmJS.cpp', - 'wasm/WasmModule.cpp', - 'wasm/WasmSignalHandlers.cpp', - 'wasm/WasmStubs.cpp', - 'wasm/WasmTable.cpp', - 'wasm/WasmTextToBinary.cpp', - 'wasm/WasmTextUtils.cpp', - 'wasm/WasmTypes.cpp' ] # jsarray.cpp and jsatom.cpp cannot be built in unified mode because diff --git a/js/src/wasm/moz.build b/js/src/wasm/moz.build new file mode 100644 index 000000000..6a47df322 --- /dev/null +++ b/js/src/wasm/moz.build @@ -0,0 +1,39 @@ +# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- +# This Source Code Form is subject to the terms of the Mozilla Public +# 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-config.mozbuild') +include('../js-cxxflags.mozbuild') + +FINAL_LIBRARY = "js" + +# Includes should be relative to parent path +LOCAL_INCLUDES += ["!..", ".."] + +SOURCES += [ + 'AsmJS.cpp', + 'WasmBaselineCompile.cpp', + 'WasmBinaryFormat.cpp', + 'WasmBinaryToAST.cpp', + 'WasmBinaryToExperimentalText.cpp', + 'WasmBinaryToText.cpp', + 'WasmCode.cpp', + 'WasmCompartment.cpp', + 'WasmCompile.cpp', + 'WasmFrameIterator.cpp', + 'WasmGenerator.cpp', + 'WasmInstance.cpp', + 'WasmIonCompile.cpp', + 'WasmJS.cpp', + 'WasmModule.cpp', + 'WasmSignalHandlers.cpp', + 'WasmStubs.cpp', + 'WasmTable.cpp', + 'WasmTextToBinary.cpp', + 'WasmTextUtils.cpp', + 'WasmTypes.cpp' +] + +if CONFIG['MOZ_DEBUG']: + SOURCES += ['WasmBinaryIterator.cpp'] \ No newline at end of file -- cgit v1.2.3 From ff355fe9ac5327a62cdbd05f99dff9febe5de5df Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Wed, 4 Nov 2020 14:38:12 -0500 Subject: Issue #1676 - Part 17: Put remaining source files which have debug code ifdef'd behind MOZ_DEBUG --- js/src/gc/moz.build | 4 +++- js/src/jit/moz.build | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'js') diff --git a/js/src/gc/moz.build b/js/src/gc/moz.build index 8f3188cf1..d33dfb007 100644 --- a/js/src/gc/moz.build +++ b/js/src/gc/moz.build @@ -24,6 +24,8 @@ SOURCES += [ 'Statistics.cpp', 'StoreBuffer.cpp', 'Tracer.cpp', - 'Verifier.cpp', 'Zone.cpp', ] + +if CONFIG['MOZ_DEBUG']: + SOURCES += ['Verifier.cpp'] diff --git a/js/src/jit/moz.build b/js/src/jit/moz.build index bcd9b7dbf..0c6c4f3b8 100644 --- a/js/src/jit/moz.build +++ b/js/src/jit/moz.build @@ -32,7 +32,6 @@ SOURCES += [ 'CacheIR.cpp', 'CodeGenerator.cpp', 'CompileWrappers.cpp', - 'Disassembler.cpp', 'EagerSimdUnbox.cpp', 'EdgeCaseAnalysis.cpp', 'EffectiveAddressAnalysis.cpp', @@ -83,6 +82,9 @@ SOURCES += [ 'WasmBCE.cpp', ] +if CONFIG['MOZ_DEBUG']: + SOURCES += ['Disassembler.cpp'] + if not CONFIG['ENABLE_ION']: SOURCES += [ 'none/Trampoline-none.cpp' -- cgit v1.2.3 From 59511eb8dddac5556c4aa72d6d7fe1a2c3dc3972 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Wed, 4 Nov 2020 14:45:57 -0500 Subject: Issue #1676 - Part 18: Move and separate top level sources from vm sources in js/src/moz.build --- js/src/moz.build | 39 ++++++++++++++------------------------- 1 file changed, 14 insertions(+), 25 deletions(-) (limited to 'js') diff --git a/js/src/moz.build b/js/src/moz.build index 3c4093ade..7b963ac42 100644 --- a/js/src/moz.build +++ b/js/src/moz.build @@ -125,15 +125,19 @@ if not CONFIG['JS_DISABLE_SHELL']: SOURCES += [ 'jsalloc.cpp', 'jsapi.cpp', + 'jsarray.cpp', + 'jsatom.cpp', 'jsbool.cpp', 'jscntxt.cpp', 'jscompartment.cpp', 'jsdate.cpp', + 'jsdtoa.cpp', 'jsexn.cpp', 'jsfriendapi.cpp', 'jsfun.cpp', 'jsgc.cpp', 'jsiter.cpp', + 'jsmath.cpp', 'jsnativestack.cpp', 'jsnum.cpp', 'jsobj.cpp', @@ -143,7 +147,16 @@ SOURCES += [ 'jspropertytree.cpp', 'jsscript.cpp', 'jsstr.cpp', + 'jsutil.cpp', 'jsweakmap.cpp', +] + +# Suppress warnings in third-party code. +# We are keeping this in the main moz.build because it is file specific +if CONFIG['CLANG_CXX'] or CONFIG['GNU_CXX']: + SOURCES['jsdtoa.cpp'].flags += ['-Wno-implicit-fallthrough'] + +SOURCES += [ 'vm/ArgumentsObject.cpp', 'vm/ArrayBufferObject.cpp', 'vm/AsyncFunction.cpp', @@ -163,6 +176,7 @@ SOURCES += [ 'vm/GlobalObject.cpp', 'vm/HelperThreads.cpp', 'vm/Id.cpp', + 'vm/Initialization.cpp', 'vm/Interpreter.cpp', 'vm/JSONParser.cpp', 'vm/MemoryMetrics.cpp', @@ -204,26 +218,6 @@ SOURCES += [ 'vm/Xdr.cpp', ] -# jsarray.cpp and jsatom.cpp cannot be built in unified mode because -# xpcshell is broken during packaging when compiled with gcc-4.8.2 -# jsdtoa.cpp cannot be built in unified mode because we want to suppress -# compiler warnings in third-party dtoa.c. -# jsmath.cpp cannot be built in unified mode because it needs to pull rand_s -# from on Windows through a preprocessor define. -# jsutil.cpp cannot be built in unified mode because it is needed for -# check-vanilla-allocations. -# StoreBuffer.cpp cannot be built in unified because its template -# instantiations may or may not be needed depending on what it gets bundled -# with. -SOURCES += [ - 'jsarray.cpp', - 'jsatom.cpp', - 'jsdtoa.cpp', - 'jsmath.cpp', - 'jsutil.cpp', - 'vm/Initialization.cpp', -] - if CONFIG['JS_POSIX_NSPR']: SOURCES += [ 'vm/PosixNSPR.cpp', @@ -315,9 +309,4 @@ NO_EXPAND_LIBS = True DIST_INSTALL = True -# Suppress warnings in third-party code. -# We are keeping this in the main moz.build because it is file specific -if CONFIG['CLANG_CXX'] or CONFIG['GNU_CXX']: - SOURCES['jsdtoa.cpp'].flags += ['-Wno-implicit-fallthrough'] - -- cgit v1.2.3 From cdf46e803b2fc1ab0787138890dfff67030e6516 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Wed, 4 Nov 2020 14:59:00 -0500 Subject: Issue #1676 - Part 19: Split ctypes sources out of js/src/moz.build --- js/src/ctypes/moz.build | 26 ++++++++++++++++++++++++++ js/src/moz.build | 19 +++---------------- 2 files changed, 29 insertions(+), 16 deletions(-) create mode 100644 js/src/ctypes/moz.build (limited to 'js') diff --git a/js/src/ctypes/moz.build b/js/src/ctypes/moz.build new file mode 100644 index 000000000..5bea399f3 --- /dev/null +++ b/js/src/ctypes/moz.build @@ -0,0 +1,26 @@ +# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- +# This Source Code Form is subject to the terms of the Mozilla Public +# 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-config.mozbuild') +include('../js-cxxflags.mozbuild') + +FINAL_LIBRARY = "js" + +# Includes should be relative to parent path +LOCAL_INCLUDES += ["!..", ".."] + +SOURCES += [ + 'CTypes.cpp', + 'Library.cpp', +] + +if not CONFIG['MOZ_SYSTEM_FFI']: + LOCAL_INCLUDES += [ + '!libffi/include', + 'libffi/src/%s' % CONFIG['FFI_TARGET_DIR'], + ] + +if CONFIG['_MSC_VER'] and CONFIG['CPU_ARCH'] == 'x86_64': + SOURCES['CTypes.cpp'].no_pgo = True # Bug 810661 \ No newline at end of file diff --git a/js/src/moz.build b/js/src/moz.build index 7b963ac42..20c1e5722 100644 --- a/js/src/moz.build +++ b/js/src/moz.build @@ -122,6 +122,9 @@ if CONFIG['JS_BUNDLED_EDITLINE']: if not CONFIG['JS_DISABLE_SHELL']: DIRS += ['shell'] +if CONFIG['JS_HAS_CTYPES']: + DIRS += ['ctypes'] + SOURCES += [ 'jsalloc.cpp', 'jsapi.cpp', @@ -230,17 +233,6 @@ if CONFIG['ENABLE_TRACE_LOGGING']: 'vm/TraceLoggingTypes.cpp', ] -if CONFIG['JS_HAS_CTYPES']: - SOURCES += [ - 'ctypes/CTypes.cpp', - 'ctypes/Library.cpp', - ] - if not CONFIG['MOZ_SYSTEM_FFI']: - LOCAL_INCLUDES += [ - '!ctypes/libffi/include', - 'ctypes/libffi/src/%s' % CONFIG['FFI_TARGET_DIR'], - ] - if CONFIG['MOZ_VTUNE']: SOURCES += [ 'vtune/jitprofiling.c' @@ -281,11 +273,6 @@ USE_LIBS += [ 'zlib', ] - -if CONFIG['_MSC_VER']: - if CONFIG['CPU_ARCH'] == 'x86_64' and CONFIG['JS_HAS_CTYPES']: - SOURCES['ctypes/CTypes.cpp'].no_pgo = True # Bug 810661 - if CONFIG['OS_ARCH'] not in ('WINNT'): OS_LIBS += ['m'] -- cgit v1.2.3 From fd1b2dc2b14ded708f8eb62a55109c03356c6b26 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Wed, 4 Nov 2020 15:03:13 -0500 Subject: Issue #1676 - Part 20: Split vtune sources out of js/src/moz.build --- js/src/moz.build | 12 +++++------- js/src/vtune/moz.build | 14 ++++++++++++++ 2 files changed, 19 insertions(+), 7 deletions(-) create mode 100644 js/src/vtune/moz.build (limited to 'js') diff --git a/js/src/moz.build b/js/src/moz.build index 20c1e5722..f9e5233a9 100644 --- a/js/src/moz.build +++ b/js/src/moz.build @@ -116,14 +116,17 @@ DIRS += [ 'wasm', ] +if CONFIG['JS_HAS_CTYPES']: + DIRS += ['ctypes'] + if CONFIG['JS_BUNDLED_EDITLINE']: DIRS += ['editline'] if not CONFIG['JS_DISABLE_SHELL']: DIRS += ['shell'] -if CONFIG['JS_HAS_CTYPES']: - DIRS += ['ctypes'] +if CONFIG['MOZ_VTUNE']: + DIRS += ['vtune'] SOURCES += [ 'jsalloc.cpp', @@ -233,11 +236,6 @@ if CONFIG['ENABLE_TRACE_LOGGING']: 'vm/TraceLoggingTypes.cpp', ] -if CONFIG['MOZ_VTUNE']: - SOURCES += [ - 'vtune/jitprofiling.c' - ] - # JavaScript must be built shared, even for static builds, as it is used by # other modules which are always built shared. Failure to do so results in # the js code getting copied into xpinstall and jsd as well as mozilla-bin, diff --git a/js/src/vtune/moz.build b/js/src/vtune/moz.build new file mode 100644 index 000000000..465919795 --- /dev/null +++ b/js/src/vtune/moz.build @@ -0,0 +1,14 @@ +# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- +# This Source Code Form is subject to the terms of the Mozilla Public +# 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-config.mozbuild') +include('../js-cxxflags.mozbuild') + +FINAL_LIBRARY = "js" + +# Includes should be relative to parent path +LOCAL_INCLUDES += ["!..", ".."] + +SOURCES += ['jitprofiling.c'] \ No newline at end of file -- cgit v1.2.3 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