mirror-llvm-project/llvm
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
..
benchmarks [ADT] Make canonicalization a compile-time parameter of ImmutableSet/Map (#209300) 2026-07-14 18:13:09 +00:00
bindings
cmake Reapply "Skipping host target exports during cross-compilation" (#210… (#210496) 2026-07-20 10:47:59 -07:00
docs [LangRef] Add immarg attributes to memcpy, memset, memmove isvolatile args (#210669) 2026-07-20 14:33:44 +00:00
examples
include [LoopUnroll] Add prepare-for-lto pass option (#192153) 2026-07-20 17:42:47 +00:00
lib [LoopUnroll] Add prepare-for-lto pass option (#192153) 2026-07-20 17:42:47 +00:00
projects
resources
runtimes [LLVM] Fix not passing CMAKE_CROSSCOMPILING_EMULATOR for amdgpu (#209828) 2026-07-15 12:49:02 -05:00
test [LoopUnroll] Add prepare-for-lto pass option (#192153) 2026-07-20 17:42:47 +00:00
tools [llvm-readobj] Print all callgraph sections (#198929) 2026-07-20 10:31:43 -07:00
unittests [ADT] Add begin and end to EytzingerTableSpan and EytzingerTable (NFC) (#210478) 2026-07-19 07:37:07 -07:00
utils [llvm-utils][Tools] fix mir-check filter to handle scattered check-lines (#209226) 2026-07-20 10:34:38 -07:00
.clang-format
.clang-tidy
.gitattributes
.gitignore
CMakeLists.txt [AMDGPU] Update libc/runtime target to use amdgpu (#210032) 2026-07-16 10:32:51 -05:00
CMakePresets.json
configure
CREDITS.TXT
LICENSE.TXT
Maintainers.md [LLVM][Maintainers] Volunteer for LoopUnroll (#207802) 2026-07-08 17:35:07 +00:00
README.txt
RELEASE_TESTERS.TXT

The LLVM Compiler Infrastructure
================================

This directory and its subdirectories contain source code for LLVM,
a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.md for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you are writing a package for LLVM, see docs/Packaging.rst for our
suggestions.