gecko/js/src/moz.build

352 lines
8.6 KiB
Python

# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# 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/.
DIRS += ['config']
if CONFIG['DEHYDRA_PATH']:
DIRS += ['analysis-tests']
if CONFIG['JS_NATIVE_EDITLINE']:
DIRS += ['editline']
# editline needs to get built before the shell
if not CONFIG['JS_DISABLE_SHELL']:
DIRS += ['shell']
TEST_DIRS += ['jsapi-tests', 'tests', 'gdb']
MODULE = 'js'
if CONFIG['JS_STANDALONE']:
LIBRARY_NAME = 'mozjs-%s.%s%s' % (CONFIG['MOZJS_MAJOR_VERSION'], CONFIG['MOZJS_MINOR_VERSION'], CONFIG['MOZJS_ALPHA'])
else:
LIBRARY_NAME = 'mozjs'
CONFIGURE_SUBST_FILES += ['devtools/rootAnalysis/Makefile']
# Changes to internal header files, used externally, massively slow down
# browser builds. Don't add new files here unless you know what you're
# doing!
EXPORTS += [
'js.msg',
'jsalloc.h',
'jsapi.h',
'jsbytecode.h',
'jsclist.h',
'jscpucfg.h',
'jsfriendapi.h',
'jsprf.h',
'jsprototypes.h',
'jsproxy.h',
'jspubtd.h',
'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
# that we ensure we don't over-expose our internal integer typedefs. Note that
# LegacyIntTypes.h below is deliberately exempted from this requirement.
EXPORTS.js += [
'../public/Anchor.h',
'../public/CallArgs.h',
'../public/CallNonGenericMethod.h',
'../public/CharacterEncoding.h',
'../public/Class.h',
'../public/Date.h',
'../public/GCAPI.h',
'../public/HashTable.h',
'../public/HeapAPI.h',
'../public/Id.h',
'../public/LegacyIntTypes.h',
'../public/MemoryMetrics.h',
'../public/OldDebugAPI.h',
'../public/ProfilingStack.h',
'../public/PropertyKey.h',
'../public/RequiredDefines.h',
'../public/RootingAPI.h',
'../public/StructuredClone.h',
'../public/Tracer.h',
'../public/TypeDecls.h',
'../public/Utility.h',
'../public/Value.h',
'../public/Vector.h',
]
CPP_SOURCES += [
'ArgumentsObject.cpp',
'Barrier.cpp',
'BytecodeCompiler.cpp',
'BytecodeEmitter.cpp',
'CallNonGenericMethod.cpp',
'CharacterEncoding.cpp',
'DateTime.cpp',
'Debugger.cpp',
'Eval.cpp',
'ExecutableAllocator.cpp',
'FoldConstants.cpp',
'ForkJoin.cpp',
'GlobalObject.cpp',
'Id.cpp',
'Interpreter.cpp',
'Intl.cpp',
'Iteration.cpp',
'LifoAlloc.cpp',
'MapObject.cpp',
'Marking.cpp',
'Memory.cpp',
'Module.cpp',
'Monitor.cpp',
'NameFunctions.cpp',
'Nursery.cpp',
'Object.cpp',
'ObjectImpl.cpp',
'OldDebugAPI.cpp',
'PageBlock.cpp',
'ParallelArray.cpp',
'ParseMaps.cpp',
'ParseNode.cpp',
'Parser.cpp',
'Probes.cpp',
'Profilers.cpp',
'PropertyKey.cpp',
'ProxyObject.cpp',
'RegExp.cpp',
'RegExpObject.cpp',
'RegExpStatics.cpp',
'RootMarking.cpp',
'Runtime.cpp',
'SPSProfiler.cpp',
'ScopeObject.cpp',
'SelfHosting.cpp',
'Shape.cpp',
'Stack.cpp',
'Statistics.cpp',
'StoreBuffer.cpp',
'String.cpp',
'StringBuffer.cpp',
'StructuredClone.cpp',
'TestingFunctions.cpp',
'ThreadPool.cpp',
'TokenStream.cpp',
'Tracer.cpp',
'TypeRepresentation.cpp',
'TypedArrayObject.cpp',
'TypedObject.cpp',
'Unicode.cpp',
'Value.cpp',
'Verifier.cpp',
'Xdr.cpp',
'YarrCanonicalizeUCS2.cpp',
'YarrInterpreter.cpp',
'YarrPattern.cpp',
'YarrSyntaxChecker.cpp',
'Zone.cpp',
'jsalloc.cpp',
'jsanalyze.cpp',
'jsapi.cpp',
'jsarray.cpp',
'jsatom.cpp',
'jsbool.cpp',
'jscntxt.cpp',
'jscompartment.cpp',
'jscrashreport.cpp',
'jsdate.cpp',
'jsdtoa.cpp',
'jsexn.cpp',
'jsfriendapi.cpp',
'jsfun.cpp',
'jsgc.cpp',
'jsinfer.cpp',
'jsiter.cpp',
'jsmath.cpp',
'jsmemorymetrics.cpp',
'jsnativestack.cpp',
'jsnum.cpp',
'jsobj.cpp',
'json.cpp',
'jsonparser.cpp',
'jsopcode.cpp',
'jsperf.cpp',
'jsprf.cpp',
'jspropertytree.cpp',
'jsproxy.cpp',
'jsreflect.cpp',
'jsscript.cpp',
'jsstr.cpp',
'jsutil.cpp',
'jswatchpoint.cpp',
'jsweakmap.cpp',
'jsworkers.cpp',
'jswrapper.cpp',
'prmjtime.cpp',
'sharkctl.cpp',
]
if CONFIG['MOZ_INSTRUMENTS']:
CPP_SOURCES += [
'Instruments.cpp',
]
if CONFIG['ENABLE_TRACE_LOGGING']:
CPP_SOURCES += [
'TraceLogging.cpp',
]
if CONFIG['ENABLE_ION']:
CPP_SOURCES += [
'AliasAnalysis.cpp',
'AsmJS.cpp',
'AsmJSLink.cpp',
'AsmJSModule.cpp',
'AsmJSSignalHandlers.cpp',
'BacktrackingAllocator.cpp',
'Bailouts.cpp',
'BaselineBailouts.cpp',
'BaselineCompiler-shared.cpp',
'BaselineCompiler.cpp',
'BaselineFrame.cpp',
'BaselineFrameInfo.cpp',
'BaselineIC.cpp',
'BaselineInspector.cpp',
'BaselineJIT.cpp',
'BitSet.cpp',
'BytecodeAnalysis.cpp',
'C1Spewer.cpp',
'CodeGenerator-shared.cpp',
'CodeGenerator.cpp',
'EdgeCaseAnalysis.cpp',
'EffectiveAddressAnalysis.cpp',
'Ion.cpp',
'IonAnalysis.cpp',
'IonBuilder.cpp',
'IonCaches.cpp',
'IonFrames.cpp',
'IonMacroAssembler.cpp',
'IonSpewer.cpp',
'JSONSpewer.cpp',
'PerfSpewer.cpp',
'LICM.cpp',
'LIR.cpp',
'LinearScan.cpp',
'LiveRangeAllocator.cpp',
'Lowering-shared.cpp',
'Lowering.cpp',
'MCallOptimize.cpp',
'MIR.cpp',
'MIRGraph.cpp',
'MoveResolver.cpp',
'ParallelSafetyAnalysis.cpp',
'ParallelFunctions.cpp',
'RangeAnalysis.cpp',
'RegisterAllocator.cpp',
'Safepoints.cpp',
'Snapshots.cpp',
'StupidAllocator.cpp',
'TypePolicy.cpp',
'UnreachableCodeElimination.cpp',
'VMFunctions.cpp',
'ValueNumbering.cpp',
]
if CONFIG['TARGET_CPU'].find('86') != -1:
CPP_SOURCES += [
'Assembler-x86-shared.cpp',
'BaselineCompiler-x86-shared.cpp',
'BaselineIC-x86-shared.cpp',
'CodeGenerator-x86-shared.cpp',
'IonFrames-x86-shared.cpp',
'Lowering-x86-shared.cpp',
'MoveEmitter-x86-shared.cpp',
]
if CONFIG['TARGET_CPU'] == 'x86_64':
CPP_SOURCES += [
'Assembler-x64.cpp',
'Bailouts-x64.cpp',
'BaselineCompiler-x64.cpp',
'BaselineIC-x64.cpp',
'CodeGenerator-x64.cpp',
'Lowering-x64.cpp',
'MacroAssembler-x64.cpp',
'Trampoline-x64.cpp',
]
else:
CPP_SOURCES += [
'Assembler-x86.cpp',
'Bailouts-x86.cpp',
'BaselineCompiler-x86.cpp',
'BaselineIC-x86.cpp',
'CodeGenerator-x86.cpp',
'Lowering-x86.cpp',
'MacroAssembler-x86.cpp',
'Trampoline-x86.cpp',
]
elif CONFIG['TARGET_CPU'].find('arm') != -1:
CPP_SOURCES += [
'Architecture-arm.cpp',
'Assembler-arm.cpp',
'Bailouts-arm.cpp',
'BaselineCompiler-arm.cpp',
'BaselineIC-arm.cpp',
'CodeGenerator-arm.cpp',
'IonFrames-arm.cpp',
'Lowering-arm.cpp',
'MacroAssembler-arm.cpp',
'MoveEmitter-arm.cpp',
'Trampoline-arm.cpp',
]
if CONFIG['OS_ARCH'] == 'WINNT':
CPP_SOURCES += [
'ExecutableAllocatorWin.cpp',
'OSAllocatorWin.cpp',
]
elif CONFIG['OS_ARCH'] == 'OS2':
CPP_SOURCES += [
'ExecutableAllocatorOS2.cpp',
'OSAllocatorOS2.cpp',
]
else:
CPP_SOURCES += [
'ExecutableAllocatorPosix.cpp',
'OSAllocatorPosix.cpp',
]
if CONFIG['ENABLE_ION'] or CONFIG['ENABLE_YARR_JIT']:
CPP_SOURCES += [
'ARMAssembler.cpp',
'MacroAssemblerARM.cpp',
'MacroAssemblerX86Common.cpp',
]
if CONFIG['ENABLE_YARR_JIT']:
CPP_SOURCES += [
'YarrJIT.cpp'
]
if CONFIG['JS_HAS_CTYPES']:
CPP_SOURCES += [
'CTypes.cpp',
'Library.cpp',
]
if CONFIG['MOZ_VTUNE']:
CSRCS += [
'vtune/jitprofiling.c'
]
if CONFIG['HAVE_LINUX_PERF_EVENT_H']:
CPP_SOURCES += [
'pm_linux.cpp'
]
else:
CPP_SOURCES += [
'pm_stub.cpp'
]
MSVC_ENABLE_PGO = True