firefox-desktop/build/build-clang
2025-04-18 20:22:16 +02:00
..
2stages.json Update On Tue Feb 15 19:31:50 CET 2022 2022-02-15 19:31:51 +01:00
allow-unversioned-android.patch Update On Thu Sep 21 20:53:05 CEST 2023 2023-09-21 20:53:06 +02:00
android-hardware-buffer-header-workaround.patch Update On Tue Oct 8 20:51:54 CEST 2024 2024-10-08 20:51:55 +02:00
android-mangling-error_clang_12.patch Update On 202106020807 2021-06-02 08:07:58 +08:00
arm64e-hack.patch Update On Wed Apr 10 20:45:11 CEST 2024 2024-04-10 20:45:12 +02:00
build-clang.py Update On Fri Apr 18 20:22:15 CEST 2025 2025-04-18 20:22:16 +02:00
clang-8-missing-header.patch Update On Thu Nov 30 19:41:52 CET 2023 2023-11-30 19:41:53 +01:00
clang-8.0.json Update On Thu Nov 30 19:41:52 CET 2023 2023-11-30 19:41:53 +01:00
clang-14.json Update On Fri Oct 6 21:00:18 CEST 2023 2023-10-06 21:00:20 +02:00
clang-17.json Update On Wed May 29 20:45:26 CEST 2024 2024-05-29 20:45:27 +02:00
clang-19.json Update On Thu Mar 13 19:54:55 CET 2025 2025-03-13 19:54:55 +01:00
clang-20.json Update On Thu Mar 13 19:54:55 CET 2025 2025-03-13 19:54:55 +01:00
clang-tidy-ci.patch Update On Thu Apr 21 20:31:55 CEST 2022 2022-04-21 20:31:55 +02:00
clang-tidy-external.json Update On Thu Sep 5 20:50:20 CEST 2024 2024-09-05 20:50:20 +02:00
clang-tidy.json Update On Thu Sep 5 20:50:20 CEST 2024 2024-09-05 20:50:20 +02:00
clang-trunk.json Update On Thu Mar 6 19:53:24 CET 2025 2025-03-06 19:53:25 +01:00
compiler-rt-rss-limit-heap-profile.patch Update On Sat Oct 8 20:50:40 CEST 2022 2022-10-08 20:50:41 +02:00
D146664.patch Update On Thu Mar 23 19:49:44 CET 2023 2023-03-23 19:49:45 +01:00
downgrade-mangling-error_clang_12.patch Update On 202106020807 2021-06-02 08:07:58 +08:00
find_symbolizer_linux_clang_10.patch Update On 202106020807 2021-06-02 08:07:58 +08:00
find_symbolizer_linux_clang_15.patch Update On Tue Nov 8 19:57:17 CET 2022 2022-11-08 19:57:18 +01:00
fuzzing_ccov_build_clang_12.patch Update On 202106020807 2021-06-02 08:07:58 +08:00
linux64-aarch64.json Update On Thu Dec 19 19:53:27 CET 2024 2024-12-19 19:53:28 +01:00
llvm-config.json Update On Sat Nov 30 19:21:15 CET 2024 2024-11-30 19:21:16 +01:00
llvm-symbolizer-17.json Update On Fri Apr 19 20:44:57 CEST 2024 2024-04-19 20:44:57 +02:00
llvm-symbolizer-19.json Update On Sat Nov 30 19:21:15 CET 2024 2024-11-30 19:21:16 +01:00
llvm-symbolizer-trunk.json Update On Fri Apr 19 20:44:57 CEST 2024 2024-04-19 20:44:57 +02:00
llvmorg-10-init-136-gb288d90b39f4.patch Update On Sat Sep 23 20:52:02 CEST 2023 2023-09-23 20:52:03 +02:00
llvmorg-15-init-16512-g4b1e3d193706.patch Update On Wed Jul 20 20:33:25 CEST 2022 2022-07-20 20:33:26 +02:00
llvmorg-19-init-7654-gc23135c5488f.patch Update On Fri Apr 26 20:45:30 CEST 2024 2024-04-26 20:45:31 +02:00
llvmorg-20-init-4204-g5013cf682cf0.patch Update On Sat Oct 5 20:49:44 CEST 2024 2024-10-05 20:49:45 +02:00
llvmorg-20-init-7208-g631bcbe9de13.patch Update On Sat Oct 5 20:49:44 CEST 2024 2024-10-05 20:49:45 +02:00
llvmorg-20-init-9466-gce4618a9c405.patch Update On Tue Oct 22 20:52:19 CEST 2024 2024-10-22 20:52:20 +02:00
llvmorg-20-init-9666-g8417f6af54c8.patch Update On Tue Oct 22 20:52:19 CEST 2024 2024-10-22 20:52:20 +02:00
llvmorg-20-init-16060-g69ebac7ad6ae.patch Update On Wed Jan 8 19:53:01 CET 2025 2025-01-08 19:53:02 +01:00
llvmorg-21-init-2651-gbac417107339.patch Update On Thu Mar 13 19:54:55 CET 2025 2025-03-13 19:54:55 +01:00
macosx64-aarch64.json Update On Sun Jan 29 19:47:28 CET 2023 2023-01-29 19:47:29 +01:00
macosx64.json Update On Thu Sep 5 20:50:20 CEST 2024 2024-09-05 20:50:20 +02:00
partial-revert-llvmorg-15-init-11205-gcead4eceb01b.patch Update On Fri Apr 19 20:44:57 CEST 2024 2024-04-19 20:44:57 +02:00
partial-revert-llvmorg-15-init-11205-gcead4eceb01b_clang_18.patch Update On Fri Apr 19 20:44:57 CEST 2024 2024-04-19 20:44:57 +02:00
README Update On Thu Sep 5 20:50:20 CEST 2024 2024-09-05 20:50:20 +02:00
Remove-FlushViewOfFile-when-unmaping-gcda-files.patch Update On Sat Oct 9 20:25:23 CEST 2021 2021-10-09 20:25:23 +02:00
revert-llvmorg-15-init-13446-g7524fe962e47.patch Update On Tue Jun 28 20:31:31 CEST 2022 2022-06-28 20:31:31 +02:00
revert-llvmorg-16-init-11301-g163bb6d64e5f_clang_17.patch Update On Wed Apr 12 21:00:04 CEST 2023 2023-04-12 21:00:05 +02:00
revert-llvmorg-16-init-11301-g163bb6d64e5f_clang_19.patch Update On Thu Apr 25 20:45:26 CEST 2024 2024-04-25 20:45:27 +02:00
revert-llvmorg-16-init-11301-g163bb6d64e5f_clang_20.patch Update On Tue Jan 7 19:52:01 CET 2025 2025-01-07 19:52:02 +01:00
revert-llvmorg-16-init-11301-g163bb6d64e5f_clang_21.patch Update On Thu Mar 13 19:54:55 CET 2025 2025-03-13 19:54:55 +01:00
revert-llvmorg-18-init-15724-gf11b056c02cc.patch Update On Fri Jun 14 20:47:29 CEST 2024 2024-06-14 20:47:30 +02:00
revert-llvmorg-19-init-7486-g225e14e5b6d6.patch Update On Sat Nov 30 19:21:15 CET 2024 2024-11-30 19:21:16 +01:00
stage-1.json Update On Thu Sep 5 20:50:20 CEST 2024 2024-09-05 20:50:20 +02:00
stage-2-3-pgo.json Update On Sat Oct 5 20:49:44 CEST 2024 2024-10-05 20:49:45 +02:00
stage-2-pgo.json Update On Sat Oct 5 20:49:44 CEST 2024 2024-10-05 20:49:45 +02:00
stage-3-pgo.json Update On Sat Oct 5 20:49:44 CEST 2024 2024-10-05 20:49:45 +02:00
stage-4-pgo.json Update On Thu Sep 5 20:50:20 CEST 2024 2024-09-05 20:50:20 +02:00
unpoison-thread-stacks_clang_10.patch Update On 202106020807 2021-06-02 08:07:58 +08:00
unpoison-thread-stacks_clang_21.patch Update On Thu Mar 6 19:53:24 CET 2025 2025-03-06 19:53:25 +01:00
use-clang-artifact.json Update On Thu Sep 5 20:50:20 CEST 2024 2024-09-05 20:50:20 +02:00
use-clang-cl-artifact.json Update On Thu Sep 5 20:50:20 CEST 2024 2024-09-05 20:50:20 +02:00
use-system-clang.json Update On Thu Sep 5 20:50:20 CEST 2024 2024-09-05 20:50:20 +02:00
win64-aarch64.json Update On Mon Aug 26 20:49:38 CEST 2024 2024-08-26 20:49:39 +02:00
win64-compiler-rt-19.json Update On Wed Jan 8 19:53:01 CET 2025 2025-01-08 19:53:02 +01:00
win64-ret-null-on-commitment-limit_clang_14.patch Update On Thu Jul 28 20:32:47 CEST 2022 2022-07-28 20:32:48 +02:00
win64.json Update On Thu Sep 5 20:50:20 CEST 2024 2024-09-05 20:50:20 +02:00

