-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathllvm-avx2.patch
339 lines (320 loc) · 16.7 KB
/
llvm-avx2.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
diff --git a/tools/clang/scripts/build.py b/tools/clang/scripts/build.py
index 880407b491b69..f30a11423094a 100755
--- a/tools/clang/scripts/build.py
+++ b/tools/clang/scripts/build.py
@@ -40,7 +40,7 @@ from update import (CDS_URL, CHROMIUM_DIR, CLANG_REVISION, LLVM_BUILD_DIR,
FORCE_HEAD_REVISION_FILE, PACKAGE_VERSION, RELEASE_VERSION,
STAMP_FILE, THIS_DIR, DownloadUrl, DownloadAndUnpack,
DownloadAndUnpackPackage, EnsureDirExists, GetDefaultHostOs,
- ReadStampFile, RmTree, WriteStampFile)
+ ReadStampFile, RmTree, WriteStampFile, MIMALLOC_URL)
# Path constants. (All of these should be absolute paths.)
THIRD_PARTY_DIR = os.path.join(CHROMIUM_DIR, 'third_party')
@@ -78,6 +78,8 @@ BUG_REPORT_URL = ('https://crbug.com in the Tools>LLVM component,'
LIBXML2_VERSION = 'libxml2-v2.9.12'
ZSTD_VERSION = 'zstd-1.5.5'
+MIMALLOC_LIB = os.path.abspath(os.path.join(LLVM_DIR, '..', 'llvm-build-tools/mimalloc-2.1.2')) + '/build/libmimalloc.a'
+
win_sdk_dir = None
def GetWinSDKDir():
"""Get the location of the current SDK."""
@@ -298,7 +300,6 @@ class LibXmlDirs:
# The full path to installed lib files.
self.lib_dir = os.path.join(self.install_dir, 'lib')
-
def GetLibXml2Dirs():
"""Gets the set of directories where LibXml2 is located.
@@ -350,7 +351,7 @@ def BuildLibXml2():
'-DLIBXML2_WITH_HTML=OFF',
'-DLIBXML2_WITH_HTTP=OFF',
'-DLIBXML2_WITH_ICONV=OFF',
- '-DLIBXML2_WITH_ICU=OFF',
+ '-DLIB-XML2_WITH_ICU=OFF',
'-DLIBXML2_WITH_ISO8859X=OFF',
'-DLIBXML2_WITH_LEGACY=OFF',
'-DLIBXML2_WITH_LZMA=OFF',
@@ -377,6 +378,11 @@ def BuildLibXml2():
'-DLIBXML2_WITH_XPATH=OFF',
'-DLIBXML2_WITH_XPTR=OFF',
'-DLIBXML2_WITH_ZLIB=OFF',
+ '-DCMAKE_C_FLAGS=-O3 -DNDEBUG -w -march=x86-64 -mtune=haswell -mavx -mavx2 -mfma -mprefer-avx128 -pipe ',
+ '-DCMAKE_CXX_FLAGS=-O3 -DNDEBUG -w -march=x86-64 -mtune=haswell -mavx -mavx2 -mfma -mprefer-avx128 -pipe ',
+ '-DCMAKE_EXE_LINKER_FLAGS=-Wl,--push-state,' + MIMALLOC_LIB + ',--pop-state ',
+ '-DCMAKE_SHARED_LINKER_FLAGS=-Wl,--push-state,' + MIMALLOC_LIB + ',--pop-state ',
+ '-DCMAKE_MODULE_LINKER_FLAGS=-Wl,--push-state,' + MIMALLOC_LIB + ',--pop-state ',
'..',
],
setenv=True)
@@ -424,7 +430,6 @@ class ZStdDirs:
# The full path to installed lib files.
self.lib_dir = os.path.join(self.install_dir, 'lib')
-
def BuildZStd():
"""Download and build zstd lib"""
# The zstd-1.5.5.tar.gz was downloaded from
@@ -454,6 +459,11 @@ def BuildZStd():
'-DCMAKE_OSX_ARCHITECTURES=arm64;x86_64',
'-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded', # /MT to match LLVM.
'-DZSTD_BUILD_SHARED=OFF',
+ '-DCMAKE_C_FLAGS=-O3 -DNDEBUG -w -march=x86-64 -mtune=haswell -mavx -mavx2 -mfma -mprefer-avx128 -pipe ',
+ '-DCMAKE_CXX_FLAGS=-O3 -DNDEBUG -w -march=x86-64 -mtune=haswell -mavx -mavx2 -mfma -mprefer-avx128 -pipe ',
+ '-DCMAKE_EXE_LINKER_FLAGS=-Wl,--push-state,' + MIMALLOC_LIB + ',--pop-state ',
+ '-DCMAKE_SHARED_LINKER_FLAGS=-Wl,--push-state,' + MIMALLOC_LIB + ',--pop-state ',
+ '-DCMAKE_MODULE_LINKER_FLAGS=-Wl,--push-state,' + MIMALLOC_LIB + ',--pop-state ',
'../build/cmake',
],
setenv=True)
@@ -473,6 +483,52 @@ def BuildZStd():
return extra_cmake_flags, extra_cflags
+class LibMimallocDirs:
+ """
+ The set of directories where zstd is located.
+
+ Includes the diractories where the source is unpacked, where it is built,
+ and installed.
+ """
+ def __init__(self):
+ self.unzip_dir = LLVM_BUILD_TOOLS_DIR
+ self.src_dir = os.path.join(self.unzip_dir, 'mimalloc-2.1.2')
+ self.build_dir = os.path.join(self.src_dir, 'build')
+
+def BuildLibMimalloc():
+ """Download and build mimalloc"""
+
+ dirs = LibMimallocDirs()
+ if os.path.exists(dirs.src_dir):
+ RmTree(dirs.src_dir)
+ DownloadAndUnpack(MIMALLOC_URL, dirs.unzip_dir)
+ os.mkdir(dirs.build_dir)
+ os.chdir(dirs.build_dir)
+
+ RunCommand(
+ [
+ 'cmake',
+ '-GNinja',
+ '-DCMAKE_BUILD_TYPE=Release',
+ '-DCMAKE_INSTALL_PREFIX=install',
+ '-DMI_BUILD_SHARED=OFF',
+ '-DMI_BUILD_STATIC=ON',
+ '-DMI_BUILD_OBJECT=OFF',
+ '-DMI_BUILD_TESTS=OFF',
+ '-DCMAKE_C_FLAGS=-O3 -DNDEBUG -w -march=x86-64 -mtune=haswell -mavx -mavx2 -mfma -mprefer-avx128 -flto=auto -fipa-pta -fdevirtualize-at-ltrans -pipe ',
+ '-DCMAKE_CXX_FLAGS=-O3 -DNDEBUG -w -march=x86-64 -mtune=haswell -mavx -mavx2 -mfma -mprefer-avx128 -flto=auto -fipa-pta -fdevirtualize-at-ltrans -pipe ',
+ '-DCMAKE_EXE_LINKER_FLAGS=-O3 -DNDEBUG -w -march=x86-64 -mtune=haswell -mavx -mavx2 -mfma -mprefer-avx128 -flto=auto -fipa-pta -fdevirtualize-at-ltrans -pipe ',
+ '-DCMAKE_SHARED_LINKER_FLAGS=-O3 -DNDEBUG -w -march=x86-64 -mtune=haswell -mavx -mavx2 -mfma -mprefer-avx128 -flto=auto -fipa-pta -fdevirtualize-at-ltrans -pipe ',
+ '-DCMAKE_MODULE_LINKER_FLAGS=-O3 -DNDEBUG -w -march=x86-64 -mtune=haswell -mavx -mavx2 -mfma -mprefer-avx128 -flto=auto -fipa-pta -fdevirtualize-at-ltrans -pipe ',
+ '..',
+ ],
+ setenv=True)
+ RunCommand(['ninja'], setenv=True)
+
+ libmimallloc_lib = os.path.join(dirs.build_dir, 'libmimalloc.a')
+ mimalloc_ldflags = [ '-Wl,--push-state,' + MIMALLOC_LIB + ',--pop-state ', ]
+
+ return mimalloc_ldflags
def DownloadRPMalloc():
"""Download rpmalloc."""
@@ -721,9 +777,15 @@ def main():
global CLANG_REVISION, PACKAGE_VERSION, LLVM_BUILD_DIR
- if (args.pgo or args.thinlto) and not args.bootstrap:
- print('--pgo/--thinlto requires --bootstrap')
+ if not sys.platform.startswith('linux'):
+ print('Customized build script only works with Linux')
+ return 1
+ if not args.bootstrap:
+ print('Customized build script requires --bootstrap')
return 1
+ if args.with_goma:
+ print('Customized build script does not support --with-goma')
+ return 1
if args.with_android and not os.path.exists(ANDROID_NDK_DIR):
print('Android NDK not found at ' + ANDROID_NDK_DIR)
print('The Android NDK is needed to build a Clang whose -fsanitize=address')
@@ -804,14 +866,12 @@ def main():
# LLVM_ENABLE_LLD).
cc, cxx, lld = None, None, None
- cflags = []
- cxxflags = []
- ldflags = []
+ cflags = [ '-O3 -DNDEBUG -w -march=x86-64 -mtune=haswell -mavx -mavx2 -mfma -mprefer-vector-width=128 ' ]
+ cxxflags = [ '-O3 -DNDEBUG -w -march=x86-64 -mtune=haswell -mavx -mavx2 -mfma -mprefer-vector-width=128 ' ]
+ ldflags = [ '-fuse-ld=lld ' ]
- targets = 'AArch64;ARM;LoongArch;Mips;PowerPC;RISCV;SystemZ;WebAssembly;X86'
- projects = 'clang;lld;clang-tools-extra'
- if args.bolt:
- projects += ';bolt'
+ targets = 'AArch64;ARM;X86'
+ projects = 'clang;lld;clang-tools-extra;polly;bolt'
pic_default = sys.platform == 'win32'
pic_mode = 'ON' if args.pic or pic_default else 'OFF'
@@ -823,7 +883,7 @@ def main():
'-DLLVM_ENABLE_PROJECTS=' + projects,
'-DLLVM_ENABLE_RUNTIMES=compiler-rt',
'-DLLVM_TARGETS_TO_BUILD=' + targets,
- f'-DLLVM_ENABLE_PIC={pic_mode}',
+ '-DLLVM_ENABLE_PIC=ON',
'-DLLVM_ENABLE_TERMINFO=OFF',
'-DLLVM_ENABLE_Z3_SOLVER=OFF',
'-DCLANG_PLUGIN_SUPPORT=OFF',
@@ -844,7 +904,6 @@ def main():
'-DLIBCLANG_BUILD_STATIC=ON',
'-DLLVM_ENABLE_ZSTD=%s' % ('ON' if args.with_zstd else 'OFF'),
]
-
if sys.platform == 'darwin':
isysroot = subprocess.check_output(['xcrun', '--show-sdk-path'],
universal_newlines=True).rstrip()
@@ -923,6 +982,10 @@ def main():
base_cmake_args.append('-DLLVM_WINSYSROOT="%s"' %
os.path.dirname(os.path.dirname(GetWinSDKDir())))
+ #Build mimalloc
+ libmimalloc_ldflags = BuildLibMimalloc()
+ ldflags += libmimalloc_ldflags
+
# Statically link libxml2 to make lld-link not require mt.exe on Windows,
# and to make sure lld-link output on other platforms is identical to
# lld-link on Windows (for cross-builds).
@@ -960,16 +1023,14 @@ def main():
bootstrap_targets += ';ARM;AArch64'
bootstrap_args = base_cmake_args + goma_cmake_args + [
'-DLLVM_TARGETS_TO_BUILD=' + bootstrap_targets,
- '-DLLVM_ENABLE_PROJECTS=clang;lld',
+ '-DLLVM_ENABLE_PROJECTS=clang;lld;polly',
'-DLLVM_ENABLE_RUNTIMES=' + ';'.join(runtimes),
'-DCMAKE_INSTALL_PREFIX=' + LLVM_BOOTSTRAP_INSTALL_DIR,
- '-DCMAKE_C_FLAGS=' + ' '.join(cflags),
- '-DCMAKE_CXX_FLAGS=' + ' '.join(cxxflags),
- '-DCMAKE_EXE_LINKER_FLAGS=' + ' '.join(ldflags),
- '-DCMAKE_SHARED_LINKER_FLAGS=' + ' '.join(ldflags),
- '-DCMAKE_MODULE_LINKER_FLAGS=' + ' '.join(ldflags),
- # Ignore args.disable_asserts for the bootstrap compiler.
- '-DLLVM_ENABLE_ASSERTIONS=ON',
+ '-DCMAKE_C_FLAGS= ' + ' '.join(cflags),
+ '-DCMAKE_CXX_FLAGS= ' + ' '.join(cxxflags),
+ '-DCMAKE_EXE_LINKER_FLAGS= ' + ' '.join(ldflags),
+ '-DCMAKE_SHARED_LINKER_FLAGS= ' + ' '.join(ldflags),
+ '-DCMAKE_MODULE_LINKER_FLAGS= ' + ' '.join(ldflags),
]
# PGO needs libclang_rt.profile but none of the other compiler-rt stuff.
bootstrap_args.extend([
@@ -1020,9 +1081,9 @@ def main():
os.chdir(LLVM_INSTRUMENTED_DIR)
instrument_args = base_cmake_args + [
- '-DLLVM_ENABLE_PROJECTS=clang',
- '-DCMAKE_C_FLAGS=' + ' '.join(cflags),
- '-DCMAKE_CXX_FLAGS=' + ' '.join(cxxflags),
+ '-DLLVM_ENABLE_PROJECTS=clang;polly',
+ '-DCMAKE_C_FLAGS=-mllvm -vp-counters-per-site=3 -mllvm -split-threshold-for-reg-with-hint=0 ' + ' '.join(cflags),
+ '-DCMAKE_CXX_FLAGS=-mllvm -vp-counters-per-site=3 -mllvm -split-threshold-for-reg-with-hint=0 ' + ' '.join(cxxflags),
'-DCMAKE_EXE_LINKER_FLAGS=' + ' '.join(ldflags),
'-DCMAKE_SHARED_LINKER_FLAGS=' + ' '.join(ldflags),
'-DCMAKE_MODULE_LINKER_FLAGS=' + ' '.join(ldflags),
@@ -1065,7 +1126,11 @@ def main():
with open(training_source, 'wb') as f:
DownloadUrl(CDS_URL + '/' + training_source, f)
train_cmd = [os.path.join(LLVM_INSTRUMENTED_DIR, 'bin', 'clang++'),
- '-target', 'x86_64-unknown-unknown', '-O2', '-g', '-std=c++14',
+ '-target', 'x86_64-unknown-unknown', '-O3', '-g', '-std=c++14',
+ '-march=x86-64', '-mtune=haswell', '-mavx', '-mavx2', '-mfma',
+ '-mprefer-vector-width=128', '-ffp-contract=fast',
+ '-fmerge-all-constants', '-fdata-sections', '-ffunction-sections',
+ '-mllvm', '-split-threshold-for-reg-with-hint=0',
'-fno-exceptions', '-fno-rtti', '-w', '-c', training_source]
if sys.platform == 'darwin':
train_cmd.extend(['-isysroot', isysroot])
@@ -1105,7 +1170,7 @@ def main():
# Keep static relocations in the executable for BOLT to analyze. Resolve all
# symbols on program start to allow BOLT's PLT optimization.
if args.bolt:
- ldflags += ['-Wl,--emit-relocs', '-Wl,-znow']
+ ldflags += ['-Wl,--emit-relocs', '-Wl,-znow', '-Wl,-z,keep-text-section-prefix', ]
chrome_tools = []
if not args.no_tools:
@@ -1133,7 +1198,27 @@ def main():
if args.pgo:
cmake_args.append('-DLLVM_PROFDATA_FILE=' + LLVM_PROFDATA_FILE)
if args.thinlto:
- cmake_args.append('-DLLVM_ENABLE_LTO=Thin')
+ cmake_args.append( '-DLLVM_ENABLE_LTO=Thin' )
+ cmake_args.append( '-DLLVM_PARALLEL_LINK_JOBS=16' )
+ cmake_args.append( '-DCMAKE_C_FLAGS=-flto=thin -fno-split-lto-unit -mllvm -split-threshold-for-reg-with-hint=0 ' + ' '.join(cflags) )
+ cmake_args.append( '-DCMAKE_CXX_FLAGS=-flto=thin -fno-split-lto-unit -mllvm -split-threshold-for-reg-with-hint=0 ' + ' '.join(cxxflags) )
+ cmake_args.append( '-DCMAKE_EXE_LINKER_FLAGS=-flto=thin -Wl,-mllvm,-import-instr-limit=30 -Wl,--lto-O3 -Wl,--lto-CGO3 -Wl,--thinlto-jobs=all -Wl,-mllvm,-split-threshold-for-reg-with-hint=0 ' + ' '.join(ldflags) )
+ cmake_args.append( '-DCMAKE_SHARED_LINKER_FLAGS=-flto=thin -Wl,-mllvm,-import-instr-limit=30 -Wl,--lto-O3 -Wl,--lto-CGO3 -Wl,--thinlto-jobs=all -Wl,-mllvm,-split-threshold-for-reg-with-hint=0 ' + ' '.join(ldflags) )
+ cmake_args.append( '-DCMAKE_MODULE_LINKER_FLAGS=-flto=thin -Wl,-mllvm,-import-instr-limit=30 -Wl,--lto-O3 -Wl,--lto-CGO3 -Wl,--thinlto-jobs=all -Wl,-mllvm,-split-threshold-for-reg-with-hint=0 ' + ' '.join(ldflags) )
+ if args.pgo:
+ cmake_args.append( '-DCMAKE_EXE_LINKER_FLAGS=-Wl,-mllvm,-enable-ext-tsp-block-placement ' + ' '.join(ldflags) )
+ cmake_args.append( '-DCMAKE_SHARED_LINKER_FLAGS=-Wl,-mllvm,-enable-ext-tsp-block-placement ' + ' '.join(ldflags) )
+ cmake_args.append( '-DCMAKE_MODULE_LINKER_FLAGS=-Wl,-mllvm,-enable-ext-tsp-block-placement ' + ' '.join(ldflags) )
+ else:
+ cmake_args.append( '-DCMAKE_C_FLAGS=-mllvm -split-threshold-for-reg-with-hint=0 ' + ' '.join(cflags) )
+ cmake_args.append( '-DCMAKE_CXX_FLAGS=-mllvm -split-threshold-for-reg-with-hint=0 ' + ' '.join(cxxflags) )
+ if args.pgo:
+ cmake_args.append( '-DCMAKE_C_FLAGS=-mllvm -enable-ext-tsp-block-placement ' + ' '.join(cxxflags) )
+ cmake_args.append( '-DCMAKE_CXX_FLAGS=-mllvm -enable-ext-tsp-block-placement ' + ' '.join(cxxflags) )
+ cmake_args.append( '-DCMAKE_EXE_LINKER_FLAGS=' + ' '.join(ldflags) )
+ cmake_args.append( '-DCMAKE_SHARED_LINKER_FLAGS=' + ' '.join(ldflags) )
+ cmake_args.append( '-DCMAKE_MODULE_LINKER_FLAGS=' + ' '.join(ldflags) )
+
if sys.platform == 'win32':
cmake_args.append('-DLLVM_ENABLE_ZLIB=FORCE_ON')
@@ -1438,7 +1523,7 @@ def main():
# Instrument.
RunCommand([
'bin/llvm-bolt', 'bin/clang', '-o', 'bin/clang-bolt.inst',
- '-instrument', '--instrumentation-file-append-pid',
+ '--lite=false', '-instrument', '--instrumentation-file-append-pid',
'--instrumentation-file=' +
os.path.join(bolt_profiles_dir, 'prof.fdata')
])
@@ -1454,8 +1539,8 @@ def main():
bolt_train_cmake_args = base_cmake_args + [
'-DLLVM_TARGETS_TO_BUILD=X86',
'-DLLVM_ENABLE_PROJECTS=clang',
- '-DCMAKE_C_FLAGS=' + ' '.join(cflags),
- '-DCMAKE_CXX_FLAGS=' + ' '.join(cxxflags),
+ '-DCMAKE_C_FLAGS=-mllvm -split-threshold-for-reg-with-hint=0 ' + ' '.join(cflags),
+ '-DCMAKE_CXX_FLAGS=-mllvm -split-threshold-for-reg-with-hint=0 ' + ' '.join(cxxflags),
'-DCMAKE_EXE_LINKER_FLAGS=' + ' '.join(ldflags),
'-DCMAKE_SHARED_LINKER_FLAGS=' + ' '.join(ldflags),
'-DCMAKE_MODULE_LINKER_FLAGS=' + ' '.join(ldflags),
@@ -1467,6 +1552,10 @@ def main():
os.path.join(LLVM_BUILD_DIR, 'bin/clang-bolt.inst'),
'-DCMAKE_ASM_COMPILER_ID=Clang',
]
+ if args.pgo:
+ cmake_args.append('-DLLVM_PROFDATA_FILE=' + LLVM_PROFDATA_FILE)
+ cmake_args.append( '-DCMAKE_C_FLAGS=-mllvm -enable-ext-tsp-block-placement ' + ' '.join(cxxflags) )
+ cmake_args.append( '-DCMAKE_CXX_FLAGS=-mllvm -enable-ext-tsp-block-placement ' + ' '.join(cxxflags) )
RunCommand(['cmake'] + bolt_train_cmake_args +
[os.path.join(LLVM_DIR, 'llvm')])
RunCommand([
@@ -1483,9 +1572,14 @@ def main():
])
RunCommand([
'bin/llvm-bolt', 'bin/clang', '-o', 'bin/clang-bolt.opt', '-data',
- 'merged.fdata', '-reorder-blocks=ext-tsp', '-reorder-functions=hfsort+',
- '-split-functions', '-split-all-cold', '-split-eh', '-dyno-stats',
- '-icf=1', '-use-gnu-stack', '-use-old-text'
+ 'merged.fdata', '--reorder-blocks=ext-tsp', '--reorder-functions=hfsort+',
+ '--split-functions', '--split-all-cold', '--split-eh', '--dyno-stats',
+ '--icf', '--use-gnu-stack', '--use-old-text', '--peepholes=all',
+ '--elim-link-veneers', '--group-stubs', '--align-blocks', '--sctc-mode=heuristic',
+ '--jump-tables=aggressive', '--simplify-conditional-tail-calls',
+ '--simplify-rodata-loads', '--align-macro-fusion=all', '--eliminate-unreachable',
+ '--tail-duplication=cache', '--indirect-call-promotion=all', '--icp-eliminate-loads',
+ '--hot-data', '--x86-strip-redundant-address-size', '--no-huge-pages', '--lite=false',
])
# Overwrite clang, preserving its timestamp so ninja doesn't rebuild it.
diff --git a/tools/clang/scripts/update.py b/tools/clang/scripts/update.py
index 0571278ef745a..d76bd83ae0dd8 100755
--- a/tools/clang/scripts/update.py
+++ b/tools/clang/scripts/update.py
@@ -45,6 +45,8 @@ RELEASE_VERSION = '18'
CDS_URL = os.environ.get('CDS_CLANG_BUCKET_OVERRIDE',
'https://commondatastorage.googleapis.com/chromium-browser-clang')
+MIMALLOC_URL = 'https://github.com/microsoft/mimalloc/archive/refs/tags/v2.1.2.tar.gz'
+
# Path constants. (All of these should be absolute paths.)
THIS_DIR = os.path.abspath(os.path.dirname(__file__))
CHROMIUM_DIR = os.path.abspath(os.path.join(THIS_DIR, '..', '..', '..'))