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 FINAL_LIBRARY = "mozglue"
10 "AutoProfilerLabel.h",
13 "decimal/DoubleConversion.h",
14 "IntegerPrintfMacros.h",
16 "PlatformConditionVariable.h",
28 EXPORTS.mozilla.glue += [
33 if CONFIG["OS_ARCH"] == "WINNT":
35 "GetKnownFolderPath.h",
37 "StackWalk_windows.h",
39 "TimeStamp_windows.h",
40 "WindowsDpiAwareness.h",
44 "AutoProfilerLabel.cpp",
46 "MmapFaultHandler.cpp",
54 if CONFIG["CPU_ARCH"].startswith("x86"):
59 SOURCES["SIMD_avx2.cpp"].flags += ["-mavx2"]
61 if not CONFIG["JS_STANDALONE"]:
64 "RuntimeExceptionModule.h",
69 "RuntimeExceptionModule.cpp",
72 OS_LIBS += CONFIG["REALTIME_LIBS"]
74 if CONFIG["OS_ARCH"] == "WINNT":
76 "DynamicallyLinkedFunctionPtr.h",
79 "WindowsDpiInitialization.h",
80 "WindowsEnumProcessModules.h",
81 "WindowsMapRemoteView.h",
82 "WindowsProcessMitigations.h",
83 "WindowsStackCookie.h",
84 "WindowsUnwindInfo.h",
86 EXPORTS.mozilla.glue += [
90 "GetKnownFolderPath.cpp",
91 "TimeStamp_windows.cpp",
93 "WindowsDpiInitialization.cpp",
94 "WindowsMapRemoteView.cpp",
95 "WindowsProcessMitigations.cpp",
105 if not CONFIG["JS_STANDALONE"]:
107 "/ipc/mscom/COMWrappers.cpp",
108 "/ipc/mscom/ProcessRuntime.cpp",
109 "PreXULSkeletonUI.cpp",
112 elif CONFIG["HAVE_CLOCK_MONOTONIC"]:
114 "TimeStamp_posix.cpp",
116 elif CONFIG["OS_ARCH"] == "Darwin":
118 "TimeStamp_darwin.cpp",
120 elif CONFIG["COMPILE_ENVIRONMENT"]:
121 error("No TimeStamp implementation on this platform. Build will not succeed")
123 if CONFIG["OS_ARCH"] == "WINNT":
125 "ConditionVariable_windows.cpp",
127 "RWLock_windows.cpp",
129 # WASI hasn't supported cond vars and mutexes yet so noop implementation is used.
130 elif CONFIG["OS_ARCH"] == "WASI":
132 "ConditionVariable_noop.cpp",
137 "ConditionVariable_posix.cpp",
142 if CONFIG["MOZ_LINKER"] and CONFIG["MOZ_WIDGET_TOOLKIT"] == "android":
148 "decimal/Decimal.cpp",
151 if CONFIG["CC_TYPE"] in ("clang", "clang-cl"):
152 # Suppress warnings from third-party V8 Decimal code.
153 SOURCES["decimal/Decimal.cpp"].flags += ["-Wno-implicit-fallthrough"]
155 for var in ("MOZ_APP_BASENAME", "MOZ_APP_VENDOR"):
156 DEFINES[var] = '"%s"' % CONFIG[var]