build-clang.py
==============

A script to build clang from source.

```
usage: build-clang.py [-h] -c CONFIG [--clean]

optional arguments:
  -h, --help            show this help message and exit
  -c CONFIG, --config CONFIG
                        Clang configuration file
  --clean               Clean the build directory
```

Pre-requisites
--------------
* Working build toolchain.
* git
* CMake
* Ninja
* Python 2.7 and 3

Please use the latest available CMake for your platform to avoid surprises.

Config file format
------------------

build-clang.py accepts a JSON config format with the following fields:

* stages: Use 1, 2, 3 or 4 to select different compiler stages.  The default is 2.
* cc: Path to the bootsraping C Compiler.
* cxx: Path to the bootsraping C++ Compiler.
* as: Path to the assembler tool.
* ar: Path to the library archiver tool.
* ranlib: Path to the ranlib tool (optional).
* ld: Path to the linker.
* patches: Optional list of patches to apply.
* build_type: The type of build to make.  Supported types: Release, Debug, RelWithDebInfo or MinSizeRel.
* targets: The targets supported by the final stage LLVM/clang.
* build_clang_tidy: Whether to build clang-tidy with the Mozilla checks imported.  The default is false.
* osx_cross_compile: Whether to invoke CMake for OS X cross compile builds.
* assertions: Whether to enable LLVM assertions.  The default is false.
* pgo: Whether to build with PGO (requires stages == 4).  The default is false.

The revisions are defined in taskcluster/kinds/fetch/toolchains.yml. They are usually commit sha1s corresponding to upstream tags.

Environment Variables
---------------------

The following environment variables are used for cross-compile builds targeting OS X on Linux.

* OSX_SYSROOT: Path to the OS X SDK directory for cross compile builds.