[llvm] cmake: Remove cmake_crosscompiling check on LLVMSupport target export (PR #208420)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 9 03:56:46 PDT 2026


https://github.com/arsenm created https://github.com/llvm/llvm-project/pull/208420

Revert exported target check added in00b2f81418233397e601afaeea6d62c47a6c368a
to fix reported mingw cross compile regression. This is the quick fix which
restores the cmake warnings when building libc for amdgpu.

>From 541d6371510f390d6a0c5a1c7d58fa9f932b8f70 Mon Sep 17 00:00:00 2001
From: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: Thu, 9 Jul 2026 12:52:49 +0200
Subject: [PATCH] cmake: Remove cmake_crosscompiling check on LLVMSupport
 target export

Revert exported target check added in00b2f81418233397e601afaeea6d62c47a6c368a
to fix reported mingw cross compile regression. This is the quick fix which
restores the cmake warnings when building libc for amdgpu.
---
 llvm/cmake/modules/LLVMConfig.cmake.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm/cmake/modules/LLVMConfig.cmake.in b/llvm/cmake/modules/LLVMConfig.cmake.in
index 6ef0cef7d0296..8eaf659d82c0c 100644
--- a/llvm/cmake/modules/LLVMConfig.cmake.in
+++ b/llvm/cmake/modules/LLVMConfig.cmake.in
@@ -147,7 +147,7 @@ set(LLVM_ENABLE_SHARED_LIBS @BUILD_SHARED_LIBS@)
 set(LLVM_DEFAULT_EXTERNAL_LIT "@LLVM_CONFIG_DEFAULT_EXTERNAL_LIT@")
 set(LLVM_LIT_ARGS "@LLVM_LIT_ARGS@")
 
-if(NOT TARGET LLVMSupport AND NOT CMAKE_CROSSCOMPILING)
+if(NOT TARGET LLVMSupport)
   @LLVM_CONFIG_INCLUDE_EXPORTS@
   @llvm_config_include_buildtree_only_exports@
 endif()



More information about the llvm-commits mailing list