Source code
Revision control
Copy as Markdown
Other Tools
# -*- Mode: python; 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
FINAL_LIBRARY = "js"
# Includes should be relative to parent path
LOCAL_INCLUDES += ["!..", ".."]
include("../js-compileflags.mozbuild")
include("../js-config.mozbuild")
include("../js-cxxflags.mozbuild")
UNIFIED_SOURCES += [
"Activation.cpp",
"ArgumentsObject.cpp",
"ArrayBufferObject.cpp",
"ArrayBufferObjectMaybeShared.cpp",
"ArrayBufferViewObject.cpp",
"AsyncFunction.cpp",
"AsyncIteration.cpp",
"BigIntType.cpp",
"BoundFunctionObject.cpp",
"BuildId.cpp",
"BuiltinObjectKind.cpp",
"BytecodeLocation.cpp",
"BytecodeUtil.cpp",
"CallAndConstruct.cpp",
"CallNonGenericMethod.cpp",
"CharacterEncoding.cpp",
"CodeCoverage.cpp",
"Compartment.cpp",
"CompilationAndEvaluation.cpp",
"Compression.cpp",
"ConcurrentDelazification.cpp",
"DateTime.cpp",
"DOMEventDispatch.cpp",
"EnvironmentObject.cpp",
"EqualityOperations.cpp",
"ErrorMessages.cpp",
"ErrorObject.cpp",
"ErrorReporting.cpp",
"Exception.cpp",
"ForOfIterator.cpp",
"FrameIter.cpp",
"FunctionFlags.cpp",
"GeckoProfiler.cpp",
"GeneratorObject.cpp",
"GetterSetter.cpp",
"GlobalObject.cpp",
"HelperThreads.cpp",
"Id.cpp",
"Initialization.cpp",
"Int128.cpp",
"InternalThreadPool.cpp",
"InvalidatingFuse.cpp",
"Iteration.cpp",
"Iterator.cpp",
"JitActivation.cpp",
"JSAtomUtils.cpp",
"JSContext.cpp",
"JSFunction.cpp",
"JSObject.cpp",
"JSONParser.cpp",
"JSONPrinter.cpp",
"JSScript.cpp",
"List.cpp",
"Logging.cpp",
"MemoryMetrics.cpp",
"Modules.cpp",
"NativeObject.cpp",
"ObjectFuse.cpp",
"ObjectWithStashedPointer.cpp",
"OffThreadPromiseRuntimeState.cpp",
"PlainObject.cpp",
"Prefs.cpp",
"Printer.cpp",
"Probes.cpp",
"PropertyAndElement.cpp",
"PropertyDescriptor.cpp",
"PropMap.cpp",
"ProxyObject.cpp",
"Realm.cpp",
"RealmFuses.cpp",
"RegExpObject.cpp",
"RegExpStatics.cpp",
"Runtime.cpp",
"RuntimeFuses.cpp",
"SavedStacks.cpp",
"Scope.cpp",
"SelfHosting.cpp",
"Shape.cpp",
"ShapeZone.cpp",
"SharedArrayObject.cpp",
"SharedImmutableStringsCache.cpp",
"SharedScriptDataTableHolder.cpp",
"SourceHook.cpp",
"Stack.cpp",
"StaticStrings.cpp",
"StencilObject.cpp",
"StringType.cpp",
"SymbolType.cpp",
"TaggedProto.cpp",
"ThrowMsgKind.cpp",
"Time.cpp",
"ToSource.cpp",
"TypedArrayObject.cpp",
"UbiNode.cpp",
"UbiNodeCensus.cpp",
"UbiNodeShortestPaths.cpp",
"UsageStatistics.cpp",
"Value.cpp",
"Warnings.cpp",
"Watchtower.cpp",
"WellKnownAtom.cpp",
"WindowProxy.cpp",
"Xdr.cpp",
]
if CONFIG["ENABLE_EXPLICIT_RESOURCE_MANAGEMENT"]:
UNIFIED_SOURCES += [
"DisposableRecord.cpp",
]
# Interpreter.cpp is gigantic and destroys incremental build times for any files
# unlucky enough to be unified with it.
SOURCES += [
"Interpreter.cpp",
"ProfilingStack.cpp",
]
if CONFIG["ENABLE_PORTABLE_BASELINE_INTERP"]:
SOURCES += [
"PortableBaselineInterpret.cpp",
]
if CONFIG["FUZZING_INTERFACES"] and CONFIG["LIBFUZZER"]:
# In addition to regular coverage provided by trace-pc-guard,
# LibFuzzer can use trace-cmp to instrument various compare instructions.
# Only use this feature on source files that do a lot of constant
# comparisons that would otherwise be hard to guess by LibFuzzer,
# as it comes with a larger overhead (requires -use_value_profile=1).
include("/tools/fuzzing/libfuzzer-flags.mozbuild")
# Any files that are targeted by LibFuzzer should be added here so they can
# be built with the necessary instrumentation flags, rather than just building
# the whole JS engine with instrumentation, to reduce the amount of noise.
SOURCES += [
"StructuredClone.cpp",
]
SOURCES["StructuredClone.cpp"].flags += libfuzzer_flags
else:
UNIFIED_SOURCES += [
"StructuredClone.cpp",
]
if CONFIG["USE_LIBZ_RS"]:
DEFINES["USE_LIBZ_RS"] = True
if CONFIG["FUZZING_JS_FUZZILLI"]:
include("/tools/fuzzing/libfuzzer-config.mozbuild")