Backed out 8 changesets (bug 1873776) for causing vendor failures. CLOSED TREE
[gecko.git] / js / src / moz.build
blob3d00cb08c6521a2cc5946d86e43bd6ac84cb34e1
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/.
7 include("js-config.mozbuild")
8 include("js-cxxflags.mozbuild")
10 # Directory metadata
11 component_engine = ("Core", "JavaScript Engine")
12 component_gc = ("Core", "JavaScript: GC")
13 component_intl = ("Core", "JavaScript: Internationalization API")
14 component_jit = ("Core", "JavaScript Engine: JIT")
15 component_stl = ("Core", "JavaScript: Standard Library")
16 component_wasm = ("Core", "Javascript: Web Assembly")
18 FILES_PER_UNIFIED_FILE = 6
20 # Prevent redefining FILES_PER_UNIFIED_FILE in each sub-directory of js. This
21 # will not escape this directory.
22 export("FILES_PER_UNIFIED_FILE")
24 with Files("*"):
25     BUG_COMPONENT = component_engine
27 with Files("wasm/**"):
28     BUG_COMPONENT = component_wasm
29 with Files("builtin/**"):
30     BUG_COMPONENT = component_stl
31 with Files("ctypes/**"):
32     BUG_COMPONENT = ("Core", "js-ctypes")
33 with Files("gc/**"):
34     BUG_COMPONENT = component_gc
35 with Files("jit/**"):
36     BUG_COMPONENT = component_jit
38 # File-specific metadata
39 for gcfile in ["devtools/rootAnalysis", "devtools/gc-ubench", "devtools/gctrace"]:
40     with Files(gcfile):
41         BUG_COMPONENT = component_gc
43 for stlfile in ["jsdate.*", "jsnum.*"]:
44     with Files(stlfile):
45         BUG_COMPONENT = component_stl
47 with Files("builtin/intl/*"):
48     BUG_COMPONENT = component_intl
50 if not CONFIG["JS_DISABLE_SHELL"]:
51     DIRS += [
52         "rust",
53         "shell",
54     ]
56     TEST_DIRS += [
57         "gdb",
58         "jsapi-tests",
59         "tests",
60     ]
62     if CONFIG["FUZZING_INTERFACES"]:
63         TEST_DIRS += [
64             "fuzz-tests",
65         ]
67 if CONFIG["FUZZING_INTERFACES"] and CONFIG["LIBFUZZER"]:
68     # In addition to regular coverage provided by trace-pc-guard,
69     # LibFuzzer can use trace-cmp to instrument various compare instructions.
70     # Only use this feature on source files that do a lot of constant
71     # comparisons that would otherwise be hard to guess by LibFuzzer,
72     # as it comes with a larger overhead (requires -use_value_profile=1).
73     include("/tools/fuzzing/libfuzzer-flags.mozbuild")
75     # Any files that are targeted by LibFuzzer should be added here so they can
76     # be built with the necessary instrumentation flags, rather than just building
77     # the whole JS engine with instrumentation, to reduce the amount of noise.
78     SOURCES += [
79         "vm/StructuredClone.cpp",
80     ]
81     SOURCES["vm/StructuredClone.cpp"].flags += libfuzzer_flags
82 else:
83     UNIFIED_SOURCES += [
84         "vm/StructuredClone.cpp",
85     ]
87 if CONFIG["FUZZING_JS_FUZZILLI"]:
88     # When building for Fuzzilli, we instrument everything with standard
89     # trace-pc instrumentation.
90     include("/tools/fuzzing/libfuzzer-config.mozbuild")
92 CONFIGURE_DEFINE_FILES += [
93     "js-confdefs.h",
96 if not CONFIG["JS_STANDALONE"]:
97     CONFIGURE_SUBST_FILES += [
98         "../../config/autoconf-js.mk",
99         "../../config/emptyvars-js.mk",
100     ]
102 CONFIGURE_DEFINE_FILES += [
103     "js-config.h",
106 if CONFIG["HAVE_DTRACE"]:
107     GeneratedFile("javascript-trace.h")
108     EXPORTS += ["!javascript-trace.h"]
110 # Changes to internal header files, used externally, massively slow down
111 # browser builds.  Don't add new files here unless you know what you're
112 # doing!
113 EXPORTS += [
114     "!js-config.h",
115     "jsapi.h",
116     "jsfriendapi.h",
117     "jspubtd.h",
118     "jstypes.h",
121 EXPORTS.js += [
122     "../public/AllocationLogging.h",
123     "../public/AllocationRecording.h",
124     "../public/AllocPolicy.h",
125     "../public/Array.h",
126     "../public/ArrayBuffer.h",
127     "../public/ArrayBufferMaybeShared.h",
128     "../public/BigInt.h",
129     "../public/BuildId.h",
130     "../public/CallAndConstruct.h",
131     "../public/CallArgs.h",
132     "../public/CallNonGenericMethod.h",
133     "../public/CharacterEncoding.h",
134     "../public/Class.h",
135     "../public/ColumnNumber.h",
136     "../public/ComparisonOperators.h",
137     "../public/CompilationAndEvaluation.h",
138     "../public/CompileOptions.h",
139     "../public/Context.h",
140     "../public/ContextOptions.h",
141     "../public/Conversions.h",
142     "../public/Date.h",
143     "../public/Debug.h",
144     "../public/Equality.h",
145     "../public/ErrorInterceptor.h",
146     "../public/ErrorReport.h",
147     "../public/Exception.h",
148     "../public/ForOfIterator.h",
149     "../public/GCAnnotations.h",
150     "../public/GCAPI.h",
151     "../public/GCHashTable.h",
152     "../public/GCPolicyAPI.h",
153     "../public/GCTypeMacros.h",
154     "../public/GCVariant.h",
155     "../public/GCVector.h",
156     "../public/GlobalObject.h",
157     "../public/HashTable.h",
158     "../public/HeapAPI.h",
159     "../public/HelperThreadAPI.h",
160     "../public/Id.h",
161     "../public/Initialization.h",
162     "../public/Interrupt.h",
163     "../public/Iterator.h",
164     "../public/JitCodeAPI.h",
165     "../public/JSON.h",
166     "../public/LocaleSensitive.h",
167     "../public/MapAndSet.h",
168     "../public/MemoryCallbacks.h",
169     "../public/MemoryFunctions.h",
170     "../public/MemoryMetrics.h",
171     "../public/Modules.h",
172     "../public/Object.h",
173     "../public/Principals.h",
174     "../public/Printer.h",
175     "../public/Printf.h",
176     "../public/ProfilingCategory.h",
177     "../public/ProfilingFrameIterator.h",
178     "../public/ProfilingStack.h",
179     "../public/Promise.h",
180     "../public/PropertyAndElement.h",
181     "../public/PropertyDescriptor.h",
182     "../public/PropertySpec.h",
183     "../public/ProtoKey.h",
184     "../public/Proxy.h",
185     "../public/Realm.h",
186     "../public/RealmIterators.h",
187     "../public/RealmOptions.h",
188     "../public/RefCounted.h",
189     "../public/RegExp.h",
190     "../public/RegExpFlags.h",
191     "../public/Result.h",
192     "../public/RootingAPI.h",
193     "../public/SavedFrameAPI.h",
194     "../public/ScalarType.h",
195     "../public/ScriptPrivate.h",
196     "../public/ShadowRealmCallbacks.h",
197     "../public/SharedArrayBuffer.h",
198     "../public/SliceBudget.h",
199     "../public/SourceText.h",
200     "../public/StableStringChars.h",
201     "../public/Stack.h",
202     "../public/StreamConsumer.h",
203     "../public/String.h",
204     "../public/StructuredClone.h",
205     "../public/Symbol.h",
206     "../public/TelemetryTimers.h",
207     "../public/TraceKind.h",
208     "../public/TracingAPI.h",
209     "../public/Transcoding.h",
210     "../public/TypeDecls.h",
211     "../public/UbiNode.h",
212     "../public/UbiNodeBreadthFirst.h",
213     "../public/UbiNodeCensus.h",
214     "../public/UbiNodeDominatorTree.h",
215     "../public/UbiNodePostOrder.h",
216     "../public/UbiNodeShortestPaths.h",
217     "../public/UbiNodeUtils.h",
218     "../public/UniquePtr.h",
219     "../public/Utility.h",
220     "../public/Value.h",
221     "../public/ValueArray.h",
222     "../public/Vector.h",
223     "../public/WaitCallbacks.h",
224     "../public/Warnings.h",
225     "../public/WasmFeatures.h",
226     "../public/WasmModule.h",
227     "../public/WeakMap.h",
228     "../public/WeakMapPtr.h",
229     "../public/Wrapper.h",
230     "../public/WrapperCallbacks.h",
231     "../public/Zone.h",
234 # This lives in mozglue/baseprofiler but we re-publish ourselves to support
235 # standalone SpiderMonkey configurations.
236 EXPORTS.js += [
237     "!/mozglue/baseprofiler/public/ProfilingCategoryList.h",
240 # Public APIs that are experimental: the precise contour of the APIs may still
241 # change, but they're at least plausible first passes at designing something.
242 # We expose them as-is, buyer beware.
243 EXPORTS.js.experimental += [
244     "../public/experimental/CodeCoverage.h",
245     "../public/experimental/CompileScript.h",
246     "../public/experimental/CTypes.h",
247     "../public/experimental/Intl.h",
248     "../public/experimental/JitInfo.h",
249     "../public/experimental/JSStencil.h",
250     "../public/experimental/PCCountProfiling.h",
251     "../public/experimental/SourceHook.h",
252     "../public/experimental/TypedData.h",
255 # Friend APIs are APIs that either basically SpiderMonkey-internal, or their
256 # contours are gross and terrible -- but the functionality is too important to
257 # some embedder (often, Gecko) to just not expose anything or to agonize through
258 # a clean design.  Use this only if you absolutely must, and feel free to
259 # propose clean APIs to replace what's here!
260 EXPORTS.js.friend += [
261     "../public/friend/DOMProxy.h",
262     "../public/friend/DumpFunctions.h",
263     "../public/friend/ErrorMessages.h",
264     "../public/friend/ErrorNumbers.msg",
265     "../public/friend/JSMEnvironment.h",
266     "../public/friend/PerformanceHint.h",
267     "../public/friend/StackLimits.h",
268     "../public/friend/UsageStatistics.h",
269     "../public/friend/WindowProxy.h",
270     "../public/friend/XrayJitInfo.h",
273 # "Shadow" API defines the internal layout of public JSAPI types like |JSObject|
274 # and |JSString|, so that other *inline* public functions can efficiently access
275 # their internal fields.
277 # Embedders must never include these headers themselves or use their contents.
278 # These internal layout details are publicly exposed for access *only* so that
279 # other public API definitions may use them.
281 # When adding new shadow structure definitions (or new fields/static constants
282 # to existing structures) for access by inline methods, make sure to add static
283 # asserts to the original header file to ensure that offsets and duplicated
284 # constants are consistent.  (Long term, it might be worth figuring out some way
285 # to back actual implementations *with* these shadow definitions to eliminate
286 # this requirement.)
287 EXPORTS.js.shadow += [
288     "../public/shadow/Function.h",
289     "../public/shadow/Object.h",
290     "../public/shadow/Realm.h",
291     "../public/shadow/Shape.h",
292     "../public/shadow/String.h",
293     "../public/shadow/Symbol.h",
294     "../public/shadow/Zone.h",
297 UNIFIED_SOURCES += [
298     "builtin/Array.cpp",
299     "builtin/AtomicsObject.cpp",
300     "builtin/BigInt.cpp",
301     "builtin/Boolean.cpp",
302     "builtin/DataViewObject.cpp",
303     "builtin/Eval.cpp",
304     "builtin/FinalizationRegistryObject.cpp",
305     "builtin/JSON.cpp",
306     "builtin/MapObject.cpp",
307     "builtin/ModuleObject.cpp",
308     "builtin/Object.cpp",
309     "builtin/Profilers.cpp",
310     "builtin/Promise.cpp",
311     "builtin/Reflect.cpp",
312     "builtin/ReflectParse.cpp",
313     "builtin/ShadowRealm.cpp",
314     "builtin/String.cpp",
315     "builtin/Symbol.cpp",
316     "builtin/TestingFunctions.cpp",
317     "builtin/TestingUtility.cpp",
318     "builtin/WeakMapObject.cpp",
319     "builtin/WeakRefObject.cpp",
320     "builtin/WeakSetObject.cpp",
321     "builtin/WrappedFunctionObject.cpp",
322     "ds/Bitmap.cpp",
323     "ds/LifoAlloc.cpp",
324     "jsapi.cpp",
325     "jsdate.cpp",
326     "jsexn.cpp",
327     "jsfriendapi.cpp",
328     "jsnum.cpp",
329     "proxy/BaseProxyHandler.cpp",
330     "proxy/CrossCompartmentWrapper.cpp",
331     "proxy/DeadObjectProxy.cpp",
332     "proxy/DOMProxy.cpp",
333     "proxy/OpaqueCrossCompartmentWrapper.cpp",
334     "proxy/Proxy.cpp",
335     "proxy/ScriptedProxyHandler.cpp",
336     "proxy/SecurityWrapper.cpp",
337     "proxy/Wrapper.cpp",
338     "threading/Mutex.cpp",
339     "threading/ProtectedData.cpp",
340     "threading/Thread.cpp",
341     "vm/Activation.cpp",
342     "vm/ArgumentsObject.cpp",
343     "vm/ArrayBufferObject.cpp",
344     "vm/ArrayBufferObjectMaybeShared.cpp",
345     "vm/ArrayBufferViewObject.cpp",
346     "vm/AsyncFunction.cpp",
347     "vm/AsyncIteration.cpp",
348     "vm/BigIntType.cpp",
349     "vm/BoundFunctionObject.cpp",
350     "vm/BuildId.cpp",
351     "vm/BuiltinObjectKind.cpp",
352     "vm/BytecodeLocation.cpp",
353     "vm/BytecodeUtil.cpp",
354     "vm/CallAndConstruct.cpp",
355     "vm/CallNonGenericMethod.cpp",
356     "vm/CharacterEncoding.cpp",
357     "vm/CodeCoverage.cpp",
358     "vm/Compartment.cpp",
359     "vm/CompilationAndEvaluation.cpp",
360     "vm/Compression.cpp",
361     "vm/ConcurrentDelazification.cpp",
362     "vm/DateTime.cpp",
363     "vm/EnvironmentObject.cpp",
364     "vm/EqualityOperations.cpp",
365     "vm/ErrorMessages.cpp",
366     "vm/ErrorObject.cpp",
367     "vm/ErrorReporting.cpp",
368     "vm/Exception.cpp",
369     "vm/ForOfIterator.cpp",
370     "vm/FrameIter.cpp",
371     "vm/FunctionFlags.cpp",
372     "vm/GeckoProfiler.cpp",
373     "vm/GeneratorObject.cpp",
374     "vm/GetterSetter.cpp",
375     "vm/GlobalObject.cpp",
376     "vm/HelperThreads.cpp",
377     "vm/Id.cpp",
378     "vm/Initialization.cpp",
379     "vm/InternalThreadPool.cpp",
380     "vm/Iteration.cpp",
381     "vm/Iterator.cpp",
382     "vm/JitActivation.cpp",
383     "vm/JSAtomUtils.cpp",
384     "vm/JSContext.cpp",
385     "vm/JSFunction.cpp",
386     "vm/JSObject.cpp",
387     "vm/JSONParser.cpp",
388     "vm/JSONPrinter.cpp",
389     "vm/JSScript.cpp",
390     "vm/List.cpp",
391     "vm/MemoryMetrics.cpp",
392     "vm/Modules.cpp",
393     "vm/NativeObject.cpp",
394     "vm/OffThreadPromiseRuntimeState.cpp",
395     "vm/PIC.cpp",
396     "vm/PlainObject.cpp",
397     "vm/Printer.cpp",
398     "vm/Probes.cpp",
399     "vm/PromiseLookup.cpp",
400     "vm/PropertyAndElement.cpp",
401     "vm/PropertyDescriptor.cpp",
402     "vm/PropMap.cpp",
403     "vm/ProxyObject.cpp",
404     "vm/Realm.cpp",
405     "vm/RealmFuses.cpp",
406     "vm/RegExpObject.cpp",
407     "vm/RegExpStatics.cpp",
408     "vm/Runtime.cpp",
409     "vm/SavedStacks.cpp",
410     "vm/Scope.cpp",
411     "vm/SelfHosting.cpp",
412     "vm/Shape.cpp",
413     "vm/ShapeZone.cpp",
414     "vm/SharedArrayObject.cpp",
415     "vm/SharedImmutableStringsCache.cpp",
416     "vm/SharedScriptDataTableHolder.cpp",
417     "vm/SourceHook.cpp",
418     "vm/Stack.cpp",
419     "vm/StaticStrings.cpp",
420     "vm/StencilCache.cpp",
421     "vm/StencilObject.cpp",
422     "vm/StringType.cpp",
423     "vm/SymbolType.cpp",
424     "vm/TaggedProto.cpp",
425     "vm/ThrowMsgKind.cpp",
426     "vm/Time.cpp",
427     "vm/ToSource.cpp",
428     "vm/TypedArrayObject.cpp",
429     "vm/UbiNode.cpp",
430     "vm/UbiNodeCensus.cpp",
431     "vm/UbiNodeShortestPaths.cpp",
432     "vm/UsageStatistics.cpp",
433     "vm/Value.cpp",
434     "vm/Warnings.cpp",
435     "vm/Watchtower.cpp",
436     "vm/WellKnownAtom.cpp",
437     "vm/WindowProxy.cpp",
438     "vm/Xdr.cpp",
441 # builtin/RegExp.cpp cannot be built in unified mode because it causes huge
442 #   win32 test slowdowns
443 # jsmath.cpp cannot be built in unified mode because it needs to re-#define the
444 #   RtlGenRandom declaration's calling convention in <ntsecapi.h> on Windows.
445 # vm/Interpreter.cpp is gigantic and destroys incremental build times for any
446 #   files unlucky enough to be unified with it.
447 SOURCES += [
448     "builtin/RegExp.cpp",
449     "jsmath.cpp",
450     "vm/Interpreter.cpp",
451     "vm/ProfilingStack.cpp",
454 if CONFIG["ENABLE_PORTABLE_BASELINE_INTERP"]:
455     SOURCES += [
456         "vm/PortableBaselineInterpret.cpp",
457     ]
459 if CONFIG["ENABLE_RECORD_TUPLE"]:
460     UNIFIED_SOURCES += [
461         "builtin/RecordObject.cpp",
462         "builtin/TupleObject.cpp",
463         "vm/RecordTupleShared.cpp",
464         "vm/RecordType.cpp",
465         "vm/TupleType.cpp",
466     ]
468 if CONFIG["JS_HAS_INTL_API"]:
469     UNIFIED_SOURCES += [
470         "builtin/intl/Collator.cpp",
471         "builtin/intl/CommonFunctions.cpp",
472         "builtin/intl/DateTimeFormat.cpp",
473         "builtin/intl/DisplayNames.cpp",
474         "builtin/intl/IntlObject.cpp",
475         "builtin/intl/LanguageTag.cpp",
476         "builtin/intl/ListFormat.cpp",
477         "builtin/intl/Locale.cpp",
478         "builtin/intl/NumberFormat.cpp",
479         "builtin/intl/PluralRules.cpp",
480         "builtin/intl/RelativeTimeFormat.cpp",
481         "builtin/intl/Segmenter.cpp",
482         "builtin/intl/SharedIntlData.cpp",
483     ]
485 if CONFIG["MOZ_INSTRUMENTS"]:
486     SOURCES += [
487         "devtools/Instruments.cpp",
488     ]
490 if CONFIG["OS_ARCH"] == "WINNT":
491     OS_LIBS += [
492         "advapi32",
493     ]
494     UNIFIED_SOURCES += [
495         "threading/windows/CpuCount.cpp",
496         "threading/windows/WindowsThread.cpp",
497     ]
498 # WASI hasn't supported thread yet so noop implementation is used.
499 elif CONFIG["OS_ARCH"] == "WASI":
500     UNIFIED_SOURCES += [
501         "threading/noop/CpuCount.cpp",
502         "threading/noop/NoopThread.cpp",
503     ]
504 else:
505     UNIFIED_SOURCES += [
506         "threading/posix/CpuCount.cpp",
507         "threading/posix/PosixThread.cpp",
508     ]
510 if CONFIG["JS_HAS_INTL_API"] and CONFIG["MOZ_ICU4X"]:
511     LOCAL_INCLUDES += [
512         "/intl/icu_capi/c/include",
513     ]
515 if CONFIG["JS_HAS_CTYPES"]:
516     SOURCES += [
517         "ctypes/CTypes.cpp",
518         "ctypes/Library.cpp",
519     ]
520     if not CONFIG["MOZ_SYSTEM_FFI"]:
521         LOCAL_INCLUDES += [
522             "!ctypes/libffi/include",
523             "ctypes/libffi/src/%s" % CONFIG["FFI_TARGET_DIR"],
524         ]
526 if CONFIG["MOZ_VTUNE"]:
527     SOURCES += [
528         "vtune/ittnotify_static.c",
529         "vtune/jitprofiling.c",
530         "vtune/VTuneWrapper.cpp",
531     ]
532     SOURCES["vtune/ittnotify_static.c"].flags += [
533         "-Wno-varargs",
534         "-Wno-sign-compare",
535         "-Wno-unknown-pragmas",
536     ]
537     if CONFIG["CC_TYPE"] == "gcc":
538         SOURCES["vtune/ittnotify_static.c"].flags += ["-Wno-stringop-overflow"]
539         if int(CONFIG["CC_VERSION"].split(".")[0]) >= 8:
540             SOURCES["vtune/ittnotify_static.c"].flags += ["-Wno-stringop-truncation"]
542 DIRS += ["build", "debugger", "frontend", "gc", "irregexp", "jit", "util", "wasm"]
544 if CONFIG["JS_HAS_TEMPORAL_API"]:
545     DIRS += ["builtin/temporal"]
547 # Bug 1739321 - clang 13+ only emits debuginfo for classes that are actually
548 # constructed, and we cheat in a number of cases. The flag exists at least
549 # back to clang 4.
550 if CONFIG["CC_TYPE"] == "clang":
551     CXXFLAGS += ["-fstandalone-debug"]
553 # Bug 1722102 - This should never be enabled in Release without explicit
554 # security and SpiderMonkey review.
555 # See https://bugzilla.mozilla.org/show_bug.cgi?id=1722102#c16
556 if CONFIG["ENABLE_WASM_MOZ_INTGEMM"]:
557     DIRS += ["intgemm"]
559 if CONFIG["JS_JITSPEW"]:
560     DIRS += ["zydis"]
562 FINAL_LIBRARY = "js"
564 selfhosted_inputs = [
565     "../public/friend/ErrorNumbers.msg",
566     # ProfilingCategoryList.h is being indirectly included, and it must be passed
567     # here as an input, so it's generated before this self-hosted JS code
568     # generation. Otherwise, it will intermittently fail to build.
569     "!/mozglue/baseprofiler/public/ProfilingCategoryList.h",
570     "builtin/TypedArrayConstants.h",
571     "builtin/SelfHostingDefines.h",
572     "builtin/Utilities.js",
573     "builtin/Array.js",
574     "builtin/AsyncFunction.js",
575     "builtin/AsyncIteration.js",
576     "builtin/BigInt.js",
577     "builtin/Date.js",
578     "builtin/Error.js",
579     "builtin/Generator.js",
580     "builtin/Iterator.js",
581     "builtin/Map.js",
582     "builtin/Number.js",
583     "builtin/Object.js",
584     "builtin/Promise.js",
585     "builtin/Reflect.js",
586     "builtin/RegExp.js",
587     "builtin/RegExpGlobalReplaceOpt.h.js",
588     "builtin/RegExpLocalReplaceOpt.h.js",
589     "builtin/String.js",
590     "builtin/Set.js",
591     "builtin/Sorting.js",
592     "builtin/TypedArray.js",
593     "builtin/WeakMap.js",
594     "builtin/WeakSet.js",
595 ] + (
596     [
597         "builtin/intl/NumberingSystemsGenerated.h",
598         "builtin/intl/Collator.js",
599         "builtin/intl/CommonFunctions.js",
600         "builtin/intl/CurrencyDataGenerated.js",
601         "builtin/intl/DateTimeFormat.js",
602         "builtin/intl/DisplayNames.js",
603         "builtin/intl/IntlObject.js",
604         "builtin/intl/ListFormat.js",
605         "builtin/intl/NumberFormat.js",
606         "builtin/intl/PluralRules.js",
607         "builtin/intl/RelativeTimeFormat.js",
608         "builtin/intl/SanctionedSimpleUnitIdentifiersGenerated.js",
609         "builtin/intl/Segmenter.js",
610     ]
611     if CONFIG["JS_HAS_INTL_API"]
612     else []
615 if CONFIG["ENABLE_RECORD_TUPLE"]:
616     selfhosted_inputs += ["builtin/Tuple.js"]
618 # Prepare self-hosted JS code for embedding
619 GeneratedFile(
620     "selfhosted.out.h",
621     "selfhosted.js",
622     script="builtin/embedjs.py",
623     entry_point="generate_selfhosted",
624     inputs=selfhosted_inputs,
627 if CONFIG["JS_HAS_CTYPES"]:
628     if CONFIG["MOZ_SYSTEM_FFI"]:
629         CXXFLAGS += CONFIG["MOZ_FFI_CFLAGS"]
631 if CONFIG["JS_HAS_INTL_API"]:
632     DIRS += [
633         "../../intl/components",
634     ]
636     USE_LIBS += ["intlcomponents"]