[clang] [compiler-rt] [llvm] Skipping host target exports during cross-compilation (PR #209922)
Martin Storsjö via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 17 01:08:48 PDT 2026
================
@@ -76,6 +76,13 @@ if(LLVM_BINARY_DIR)
list(APPEND llvm_search_paths "${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm")
list(APPEND clang_search_paths "${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/cmake/clang")
endif()
+
+# Skip importing LLVM exported targets as they are not needed.
+# On baremetal platforms that lacks shared library support,
+# these exports may contain shared libraries and they will
+# trigger cmake errors.
----------------
mstorsjo wrote:
The ordering/reasoning in this comment (and the other similar one in compiler-rt) feels a bit off - these files contain shared libraries on any platform, while it makes it sound like they'd only do that for baremetal platforms.
Perhaps "These exports may contain shared libraries. When targeting baremetal platforms that lacks shared library support, importing such cmake modules will trigger cmake errors." or something along those lines?
https://github.com/llvm/llvm-project/pull/209922
More information about the cfe-commits
mailing list