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",
17 "PlatformConditionVariable.h",
29 EXPORTS.mozilla.glue += [
34 if CONFIG["OS_ARCH"] == "WINNT":
36 "GetKnownFolderPath.h",
38 "StackWalk_windows.h",
40 "TimeStamp_windows.h",
41 "WindowsDpiAwareness.h",
45 "AutoProfilerLabel.cpp",
49 "MmapFaultHandler.cpp",
57 if CONFIG["TARGET_CPU"].startswith("x86"):
62 SOURCES["SIMD_avx2.cpp"].flags += ["-mavx2"]
64 if not CONFIG["JS_STANDALONE"]:
67 "RuntimeExceptionModule.h",
72 "RuntimeExceptionModule.cpp",
75 OS_LIBS += CONFIG["REALTIME_LIBS"]
77 if CONFIG["OS_ARCH"] == "WINNT":
79 "DynamicallyLinkedFunctionPtr.h",
82 "WindowsDiagnostics.h",
83 "WindowsDpiInitialization.h",
84 "WindowsEnumProcessModules.h",
85 "WindowsMapRemoteView.h",
86 "WindowsProcessMitigations.h",
87 "WindowsStackCookie.h",
88 "WindowsUnwindInfo.h",
90 EXPORTS.mozilla.glue += [
94 "GetKnownFolderPath.cpp",
95 "TimeStamp_windows.cpp",
96 "WindowsDiagnostics.cpp",
98 "WindowsDpiInitialization.cpp",
99 "WindowsMapRemoteView.cpp",
100 "WindowsProcessMitigations.cpp",
101 "WindowsUnicode.cpp",
104 OS_LIBS += ["dbghelp", "oleaut32", "ole32", "mincore"]
106 if not CONFIG["JS_STANDALONE"]:
108 "/ipc/mscom/COMWrappers.cpp",
109 "/ipc/mscom/ProcessRuntime.cpp",
110 "PreXULSkeletonUI.cpp",
113 elif CONFIG["OS_ARCH"] == "Darwin":
115 "TimeStamp_darwin.cpp",
117 elif CONFIG["HAVE_CLOCK_MONOTONIC"]:
119 "TimeStamp_posix.cpp",
121 elif CONFIG["COMPILE_ENVIRONMENT"]:
122 error("No TimeStamp implementation on this platform. Build will not succeed")
124 if CONFIG["OS_ARCH"] == "WINNT":
126 "ConditionVariable_windows.cpp",
128 "RWLock_windows.cpp",
130 # WASI hasn't supported cond vars and mutexes yet so noop implementation is used.
131 elif CONFIG["OS_ARCH"] == "WASI":
133 "ConditionVariable_noop.cpp",
138 "ConditionVariable_posix.cpp",
143 if CONFIG["MOZ_LINKER"] and CONFIG["MOZ_WIDGET_TOOLKIT"] == "android":
149 "decimal/Decimal.cpp",
152 if CONFIG["CC_TYPE"] in ("clang", "clang-cl"):
153 # Suppress warnings from third-party V8 Decimal code.
154 SOURCES["decimal/Decimal.cpp"].flags += ["-Wno-implicit-fallthrough"]
156 for var in ("MOZ_APP_BASENAME", "MOZ_APP_VENDOR"):
157 DEFINES[var] = '"%s"' % CONFIG[var]