Commit graph

615 commits

Author SHA1 Message Date
Roland McGrath
d6a165836c
[CMake][Fuchsia] Compile runtimes with -ffuchsia-api-level (#211753)
Use the supplied Fuchsia SDK's version_history.json to deduce the
oldest API level still supported, and target that for toolchain
runtimes so they'll be runtime-compatible when linked into user
programs that target any SDK-supported API level.
2026-07-29 10:59:32 -07:00
Prabhu Rajasekaran
96b100337b
Reland "[Fuchsia] Stack analysis flags for runtimes" (#211072)
Reverts llvm/llvm-project#192515
We have addressed the CFI related workflow by introducing a new
MD_callgraph and by disambiguating it from MD_type used for CFI.
2026-07-21 14:38:48 -07:00
Haowei
a04f87fdd9
Reapply "Skipping host target exports during cross-compilation" (#210… (#210496)
This reverts commit 42eb7db188. This
reland 3fbb037d03 (#209922).

Under CMake 4+, calling add_library(... SHARED IMPORTED) on a target
platform that lacks dynamic linking support triggers a fatal error. This
becomes an issue when building LLVM and runtimes for baremetal targets
like armv6m-none-eabi. This patch adds the option
"LLVM_OMIT_EXPORTS_FROM_CONFIG" in LLVM. When used in sub builds like
LLVM runtimes, it makes CMake to skip including the LLVM and Clang
exports. This mitigates the CMake 4 errors on baremetal runtimes.

42eb7db188 originally
apply this flag on all runtimes build and causing issues on runtimes
like intel-sycl-gpu, amdgpu-offload-ubuntu-22-cmake-build-only.
This PR only set this flag when the target platform lacks shared library
support.
2026-07-20 10:47:59 -07:00
Brian Cain
34aefe9744
[Hexagon] Fix compiler-rt install dir type, scope sanitizers (#209375)
COMPILER_RT_INSTALL_LIBRARY_DIR must be CACHE STRING, not CACHE PATH: a
relative PATH-typed cache entry resolves against the runtimes sub-build
directory instead of CMAKE_INSTALL_PREFIX, misplacing sanitizer libs.

Replace the explicit COMPILER_RT_BUILD_* ON list with
COMPILER_RT_SANITIZERS_TO_BUILD=all, since those options already default
ON upstream and infeasible sanitizers self-exclude via their own
ALL_<X>_SUPPORTED_ARCH lists.

Add FORCE to the dylib overrides so they take effect after
hexagon-unknown-linux-musl-clang-dist.cmake has already cached them OFF.
2026-07-20 10:42:33 -05:00
Haowei
42eb7db188
Revert "Skipping host target exports during cross-compilation" (#210468)
Reverts llvm/llvm-project#209922
It broke runtimes build on amdgpu-amd-amdhsa
2026-07-17 17:17:48 -07:00
Haowei
3fbb037d03
Adding an option to Skip LLVM and Clang exports (#209922)
Under CMake 4+, calling add_library(... SHARED IMPORTED) on a
target platform that lacks dynamic linking support triggers a fatal
error. This becomes an issue when building LLVM and runtimes for
baremetal targets like armv6m-none-eabi. This patch
adds the option "LLVM_OMIT_EXPORTS_FROM_CONFIG" in LLVM.
When used in sub builds like LLVM runtimes, it makes CMake to skip
including the LLVM and Clang exports. This mitigates the CMake 4
errors on baremetal runtimes.
2026-07-17 16:08:42 -07:00
Hans Wennborg
5eb8007046
Revert "Reapply "runtimes: Pass CMAKE_SYSTEM_NAME based on target triple" (#205133) (#205522)" (#208644)
The change broke the runtimes build for Android; see discussion on the
PR. There are fixes in progress, but let's revert to unbreak the tree
until all those are ready to land.

This reverts commit 00b2f81418 and the
follow-up commit 1008b485e4.
2026-07-10 08:58:58 +00:00
Matt Arsenault
00b2f81418
Reapply "runtimes: Pass CMAKE_SYSTEM_NAME based on target triple" (#205133) (#205522)
This reverts commit 08c728e852.

Reapply after runtimes build fixes on platforms without shared
libraries.
2026-07-08 16:47:31 +02:00
Johannes Doerfert
3ddeaebfd3
Revert "[Instrumentor] Add runtime examples: [1/N] A flop counter" (#205960)
This reverts commit 61cbfabb7ade682a64f516c871b2bacb1e3e324a.

Fails compiler-rt standalone builds, though, locally it works fine :(
2026-06-25 19:13:59 -07:00
Johannes Doerfert
cc91bbc5d8
[Instrumentor] Add runtime examples: [1/N] A flop counter (#205698)
This adds a instrumentor-tools folder into compiler RT to showcase use
cases of the instrumentor. The initial example is a program that, via
instrumentation, counts the number of flops performed. Call and
intrinsic support will follow after #198042.

This is the second try with more CMake magic after
https://github.com/llvm/llvm-project/pull/205221 failed on some
platforms.

Partially developped by Claude (AI), tested and verified by me.
2026-06-25 18:05:02 -07:00
Matt Arsenault
08c728e852
Revert "runtimes: Pass CMAKE_SYSTEM_NAME based on target triple" (#205133)
Reverts llvm/llvm-project#203504

Breaks build pending #205130
2026-06-22 18:30:29 +02:00
Matt Arsenault
6e4e181c83
runtimes: Pass CMAKE_SYSTEM_NAME based on target triple (#203504)
Compute the cmake system name from the target triple, rather
than passing through the host's. This is primarily to stop
forwarding OSX specific cmake variables.

This fixes build failures when trying to build gpu libc on mac
hosts. Previously it would fail on several issues, starting with
an unused argument -mmacos-version-min error, followed by other
errors caused by passing -isysroot.

Secondarily, restrict the cmake imported targets when cross compiling.
Without this, the amdgpu build prints many cmake warnings about the
target not supporting shared libraries.

Claude did most of the actual work, though it required quite a few
rounds of prodding to get it into the right place. In particular it
took care of handling all of the cmake platform recognized names from
the triple.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-22 16:32:46 +02:00
gulfemsavrun
a358c6cac1
[CMake][Fuchsia] Add llvm-profgen to Fuchsia toolchain (#204638) 2026-06-18 11:50:53 -07:00
Haowei
004f829fd0
[clang][cmake] Disable exceptions for ASan runtime on Fuchsia (#204512)
Fuchsia's default runtime environment prefers no-exceptions. Compiling
the C++ slice of ASan (asan_new_delete.cpp) with exceptions introduces
dependencies on EH symbols
(__cxa_begin_catch, etc.) in libclang_rt.asan.so. This causes link
failures when linking ASan-enabled binaries with noexcept libc++abi.
Explicitly disable COMPILER_RT_ASAN_ENABLE_EXCEPTIONS for Fuchsia
targets in the stage2 cache.
2026-06-18 00:08:07 -07:00
Brian Cain
3a1420effe
[Hexagon] Add cmake caches for cross-toolchain distribution build (#201207)
Adds and extends the
clang/cmake/caches/hexagon-unknown-linux-musl-clang* files to drive a
full install-distribution build: host tools, per-target builtins (Linux
and baremetal), and runtimes for hexagon-unknown-linux-musl.
2026-06-03 11:37:49 -05:00
Cullen Rhodes
b8e768f6ae
[CMake][Release] Use llvm-bitcode-strip on Darwin for build with -ffat-lto-objects (#200764)
Building with --fat-lto-objects was added in #140381 (cff9ae7a15). On
macOS the tests are failing when building release binaries with many
"The file was not recognized as a valid object file" errors, e.g.:

  2026-01-16T12:54:26.0928880Z

/Users/runner/work/llvm-project/llvm-project/build/tools/clang/stage2-instrumented-bins/tools/clang/stage2-bins/_CPack_Packages/Darwin/TXZ/LLVM-22.1.0-rc1-macOS-ARM64/bin/llvm-strip:
  error:

'/Users/runner/work/llvm-project/llvm-project/build/tools/clang/stage2-instrumented-bins/tools/clang/stage2-bins/_CPack_Packages/Darwin/TXZ/LLVM-22.1.0-rc1-macOS-ARM64/lib/libLLVMAArch64AsmParser.a(AArch64AsmParser.cpp.o)':
  The file was not recognized as a valid object file

It's assuming bitcode is embedded in section .llvm.lto
(llvm/lib/Object/ObjectFile.cpp:80) but on MachO it's in
__LLVM,__bitcode (llvm/lib/Object/MachOObjectFile.cpp:2184)

llvm-bitcode-strip is a driver for the MachO bitcode_strip utility which
handles this. Use this instead.

Fixes #176398.

Assisted-by: codex
2026-06-02 06:45:33 +01:00
Joshua Batista
ff83218ec1
[HLSL] Fix improper parsing of IN_LIST within if condition (#199276)
Cmake does not properly parse IN_LIST within the if condition, and
treats it as a token.
This is not desired behavior.
The CMP0057 policy supports the new [if() IN_LIST
](https://cmake.org/cmake/help/latest/command/if.html#command:if)
operator.
Enable this policy and resolve the build error.


Fixes https://github.com/llvm/llvm-project/issues/199282
Assisted by: Github Copilot
2026-05-22 14:35:44 -07:00
Joshua Batista
3315f6772e
[HLSL] Add Offload distribution (#196640)
This PR adds a new distribution to the HLSL cmake file.
The purpose is so that we can portably distribute binaries to other
machines so that offload testing can be optimized.
Assisted by: Github Copilot
This PR was inspired by @Icohedron 's comment here:
https://github.com/llvm/offload-test-suite/pull/1149#issuecomment-4409079785
This addresses https://github.com/llvm/offload-test-suite/issues/1150
2026-05-13 10:09:44 -07:00
gulfemsavrun
3776d8de5a
[Fuchsia] Enable OpenCSD by default for Fuchsia (#195194)
Pass LLVM_ENABLE_OPENCSD and OPENCSD_ROOT through the Fuchsia stage 1
cache.
2026-05-06 15:27:51 -07:00
Prabhu Rajasekaran
bec1019d14
Revert "[Fuchsia] Stack analysis flags for runtimes" (#192515)
Reverts llvm/llvm-project#175677

We noticed using -fexperimental-call-graph-section with Control Flow
Integrity causes link failures in certain situations. Reverting this
change that sets the call graph section flag until we investigate the
root cause of the problem and handle it in the compiler well.
2026-04-16 19:26:11 +00:00
Keith Smiley
70cf763a42
Reapply "[cmake] Add support for statically linking libxml2" (#192088)
This applies a fix for windows not discovering libxml

This reverts commit 2a9c32496b.
2026-04-15 09:23:42 -07:00
Paul Kirth
6cf19c6b20
[clang][cmake] Add check-clang-extra to bootstrap targets for Fuchsia (#192104)
Not having these prevents us from testing the clang-tool-extra targets
in our CI and multi stage builds.
2026-04-14 13:00:10 -07:00
Daniel Thornburgh
d900d20dbb
Revert "[CMake] Enable static libxml2 for Fuchsia toolchain" (#191900)
Reverts llvm/llvm-project#191657

Broke Fuchsia CI.
2026-04-13 15:48:07 -07:00
Petr Hosek
2a9c32496b
Revert "[cmake] Add support for statically linking libxml2" (#191609)
Reverts llvm/llvm-project#166867
2026-04-13 15:11:20 -07:00
Petr Hosek
4fb5b7834b
[CMake] Enable static libxml2 for Fuchsia toolchain (#191657)
We prefer statically linking all library dependencies.
2026-04-11 15:34:03 -07:00
Keith Smiley
11a8026850
[cmake] Add support for statically linking libxml2 (#166867)
Dynamically depending on libxml2 results in various annoyances across
different linux distros for release artifacts. Specifically on fedora
and nixos the library has a different name than on debian, and on
arch-linux they tried to remove the old name entirely.

With this, enabled by default for releases, we don't sacrifice any
behavior changes, but no longer have these issues. For lld the binary
size impact is <1mb

This continues to use the shared libxml for lldb since otherwise
it requires linking ICU, which is off by default

macOS ignores this setting since libxml2 is part of the OS and stable
enough.

This mirrors what we do for zstd

Fixes https://github.com/llvm/llvm-project/issues/113696
Fixes https://github.com/llvm/llvm-project/issues/138225
Fixes
https://discourse.llvm.org/t/official-builds-without-libxml2-and-libtinfo/58169
2026-04-10 13:59:32 -07:00
Prabhu Rajasekaran
e5a7a9a95f
[Fuchsia] Cortex-m33 runtime libraries hard float ABI (#190023)
Make cortex-m33 runtime libraries build to use hard float ABI instead of
softfp.
2026-04-01 15:06:11 -07:00
Roland McGrath
c4847d250b
[Fuchsia] Set LIBCXX_ABI_UNSTABLE instead of LIBCXX_ABI_VERSION (#189123)
Use the generic switch rather than encoding the version number it
currently corresponds to.
2026-03-27 23:25:25 +00:00
Prabhu Rajasekaran
aacda8da6b
[Fuchsia] Stack analysis flags for runtimes (#175677)
Fuchsia toolchain includes runtime builds for several targets. This
patch adds `-fstack-sizes` and `-fexperimental-call-graph-section` flags
for all Fuchsia, baremetal runtimes built by Fuchsia stage2 cache file.
2026-03-26 09:55:11 -07:00
Ramkumar Ramachandra
41e9fac601
[cmake] Add config for riscv(32|64)-unknown-elf (#176353)
Add a config to document building compiler-rt for a baremetal RISCV
target. It works on a Linux host, but not a macOS host, due to CMake
issues.

Documenting building libcxx and libcxxabi for these targets is left to a
follow-up.
2026-03-12 07:40:52 +00:00
Alexis Engelke
898dc85763
[clangd] Disable PCH for libs that use gRPC (#185185)
gRPC adds -pthread, which is incompatible with PCH without it. At some
point, we probably should generally switch from -lpthread to -pthread,
but until then, disable PCH for affected targets.

Fixes https://github.com/llvm/llvm-project/issues/184759.
2026-03-07 13:35:51 +00:00
nextsilicon-itay-bookstein
501c6fda95
[CMake] Propagate dependencies to OBJECT libraries in add_llvm_library (re-land) (#184201)
Previously, transitively inherited calls to
`target_include_directories(foo SYSTEM ...)` were being squashed into a
flat list of includes, effectively stripping off `-isystem` and
unintentionally forwarding warnings from such dependencies.

To correctly propagate `SYSTEM` dependencies, use
`target_link_libraries` to forward the parent target's link dependencies
to the OBJECT library (similar to the `_static` flow below). Unlike a
flat `target_include_directories`, this lets CMake resolve transitive
SYSTEM include directories through the proper dependency chain.

Note that `target_link_libraries` on an OBJECT library propagates all
usage requirements, not just includes. This also brings in transitive
`INTERFACE_COMPILE_DEFINITIONS`, `INTERFACE_COMPILE_OPTIONS`, and
`INTERFACE_COMPILE_FEATURES`. This is arguably more correct, as the
OBJECT library compiles the same sources and should see the same flags.

The existing `target_include_directories` call is retained for include
directories set directly on the target (not through link dependencies).
CMake deduplicates include directories that appear through both paths.
Compile definitions and options may technically appear twice (once via
the OBJECT library, once via the consuming target), but duplicate `-D`
and flag entries are harmless in practice.

Also fix `clang_target_link_libraries` and `mlir_target_link_libraries`
to forward the link type (PUBLIC/PRIVATE/INTERFACE) to `obj.*` targets.
Previously the type keyword was silently dropped, resulting in plain-
signature `target_link_libraries` calls. This is now required because
the new keyword-signature call in `llvm_add_library` would otherwise
conflict (CMake requires all calls on a target to use the same
signature).
2026-03-02 23:10:15 +02:00
gulfemsavrun
5ff5a1f147
Revert "[CMake] Use keyword signature in two additional callsites (#1… (#184186)
…83889)"

This reverts commit 2342db00ab.

Revert "[CMake] Propagate dependencies to OBJECT libraries in
`add_llvm_library` (#183541)"

This reverts commit e3c045415a.
2026-03-02 18:12:23 +00:00
Johannes de Fine Licht
e3c045415a
[CMake] Propagate dependencies to OBJECT libraries in add_llvm_library (#183541)
Previously, transitively inherited calls to
`target_include_directories(foo SYSTEM ...)` were being squashed into a
flat list of includes, effectively stripping off `-isystem` and
unintentionally forwarding warnings from such dependencies.

To correctly propagate `SYSTEM` dependencies, use
`target_link_libraries` to forward the parent target's link dependencies
to the OBJECT library (similar to the `_static` flow below). Unlike a
flat `target_include_directories`, this lets CMake resolve transitive
SYSTEM include directories through the proper dependency chain.

Note that `target_link_libraries` on an OBJECT library propagates all
usage requirements, not just includes. This also brings in transitive
`INTERFACE_COMPILE_DEFINITIONS`, `INTERFACE_COMPILE_OPTIONS`, and
`INTERFACE_COMPILE_FEATURES`. This is arguably more correct, as the
OBJECT library compiles the same sources and should see the same flags.

The existing `target_include_directories` call is retained for include
directories set directly on the target (not through link dependencies).
CMake deduplicates include directories that appear through both paths.
Compile definitions and options may technically appear twice (once via
the OBJECT library, once via the consuming target), but duplicate `-D`
and flag entries should be harmless in practice.

Also fix `clang_target_link_libraries` and `mlir_target_link_libraries`
to forward the link type (PUBLIC/PRIVATE/INTERFACE) to `obj.*` targets.
Previously the type keyword was silently dropped, resulting in
plain-signature `target_link_libraries` calls. This is now required
because the new keyword-signature call in `llvm_add_library` would
otherwise conflict (CMake requires all calls on a target to use the same
signature).
2026-02-28 02:05:38 +02:00
Saleem Abdulrasool
20ec9a9bb7
build: correct MSVC and Windows mixup for CLANG_BUILD_STATIC (#183609)
The build incorrectly used `MSVC` to determine that we were building for
Windows (MS ABI). This prevents the use of the GNU driver for building
LLVM for Windows. Adjust the condition to `WIN32 AND NOT MINGW` to
correctly identify that we are building for Windows MS ABI.
2026-02-26 15:35:51 -08:00
Michael Kruse
6295b8e763
[OpenMP] Remove standalone build mode (Reapply #149878) (#182022)
This reapplies #149878

Remove all the CMake code for openmp standalone builds. Standalone
builds have been superseded by the runtimes default build (also
sometimes called the standalone runtimes build). The runtimes default
build can be thought of a standalone build with the standalone
boilerplate contained in <llvm-project>/runtimes/CMakeLists.txt. There
is no need for each runtime to contain the same boilerplate code again.

Builds still using the standalone build via
```sh
cmake -S <llvm-project>/openmp ...
```
can switch over to the runtimes default build using
```sh
cmake -S <llvm-project>/runtimes -DLLVM_ENABLE_RUNTIMES=openmp ...
```
Options that were valid for the standalone build are also valid for
default runtimes build, unless handled only in `if
(OPENMP_STANDALONE_BUILD)` regions.

The existence of both, standalone builds and runtime default builds,
easily leads to confusion such as fixed in #149871. A non-standalone
build does not mean that it is built as part of a bootstrapping-build of
LLVM inside the `runtimes/runtimes-bins` directory, nor does it mean
that the compiler is necessarily Clang. Some of the remaining code may
have been written with that assumption. However, the purpose of this
patch is to only remove the standalone build functionality.
2026-02-18 18:11:55 -05:00
Michael Kruse
e07b9d1504 Revert "[OpenMP] Remove standalone build mode (#149878)"
Downstream builds are note sufficiently prepared.

This reverts commit 176928cc13.
2026-02-18 13:52:41 +01:00
Michael Kruse
176928cc13
[OpenMP] Remove standalone build mode (#149878)
Remove all the CMake code for openmp standalone builds. Standalone
builds have been superseded by the runtimes default build (also
sometimes called the standalone runtimes build). The runtimes default
build can be thought of a standalone build with the standalone
boilerplate contained in <llvm-project>/runtimes/CMakeLists.txt. There
is no need for each runtime to contain the same boilerplate code again.

Builds still using the standalone build via
```sh
cmake -S <llvm-project>/openmp ...
```
can switch over to the runtimes default build using
```sh
cmake -S <llvm-project>/runtimes -DLLVM_ENABLE_RUNTIMES=openmp ...
```
Options that were valid for the standalone build are also valid for
default runtimes build, unless handled only in
`if (OPENMP_STANDALONE_BUILD)` regions.

The existence of both, standalone builds and runtime default builds,
easily leads to confusion such as fixed in #149871. A non-standalone
build does not mean that it is built as part of a bootstrapping-build of
LLVM inside the `runtimes/runtimes-bins` directory, nor does it mean
that the compiler is necessarily Clang. Some of the remaining code may
have been written with that assumption. However, the purpose of this
patch is to only remove the standalone build functionality.
2026-02-18 12:00:04 +01:00
Vladimir Vereschaka
bfe80fb3bb
[CMake] Add multi-target cross to ARM/AArch64 Linux toolchain CMake cache file. (#179598)
This cache file can be used to build a multi-target cross Windows/Linux
to ARM/Aarch64/etc. Linux toolchain.

[Replacement for CrossWinToARMLinux.cmake on the buildbot]
2026-02-06 10:51:13 -08:00
Brian Cain
cf4ce383b3
[hexagon] Add dylib cmake + toolchain_only (#177247)
The toolchains take up much less space when we enable dylib, so let's
create an option to build them that way.

Also: TOOLCHAIN_ONLY was ineffective in
hexagon-unknown-linux-musl-clang-cross.cmake because cmake takes the
first setting from hexagon-unknown-linux-musl-clang.cmake with
precedence. FORCE it to fix that issue.

Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
2026-01-27 19:34:44 -06:00
Petr Hosek
a3a8e82e88
CMake cache file for building Pico SDK toolchain (#113267)
This cache file demonstrates how to build a complete baremetal
Clang/LLVM toolchain that can be used to build the Pico SDK.
2026-01-16 15:22:36 -08:00
Prabhu Rajasekaran
5dc6deafef
[Fuchsia] Set libcxx baremetal options (#173825)
Setting LIBCXX_HAS_RT_LIB and LIBCXX_HAS_PTHREAD_LIB to OFF 
to prevent POSIX dependencies creeping in.
2026-01-05 22:25:08 +00:00
Petr Hosek
dd63127b56
[libc] Support opaque FILE* on baremetal (#168931)
This change expands the stdio support on baremetal to support opaque
FILE*. This builds on top of the existing baremetal embedding API; we
treat the standard FILE* streams as pointers that point to the cookie
symbols which are a part of the embedding API. This also allows users to
define their own FILE* streams, but we don't (yet) support the API that
return FILE* such as fopen or fopencookie.
2025-12-17 10:56:45 -08:00
Leandro Lupori
055864c568
Enable libarcher in LLVM releases (#172310)
It was disabled due to #170138, which is fixed now.
2025-12-16 09:53:03 -03:00
Leandro Lupori
a93214c582
Build and ship OpenMP with LLVM releases (#160581)
Fixes #135021

Suggested-by: Kawashima Takahiro <t-kawashima@fujitsu.com>
2025-12-15 10:40:01 -03:00
Haowei
49828c23b5
[Fuchsia] Bump minimal OS X target to 11.0 (#169568)
libcxx requires minimal macOS 11 to build. This patch bumps the minimal
OS X target in Fuchsia's cmake cache file to 11.0 to satisfy this
requirement.
2025-11-25 13:40:53 -08:00
Roland McGrath
f55b55c2a1
[CMake][Fuchsia] Build libclang_rt.builtins for arm-fuchsia (#166686)
No other runtimes can yet be built for the arm-fuchsia target,
but this one can be.  There is no OS-specific code in the arm
builtins needed for Fuchsia.
2025-11-06 10:02:16 -08:00
Tom Stellard
6d54a5e5b8
workflows/release-binaries: Disable flang on Darwin (#164667)
The tests are failing due to
https://github.com/llvm/llvm-project/issues/160546

---------

Co-authored-by: Cullen Rhodes <cullen.rhodes@arm.com>
2025-10-27 08:31:59 -07:00
Tom Stellard
1906c3e1e3
[CMake][Release] Stop linking against stage1 runtimes (#164017)
This was causing a build failure on Darwin and a test failure on Linux.
This config is not widely used or well tested, so I don't think the
potential and likely small performance gains and the portability from
this are worth the maintenance costs.
2025-10-21 19:46:40 -07:00
Romaric Jodin
88b7707346
fix clang_cmake_builddir (#161220)
When building llvm from a subdirectory (like clspv does)
`CMAKE_BINARY_DIR` is at the top of the build directory.

When building runtimes (libclc for example), the build fails looking for
clang (through `find_package` looking at `LLVM_BINARY_DIR` with
`NO_DEFAULT_PATH` & `NO_CMAKE_FIND_ROOT_PATH`) because clang is not in
`LLVM_BINARY_DIR`.

Fix that issue by setting `clang_cmake_builddir` the same way we set
`llvm_cmake_builddir` from `LLVM_BINARY_DIR`.

For default llvm build (using llvm as the main cmake project), it should
not change anything.
For standalone clang build, keep the actual value as libclc cannot be
built that way.
2025-10-16 13:18:19 +02:00