Reduce clang size
The current size of clang binaries is quite large:
--- /nix/store/2cfpyiqgqsc4kns81r7zqkc0swp6jnmb-clang-ompss2-2023.05/bin -------------------------
/..
171.3 MiB [ 15.0% ########################] clang-17
139.7 MiB [ 12.2% ################### ] clang-scan-deps
129.2 MiB [ 11.3% ################## ] clang-check
114.6 MiB [ 10.0% ################ ] lld
114.4 MiB [ 10.0% ################ ] clang-repl
100.0 MiB [ 8.7% ############## ] clang-linker-wrapper
79.2 MiB [ 6.9% ########### ] llvm-dwp
38.0 MiB [ 3.3% ##### ] clang-refactor
36.7 MiB [ 3.2% ##### ] clang-rename
35.6 MiB [ 3.1% #### ] clang-extdef-mapping
30.5 MiB [ 2.7% #### ] llvm-ml
29.7 MiB [ 2.6% #### ] llvm-nm
29.6 MiB [ 2.6% #### ] llvm-ar
27.4 MiB [ 2.4% ### ] llvm-objdump
8.1 MiB [ 0.7% # ] llvm-readobj
7.7 MiB [ 0.7% # ] diagtool
7.2 MiB [ 0.6% # ] llvm-pdbutil
Leaving 1.6 GB installation for each clang. Maybe we can trim the size down a bit by using BUILD_SHARED_LIBS
or LLVM_BUILD_LLVM_DYLIB
, as commented by @rpenacob . We may also want to enable ccache to accelerate the builds.