[compiler-rt] Revert "[compiler-rt][profile] Use runtimes-libc-headers in the GPU runtimes build" (PR #193539)

via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 22 09:55:10 PDT 2026


https://github.com/gulfemsavrun created https://github.com/llvm/llvm-project/pull/193539

Reverts llvm/llvm-project#192814

This CL broke the Mac build.
https://luci-milo.appspot.com/ui/p/fuchsia/builders/toolchain.ci/clang-mac-arm64/b8683874769760578273/overview

>From 6012af228910db771ced39e057e40ccec792688d Mon Sep 17 00:00:00 2001
From: gulfemsavrun <gulfem at google.com>
Date: Wed, 22 Apr 2026 09:52:19 -0700
Subject: [PATCH] =?UTF-8?q?Revert=20"[compiler-rt][profile]=20Use=20runtim?=
 =?UTF-8?q?es-libc-headers=20in=20the=20GPU=20runtimes=20=E2=80=A6"?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This reverts commit e0b4a7063f78d36ffa5679e1d0e564a3668db1f0.
---
 compiler-rt/CMakeLists.txt             |  8 --------
 compiler-rt/lib/profile/CMakeLists.txt | 11 -----------
 2 files changed, 19 deletions(-)

diff --git a/compiler-rt/CMakeLists.txt b/compiler-rt/CMakeLists.txt
index 6e8045631b218..1a5520d624cd4 100644
--- a/compiler-rt/CMakeLists.txt
+++ b/compiler-rt/CMakeLists.txt
@@ -32,14 +32,6 @@ list(INSERT CMAKE_MODULE_PATH 0
   "${LLVM_COMMON_CMAKE_UTILS}/Modules"
   )
 
-# Expose the shared `runtimes-libc-*` targets to compiler-rt subcomponents
-# (same as libcxx / libcxxabi / libunwind).
-if(LLVM_RUNTIMES_BUILD)
-  list(APPEND CMAKE_MODULE_PATH
-       "${CMAKE_CURRENT_SOURCE_DIR}/../runtimes/cmake/Modules")
-  include(HandleLibC)
-endif()
-
 if(CMAKE_CONFIGURATION_TYPES)
   set(CMAKE_CFG_RESOLVED_INTDIR "${CMAKE_CFG_INTDIR}/")
 else()
diff --git a/compiler-rt/lib/profile/CMakeLists.txt b/compiler-rt/lib/profile/CMakeLists.txt
index 8d9a773412a22..8c196d15841a4 100644
--- a/compiler-rt/lib/profile/CMakeLists.txt
+++ b/compiler-rt/lib/profile/CMakeLists.txt
@@ -186,15 +186,6 @@ append_list_if(COMPILER_RT_HAS_WD4221_FLAG /wd4221 EXTRA_FLAGS)
 # Disable 'nonstandard extension used: translation unit is empty'.
 append_list_if(COMPILER_RT_HAS_WD4206_FLAG /wd4206 EXTRA_FLAGS)
 
-# In the GPU runtimes build, link `runtimes-libc-headers` for its
-# `-isystem` include dir and for waiting on header generation.
-# The target is created at compiler-rt top level from `HandleLibC.cmake`
-# when `LLVM_RUNTIMES_BUILD` is set.
-set(PROFILE_LINK_LIBS)
-if(COMPILER_RT_GPU_BUILD AND TARGET runtimes-libc-headers)
-  list(APPEND PROFILE_LINK_LIBS runtimes-libc-headers)
-endif()
-
 if(APPLE)
   add_compiler_rt_runtime(clang_rt.profile
     STATIC
@@ -203,7 +194,6 @@ if(APPLE)
     CFLAGS ${EXTRA_FLAGS}
     SOURCES ${PROFILE_SOURCES}
     ADDITIONAL_HEADERS ${PROFILE_HEADERS}
-    LINK_LIBS ${PROFILE_LINK_LIBS}
     PARENT_TARGET profile)
 else()
   add_compiler_rt_runtime(clang_rt.profile
@@ -212,6 +202,5 @@ else()
     CFLAGS ${EXTRA_FLAGS}
     SOURCES ${PROFILE_SOURCES}
     ADDITIONAL_HEADERS ${PROFILE_HEADERS}
-    LINK_LIBS ${PROFILE_LINK_LIBS}
     PARENT_TARGET profile)
 endif()



More information about the llvm-commits mailing list