1 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
2 # vim: set filetype=python:
3 # This Source Code Form is subject to the terms of the Mozilla Public
4 # License, v. 2.0. If a copy of the MPL was not distributed with this
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 component_engine = ('Core', 'JavaScript Engine')
9 component_gc = ('Core', 'JavaScript: GC')
10 component_intl = ('Core', 'JavaScript: Internationalization API')
11 component_jit = ('Core', 'JavaScript Engine: JIT')
12 component_stl = ('Core', 'JavaScript: Standard Library')
14 FILES_PER_UNIFIED_FILE = 6
17 BUG_COMPONENT = component_engine
19 with Files('wasm/**'):
20 BUG_COMPONENT = component_jit
21 with Files('builtin/**'):
22 BUG_COMPONENT = component_stl
23 with Files('ctypes/**'):
24 BUG_COMPONENT = ('Core', 'js-ctypes')
26 BUG_COMPONENT = component_gc
28 BUG_COMPONENT = component_jit
30 # File-specific metadata
31 for gcfile in ['jsgc*', 'devtools/rootAnalysis', 'devtools/gc-ubench', 'devtools/gctrace']:
33 BUG_COMPONENT = component_gc
35 for stlfile in ['jsarray.*', 'jsbool*', 'jsdate.*', 'jsnum.*', 'json.*', 'jsstr.*']:
37 BUG_COMPONENT = component_stl
39 with Files('builtin/Intl*'):
40 BUG_COMPONENT = component_intl
41 with Files('builtin/make_intl_data.py'):
42 BUG_COMPONENT = component_intl
45 if CONFIG['JS_BUNDLED_EDITLINE']:
48 if not CONFIG['JS_DISABLE_SHELL']:
51 TEST_DIRS += ['jsapi-tests', 'tests', 'gdb']
53 CONFIGURE_SUBST_FILES += [
54 'devtools/rootAnalysis/Makefile',
56 CONFIGURE_DEFINE_FILES += [
60 if not CONFIG['JS_STANDALONE']:
61 CONFIGURE_SUBST_FILES += [
62 '../../config/autoconf-js.mk',
63 '../../config/emptyvars-js.mk',
66 CONFIGURE_DEFINE_FILES += [
70 if CONFIG['HAVE_DTRACE']:
71 GENERATED_FILES += ['javascript-trace.h']
73 EXPORTS += ['!javascript-trace.h']
75 # Changes to internal header files, used externally, massively slow down
76 # browser builds. Don't add new files here unless you know what you're
95 # If you add a header here, add it to js/src/jsapi-tests/testIntTypesABI.cpp so
96 # that we ensure we don't over-expose our internal integer typedefs. Note that
97 # LegacyIntTypes.h below is deliberately exempted from this requirement.
99 '../public/CallArgs.h',
100 '../public/CallNonGenericMethod.h',
101 '../public/CharacterEncoding.h',
103 '../public/Conversions.h',
106 '../public/GCAnnotations.h',
108 '../public/GCHashTable.h',
109 '../public/GCPolicyAPI.h',
110 '../public/GCVariant.h',
111 '../public/GCVector.h',
112 '../public/HashTable.h',
113 '../public/HeapAPI.h',
115 '../public/Initialization.h',
116 '../public/LegacyIntTypes.h',
117 '../public/MemoryMetrics.h',
118 '../public/Principals.h',
119 '../public/ProfilingFrameIterator.h',
120 '../public/ProfilingStack.h',
123 '../public/RefCounted.h',
124 '../public/RequiredDefines.h',
125 '../public/Result.h',
126 '../public/RootingAPI.h',
127 '../public/SliceBudget.h',
128 '../public/StructuredClone.h',
129 '../public/SweepingAPI.h',
130 '../public/TraceKind.h',
131 '../public/TracingAPI.h',
132 '../public/TrackedOptimizationInfo.h',
133 '../public/TypeDecls.h',
134 '../public/UbiNode.h',
135 '../public/UbiNodeBreadthFirst.h',
136 '../public/UbiNodeCensus.h',
137 '../public/UbiNodeDominatorTree.h',
138 '../public/UbiNodePostOrder.h',
139 '../public/UbiNodeShortestPaths.h',
140 '../public/UniquePtr.h',
141 '../public/Utility.h',
143 '../public/Vector.h',
144 '../public/WeakMapPtr.h',
148 'builtin/AtomicsObject.cpp',
149 'builtin/DataViewObject.cpp',
152 'builtin/MapObject.cpp',
153 'builtin/ModuleObject.cpp',
154 'builtin/Object.cpp',
155 'builtin/Profilers.cpp',
156 'builtin/Promise.cpp',
157 'builtin/Reflect.cpp',
158 'builtin/ReflectParse.cpp',
160 'builtin/SymbolObject.cpp',
161 'builtin/TestingFunctions.cpp',
162 'builtin/TypedObject.cpp',
163 'builtin/WeakMapObject.cpp',
164 'builtin/WeakSetObject.cpp',
165 'devtools/sharkctl.cpp',
168 'ds/MemoryProtectionExceptionHandler.cpp',
169 'frontend/BytecodeCompiler.cpp',
170 'frontend/BytecodeEmitter.cpp',
171 'frontend/FoldConstants.cpp',
172 'frontend/NameFunctions.cpp',
173 'frontend/ParseNode.cpp',
174 'frontend/TokenStream.cpp',
176 'gc/AtomMarking.cpp',
182 'gc/MemoryProfiler.cpp',
184 'gc/RootMarking.cpp',
190 'irregexp/NativeRegExpMacroAssembler.cpp',
191 'irregexp/RegExpAST.cpp',
192 'irregexp/RegExpCharacters.cpp',
193 'irregexp/RegExpEngine.cpp',
194 'irregexp/RegExpInterpreter.cpp',
195 'irregexp/RegExpMacroAssembler.cpp',
196 'irregexp/RegExpParser.cpp',
197 'irregexp/RegExpStack.cpp',
198 'jit/AliasAnalysis.cpp',
199 'jit/AliasAnalysisShared.cpp',
200 'jit/AlignmentMaskAnalysis.cpp',
201 'jit/BacktrackingAllocator.cpp',
203 'jit/BaselineBailouts.cpp',
204 'jit/BaselineCacheIRCompiler.cpp',
205 'jit/BaselineCompiler.cpp',
206 'jit/BaselineDebugModeOSR.cpp',
207 'jit/BaselineFrame.cpp',
208 'jit/BaselineFrameInfo.cpp',
209 'jit/BaselineIC.cpp',
210 'jit/BaselineInspector.cpp',
211 'jit/BaselineJIT.cpp',
213 'jit/BytecodeAnalysis.cpp',
216 'jit/CacheIRCompiler.cpp',
217 'jit/CacheIRSpewer.cpp',
218 'jit/CodeGenerator.cpp',
219 'jit/CompileWrappers.cpp',
220 'jit/Disassembler.cpp',
221 'jit/EagerSimdUnbox.cpp',
222 'jit/EdgeCaseAnalysis.cpp',
223 'jit/EffectiveAddressAnalysis.cpp',
224 'jit/ExecutableAllocator.cpp',
225 'jit/FlowAliasAnalysis.cpp',
226 'jit/FoldLinearArithConstants.cpp',
227 'jit/InstructionReordering.cpp',
229 'jit/IonAnalysis.cpp',
230 'jit/IonBuilder.cpp',
231 'jit/IonCacheIRCompiler.cpp',
233 'jit/IonControlFlow.cpp',
235 'jit/IonOptimizationLevels.cpp',
236 'jit/JitcodeMap.cpp',
238 'jit/JitOptions.cpp',
240 'jit/JSONSpewer.cpp',
244 'jit/LoopUnroller.cpp',
246 'jit/MacroAssembler.cpp',
247 'jit/MCallOptimize.cpp',
250 'jit/MoveResolver.cpp',
251 'jit/OptimizationTracking.cpp',
252 'jit/PerfSpewer.cpp',
253 'jit/ProcessExecutableMemory.cpp',
254 'jit/RangeAnalysis.cpp',
256 'jit/RegisterAllocator.cpp',
257 'jit/RematerializedFrame.cpp',
258 'jit/Safepoints.cpp',
259 'jit/ScalarReplacement.cpp',
260 'jit/shared/BaselineCompiler-shared.cpp',
261 'jit/shared/CodeGenerator-shared.cpp',
262 'jit/shared/Lowering-shared.cpp',
266 'jit/StupidAllocator.cpp',
267 'jit/TypedObjectPrediction.cpp',
268 'jit/TypePolicy.cpp',
269 'jit/ValueNumbering.cpp',
270 'jit/VMFunctions.cpp',
289 'jspropertytree.cpp',
295 'proxy/BaseProxyHandler.cpp',
296 'proxy/CrossCompartmentWrapper.cpp',
297 'proxy/DeadObjectProxy.cpp',
298 'proxy/OpaqueCrossCompartmentWrapper.cpp',
300 'proxy/ScriptedProxyHandler.cpp',
301 'proxy/SecurityWrapper.cpp',
303 'threading/Mutex.cpp',
304 'threading/ProtectedData.cpp',
305 'vm/ArgumentsObject.cpp',
306 'vm/ArrayBufferObject.cpp',
307 'vm/AsyncFunction.cpp',
308 'vm/AsyncIteration.cpp',
310 'vm/CallNonGenericMethod.cpp',
311 'vm/CharacterEncoding.cpp',
312 'vm/CodeCoverage.cpp',
313 'vm/Compression.cpp',
316 'vm/DebuggerMemory.cpp',
317 'vm/EnvironmentObject.cpp',
318 'vm/ErrorObject.cpp',
319 'vm/ErrorReporting.cpp',
320 'vm/ForOfIterator.cpp',
321 'vm/GeckoProfiler.cpp',
322 'vm/GeneratorObject.cpp',
323 'vm/GlobalObject.cpp',
324 'vm/HelperThreads.cpp',
326 'vm/Initialization.cpp',
328 'vm/JSONPrinter.cpp',
329 'vm/MemoryMetrics.cpp',
330 'vm/NativeObject.cpp',
331 'vm/ObjectGroup.cpp',
335 'vm/ProxyObject.cpp',
337 'vm/ReceiverGuard.cpp',
338 'vm/RegExpObject.cpp',
339 'vm/RegExpStatics.cpp',
341 'vm/SavedStacks.cpp',
343 'vm/SelfHosting.cpp',
345 'vm/SharedArrayObject.cpp',
346 'vm/SharedImmutableStringsCache.cpp',
350 'vm/StringBuffer.cpp',
351 'vm/StructuredClone.cpp',
353 'vm/TaggedProto.cpp',
355 'vm/TypedArrayObject.cpp',
356 'vm/TypeInference.cpp',
358 'vm/UbiNodeCensus.cpp',
359 'vm/UbiNodeShortestPaths.cpp',
360 'vm/UnboxedObject.cpp',
366 'wasm/WasmBaselineCompile.cpp',
367 'wasm/WasmBinaryIterator.cpp',
368 'wasm/WasmBinaryToAST.cpp',
369 'wasm/WasmBinaryToExperimentalText.cpp',
370 'wasm/WasmBinaryToText.cpp',
371 'wasm/WasmBuiltins.cpp',
373 'wasm/WasmCompartment.cpp',
374 'wasm/WasmCompile.cpp',
375 'wasm/WasmDebug.cpp',
376 'wasm/WasmFrameIterator.cpp',
377 'wasm/WasmGenerator.cpp',
378 'wasm/WasmInstance.cpp',
379 'wasm/WasmIonCompile.cpp',
381 'wasm/WasmModule.cpp',
382 'wasm/WasmSignalHandlers.cpp',
383 'wasm/WasmStubs.cpp',
384 'wasm/WasmTable.cpp',
385 'wasm/WasmTextToBinary.cpp',
386 'wasm/WasmTextUtils.cpp',
387 'wasm/WasmTypes.cpp',
388 'wasm/WasmValidate.cpp'
391 # jsarray.cpp and jsatom.cpp cannot be built in unified mode because
392 # xpcshell is broken during packaging when compiled with gcc-4.8.2
393 # builtin/RegExp.cpp cannot be built in unified mode because it is built
395 # frontend/Parser.cpp cannot be built in unified mode because of explicit
396 # template instantiations.
397 # jsdtoa.cpp cannot be built in unified mode because we want to suppress
398 # compiler warnings in third-party dtoa.c.
399 # jsmath.cpp cannot be built in unified mode because it needs to re-#define the
400 # RtlGenRandom declaration's calling convention in <ntsecapi.h> on Windows.
401 # jsutil.cpp cannot be built in unified mode because it is needed for
402 # check-vanilla-allocations.
403 # StoreBuffer.cpp cannot be built in unified because its template
404 # instantiations may or may not be needed depending on what it gets bundled
406 # vm/Interpreter.cpp is gigantic and destroys incremental build times for any
407 # files unlucky enough to be unified with it.
409 'builtin/RegExp.cpp',
410 'frontend/Parser.cpp',
411 'gc/StoreBuffer.cpp',
417 'vm/Interpreter.cpp',
420 if CONFIG['JS_POSIX_NSPR']:
425 if CONFIG['MOZ_INSTRUMENTS']:
427 'devtools/Instruments.cpp',
430 if CONFIG['ENABLE_TRACE_LOGGING']:
432 'vm/TraceLogging.cpp',
433 'vm/TraceLoggingGraph.cpp',
434 'vm/TraceLoggingTypes.cpp',
437 if not CONFIG['ENABLE_ION']:
439 'jit/none/Trampoline-none.cpp'
441 elif CONFIG['JS_CODEGEN_X86'] or CONFIG['JS_CODEGEN_X64']:
443 'jit/x86-shared/Architecture-x86-shared.cpp',
444 'jit/x86-shared/Assembler-x86-shared.cpp',
445 'jit/x86-shared/AssemblerBuffer-x86-shared.cpp',
446 'jit/x86-shared/BaselineCompiler-x86-shared.cpp',
447 'jit/x86-shared/BaselineIC-x86-shared.cpp',
448 'jit/x86-shared/CodeGenerator-x86-shared.cpp',
449 'jit/x86-shared/Lowering-x86-shared.cpp',
450 'jit/x86-shared/MacroAssembler-x86-shared.cpp',
451 'jit/x86-shared/MoveEmitter-x86-shared.cpp',
454 'jit/x86-shared/Disassembler-x86-shared.cpp', # using namespace js::jit::X86Encoding;
456 if CONFIG['JS_CODEGEN_X64']:
458 'jit/x64/Assembler-x64.cpp',
459 'jit/x64/Bailouts-x64.cpp',
460 'jit/x64/BaselineCompiler-x64.cpp',
461 'jit/x64/BaselineIC-x64.cpp',
462 'jit/x64/CodeGenerator-x64.cpp',
463 'jit/x64/Lowering-x64.cpp',
464 'jit/x64/MacroAssembler-x64.cpp',
465 'jit/x64/SharedIC-x64.cpp',
466 'jit/x64/Trampoline-x64.cpp',
470 'jit/x86/Assembler-x86.cpp',
471 'jit/x86/Bailouts-x86.cpp',
472 'jit/x86/BaselineCompiler-x86.cpp',
473 'jit/x86/BaselineIC-x86.cpp',
474 'jit/x86/CodeGenerator-x86.cpp',
475 'jit/x86/Lowering-x86.cpp',
476 'jit/x86/MacroAssembler-x86.cpp',
477 'jit/x86/SharedIC-x86.cpp',
478 'jit/x86/Trampoline-x86.cpp',
480 elif CONFIG['JS_CODEGEN_ARM']:
482 'jit/arm/Architecture-arm.cpp',
483 'jit/arm/Assembler-arm.cpp',
484 'jit/arm/Bailouts-arm.cpp',
485 'jit/arm/BaselineCompiler-arm.cpp',
486 'jit/arm/BaselineIC-arm.cpp',
487 'jit/arm/CodeGenerator-arm.cpp',
488 'jit/arm/disasm/Constants-arm.cpp',
489 'jit/arm/disasm/Disasm-arm.cpp',
490 'jit/arm/Lowering-arm.cpp',
491 'jit/arm/MacroAssembler-arm.cpp',
492 'jit/arm/MoveEmitter-arm.cpp',
493 'jit/arm/SharedIC-arm.cpp',
494 'jit/arm/Trampoline-arm.cpp',
496 if CONFIG['JS_SIMULATOR_ARM']:
498 'jit/arm/Simulator-arm.cpp'
500 elif CONFIG['OS_ARCH'] == 'Darwin':
502 'jit/arm/llvm-compiler-rt/arm/aeabi_idivmod.S',
503 'jit/arm/llvm-compiler-rt/arm/aeabi_uidivmod.S',
505 elif CONFIG['JS_CODEGEN_ARM64']:
507 'jit/arm64/Architecture-arm64.cpp',
508 'jit/arm64/Assembler-arm64.cpp',
509 'jit/arm64/Bailouts-arm64.cpp',
510 'jit/arm64/BaselineIC-arm64.cpp',
511 'jit/arm64/CodeGenerator-arm64.cpp',
512 'jit/arm64/Lowering-arm64.cpp',
513 'jit/arm64/MacroAssembler-arm64.cpp',
514 'jit/arm64/MoveEmitter-arm64.cpp',
515 'jit/arm64/SharedIC-arm64.cpp',
516 'jit/arm64/Trampoline-arm64.cpp',
517 'jit/arm64/vixl/Assembler-vixl.cpp',
518 'jit/arm64/vixl/Cpu-vixl.cpp',
519 'jit/arm64/vixl/Decoder-vixl.cpp',
520 'jit/arm64/vixl/Disasm-vixl.cpp',
521 'jit/arm64/vixl/Instructions-vixl.cpp',
522 'jit/arm64/vixl/Instrument-vixl.cpp',
523 'jit/arm64/vixl/MacroAssembler-vixl.cpp',
524 'jit/arm64/vixl/MozAssembler-vixl.cpp',
525 'jit/arm64/vixl/MozInstructions-vixl.cpp',
526 'jit/arm64/vixl/Utils-vixl.cpp'
528 if CONFIG['JS_SIMULATOR_ARM64']:
530 'jit/arm64/vixl/Debugger-vixl.cpp',
531 'jit/arm64/vixl/Logic-vixl.cpp',
532 'jit/arm64/vixl/MozSimulator-vixl.cpp',
533 'jit/arm64/vixl/Simulator-vixl.cpp'
535 elif CONFIG['JS_CODEGEN_MIPS32'] or CONFIG['JS_CODEGEN_MIPS64']:
537 'jit/mips-shared/Architecture-mips-shared.cpp',
538 'jit/mips-shared/Assembler-mips-shared.cpp',
539 'jit/mips-shared/Bailouts-mips-shared.cpp',
540 'jit/mips-shared/BaselineCompiler-mips-shared.cpp',
541 'jit/mips-shared/BaselineIC-mips-shared.cpp',
542 'jit/mips-shared/CodeGenerator-mips-shared.cpp',
543 'jit/mips-shared/Lowering-mips-shared.cpp',
544 'jit/mips-shared/MacroAssembler-mips-shared.cpp',
545 'jit/mips-shared/MoveEmitter-mips-shared.cpp',
547 if CONFIG['JS_CODEGEN_MIPS32']:
549 'jit/mips32/Architecture-mips32.cpp',
550 'jit/mips32/Assembler-mips32.cpp',
551 'jit/mips32/Bailouts-mips32.cpp',
552 'jit/mips32/BaselineCompiler-mips32.cpp',
553 'jit/mips32/BaselineIC-mips32.cpp',
554 'jit/mips32/CodeGenerator-mips32.cpp',
555 'jit/mips32/Lowering-mips32.cpp',
556 'jit/mips32/MacroAssembler-mips32.cpp',
557 'jit/mips32/MoveEmitter-mips32.cpp',
558 'jit/mips32/SharedIC-mips32.cpp',
559 'jit/mips32/Trampoline-mips32.cpp',
561 if CONFIG['JS_SIMULATOR_MIPS32']:
563 'jit/mips32/Simulator-mips32.cpp'
565 elif CONFIG['JS_CODEGEN_MIPS64']:
567 'jit/mips64/Architecture-mips64.cpp',
568 'jit/mips64/Assembler-mips64.cpp',
569 'jit/mips64/Bailouts-mips64.cpp',
570 'jit/mips64/BaselineCompiler-mips64.cpp',
571 'jit/mips64/BaselineIC-mips64.cpp',
572 'jit/mips64/CodeGenerator-mips64.cpp',
573 'jit/mips64/Lowering-mips64.cpp',
574 'jit/mips64/MacroAssembler-mips64.cpp',
575 'jit/mips64/MoveEmitter-mips64.cpp',
576 'jit/mips64/SharedIC-mips64.cpp',
577 'jit/mips64/Trampoline-mips64.cpp',
579 if CONFIG['JS_SIMULATOR_MIPS64']:
581 'jit/mips64/Simulator-mips64.cpp'
584 if CONFIG['OS_ARCH'] == 'WINNT':
586 'threading/windows/CpuCount.cpp',
587 'threading/windows/Thread.cpp',
591 'threading/posix/CpuCount.cpp',
592 'threading/posix/Thread.cpp',
595 if CONFIG['JS_HAS_CTYPES']:
598 'ctypes/Library.cpp',
600 if not CONFIG['MOZ_SYSTEM_FFI']:
602 '!ctypes/libffi/include',
603 'ctypes/libffi/src/%s' % CONFIG['FFI_TARGET_DIR'],
606 if CONFIG['MOZ_VTUNE']:
608 'vtune/ittnotify_static.c',
609 'vtune/jitprofiling.c',
610 'vtune/VTuneWrapper.cpp',
612 if CONFIG['CC_TYPE'] != 'msvc':
613 SOURCES['vtune/ittnotify_static.c'].flags += ['-Wno-varargs']
615 if CONFIG['HAVE_LINUX_PERF_EVENT_H']:
619 if CONFIG['LINUX_HEADERS_INCLUDES']:
620 SOURCES['perf/pm_linux.cpp'].flags += [CONFIG['LINUX_HEADERS_INCLUDES']]
626 GENERATED_FILES += ['frontend/ReservedWordsGenerated.h']
627 ReservedWordsGenerated = GENERATED_FILES['frontend/ReservedWordsGenerated.h']
628 ReservedWordsGenerated.script = 'frontend/GenerateReservedWords.py'
629 ReservedWordsGenerated.inputs += [
630 'frontend/ReservedWords.h'
639 if CONFIG['NIGHTLY_BUILD']:
640 DEFINES['ENABLE_BINARYDATA'] = True
641 DEFINES['ENABLE_SIMD'] = True
643 if CONFIG['MOZ_DEBUG'] or CONFIG['NIGHTLY_BUILD']:
644 DEFINES['JS_CACHEIR_SPEW'] = True
646 # Also set in shell/moz.build
647 DEFINES['ENABLE_SHARED_ARRAY_BUFFER'] = True
649 DEFINES['EXPORT_JS_API'] = True
651 if CONFIG['JS_HAS_CTYPES']:
652 DEFINES['JS_HAS_CTYPES'] = True
653 for var in ('DLL_PREFIX', 'DLL_SUFFIX'):
654 DEFINES[var] = '"%s"' % CONFIG[var]
656 if CONFIG['MOZ_LINKER']:
657 DEFINES['MOZ_LINKER'] = True
659 if CONFIG['_MSC_VER']:
660 if CONFIG['CPU_ARCH'] == 'x86':
661 SOURCES['builtin/RegExp.cpp'].no_pgo = True # Bug 772303
662 elif CONFIG['CPU_ARCH'] == 'x86_64' and CONFIG['JS_HAS_CTYPES']:
663 SOURCES['ctypes/CTypes.cpp'].no_pgo = True # Bug 810661
664 # Prevent floating point errors caused by VC++ optimizations
665 # XXX We should add this to CXXFLAGS, too?
666 CFLAGS += ['-fp:precise']
667 # C4805 warns mixing bool with other integral types in computation.
668 # But given the conversion from bool is specified, and this is a
669 # pattern widely used in code in js/src, suppress this warning here.
670 CXXFLAGS += ['-wd4805']
671 # C4661 ("no suitable definition provided for explicit template
672 # instantiation request") is emitted for all Parser methods that
673 # have a Parser<FullParseHandler> definition but no
674 # Parser<SyntaxParseHandler> definition, see bug 1167030.
675 CXXFLAGS += ['-wd4661']
676 CXXFLAGS += ['-we4067', '-we4258', '-we4275']
677 CXXFLAGS += ['-wd4146'] # FIXME: unary minus operator applied to unsigned type (bug 1229189)
679 # This is intended as a temporary hack to support building with VS2015.
680 # 'noexcept' used with no exception handling mode specified;
681 # termination on exception is not guaranteed. Specify /EHsc
682 CXXFLAGS += ['-wd4577']
683 CXXFLAGS += ['-wd4312']
685 CFLAGS += CONFIG['MOZ_ICU_CFLAGS']
686 CXXFLAGS += CONFIG['MOZ_ICU_CFLAGS']
688 # Prepare self-hosted JS code for embedding
689 GENERATED_FILES += [('selfhosted.out.h', 'selfhosted.js')]
690 selfhosted = GENERATED_FILES[('selfhosted.out.h', 'selfhosted.js')]
691 selfhosted.script = 'builtin/embedjs.py:generate_selfhosted'
692 selfhosted.inputs = [
694 'builtin/TypedObjectConstants.h',
695 'builtin/SelfHostingDefines.h',
696 'builtin/Utilities.js',
698 'builtin/AsyncIteration.js',
699 'builtin/Classes.js',
702 'builtin/Function.js',
703 'builtin/Generator.js',
705 'builtin/IntlCurrency.js',
706 'builtin/IntlData.js',
707 'builtin/Iterator.js',
712 'builtin/Promise.js',
713 'builtin/Reflect.js',
715 'builtin/RegExpGlobalReplaceOpt.h.js',
716 'builtin/RegExpLocalReplaceOpt.h.js',
719 'builtin/Sorting.js',
720 'builtin/TypedArray.js',
721 'builtin/TypedObject.js',
722 'builtin/WeakMap.js',
726 if CONFIG['JS_HAS_CTYPES']:
727 if CONFIG['MOZ_SYSTEM_FFI']:
728 CXXFLAGS += CONFIG['MOZ_FFI_CFLAGS']
730 # Windows needs this to be linked with a static library.
731 DEFINES['FFI_BUILDING'] = True
733 if CONFIG['GNU_CXX']:
734 CXXFLAGS += ['-Wno-shadow', '-Werror=format']
736 # Suppress warnings in third-party code.
737 if CONFIG['CLANG_CXX']:
738 SOURCES['jsdtoa.cpp'].flags += ['-Wno-implicit-fallthrough']
740 if CONFIG['OS_ARCH'] == 'WINNT':
741 DEFINES['NOMINMAX'] = True
743 # Generate GC statistics phase data.
744 GENERATED_FILES += ['gc/StatsPhasesGenerated.h']
745 StatsPhasesGeneratedHeader = GENERATED_FILES['gc/StatsPhasesGenerated.h']
746 StatsPhasesGeneratedHeader.script = 'gc/GenerateStatsPhases.py:generateHeader'
747 GENERATED_FILES += ['gc/StatsPhasesGenerated.cpp']
748 StatsPhasesGeneratedCpp = GENERATED_FILES['gc/StatsPhasesGenerated.cpp']
749 StatsPhasesGeneratedCpp.script = 'gc/GenerateStatsPhases.py:generateCpp'