no bug - Bumping Firefox l10n changesets r=release a=l10n-bump DONTBUILD CLOSED TREE
[gecko.git] / mozglue / misc / moz.build
blob016506f16afa7d06f76f5a6c1eccd4d4a2e4fcd7
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"
9 EXPORTS.mozilla += [
10     "AutoProfilerLabel.h",
11     "AwakeTimeStamp.h",
12     "decimal/Decimal.h",
13     "decimal/DoubleConversion.h",
14     "IntegerPrintfMacros.h",
15     "MmapFaultHandler.h",
16     "PlatformConditionVariable.h",
17     "PlatformMutex.h",
18     "PlatformRWLock.h",
19     "Printf.h",
20     "SIMD.h",
21     "Sprintf.h",
22     "SSE.h",
23     "StackWalk.h",
24     "TimeStamp.h",
25     "Uptime.h",
28 EXPORTS.mozilla.glue += [
29     "Debug.h",
30     "WinUtils.h",
33 if CONFIG["OS_ARCH"] == "WINNT":
34     EXPORTS.mozilla += [
35         "GetKnownFolderPath.h",
36         "PreXULSkeletonUI.h",
37         "StackWalk_windows.h",
38         "StackWalkThread.h",
39         "TimeStamp_windows.h",
40         "WindowsDpiAwareness.h",
41     ]
43 SOURCES += [
44     "AutoProfilerLabel.cpp",
45     "AwakeTimeStamp.cpp",
46     "Debug.cpp",
47     "MmapFaultHandler.cpp",
48     "Printf.cpp",
49     "SIMD.cpp",
50     "StackWalk.cpp",
51     "TimeStamp.cpp",
52     "Uptime.cpp",
55 if CONFIG["TARGET_CPU"].startswith("x86"):
56     SOURCES += [
57         "SIMD_avx2.cpp",
58         "SSE.cpp",
59     ]
60     SOURCES["SIMD_avx2.cpp"].flags += ["-mavx2"]
62 if not CONFIG["JS_STANDALONE"]:
63     EXPORTS.mozilla += [
64         "ProcessType.h",
65         "RuntimeExceptionModule.h",
66     ]
68     SOURCES += [
69         "ProcessType.cpp",
70         "RuntimeExceptionModule.cpp",
71     ]
73 OS_LIBS += CONFIG["REALTIME_LIBS"]
75 if CONFIG["OS_ARCH"] == "WINNT":
76     EXPORTS.mozilla += [
77         "DynamicallyLinkedFunctionPtr.h",
78         "ImportDir.h",
79         "NativeNt.h",
80         "WindowsDpiInitialization.h",
81         "WindowsEnumProcessModules.h",
82         "WindowsMapRemoteView.h",
83         "WindowsProcessMitigations.h",
84         "WindowsStackCookie.h",
85         "WindowsUnwindInfo.h",
86     ]
87     EXPORTS.mozilla.glue += [
88         "WindowsUnicode.h",
89     ]
90     SOURCES += [
91         "GetKnownFolderPath.cpp",
92         "TimeStamp_windows.cpp",
93         "WindowsDllMain.cpp",
94         "WindowsDpiInitialization.cpp",
95         "WindowsMapRemoteView.cpp",
96         "WindowsProcessMitigations.cpp",
97         "WindowsUnicode.cpp",
98     ]
100     OS_LIBS += [
101         "dbghelp",
102         "oleaut32",
103         "ole32",
104     ]
106     if not CONFIG["JS_STANDALONE"]:
107         SOURCES += [
108             "/ipc/mscom/COMWrappers.cpp",
109             "/ipc/mscom/ProcessRuntime.cpp",
110             "PreXULSkeletonUI.cpp",
111         ]
113 elif CONFIG["OS_ARCH"] == "Darwin":
114     SOURCES += [
115         "TimeStamp_darwin.cpp",
116     ]
117 elif CONFIG["HAVE_CLOCK_MONOTONIC"]:
118     SOURCES += [
119         "TimeStamp_posix.cpp",
120     ]
121 elif CONFIG["COMPILE_ENVIRONMENT"]:
122     error("No TimeStamp implementation on this platform.  Build will not succeed")
124 if CONFIG["OS_ARCH"] == "WINNT":
125     SOURCES += [
126         "ConditionVariable_windows.cpp",
127         "Mutex_windows.cpp",
128         "RWLock_windows.cpp",
129     ]
130 # WASI hasn't supported cond vars and mutexes yet so noop implementation is used.
131 elif CONFIG["OS_ARCH"] == "WASI":
132     SOURCES += [
133         "ConditionVariable_noop.cpp",
134         "Mutex_noop.cpp",
135     ]
136 else:
137     SOURCES += [
138         "ConditionVariable_posix.cpp",
139         "Mutex_posix.cpp",
140         "RWLock_posix.cpp",
141     ]
143 if CONFIG["MOZ_LINKER"] and CONFIG["MOZ_WIDGET_TOOLKIT"] == "android":
144     LOCAL_INCLUDES += [
145         "/mozglue/linker",
146     ]
148 SOURCES += [
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]