[libc-commits] [libc] ad00a3d - [libc][AMDGPU] Disable the AMDGPU backend's ctor/dtor lowering for libc
Joseph Huber via libc-commits
libc-commits at lists.llvm.org
Tue May 23 07:20:50 PDT 2023
Author: Joseph Huber
Date: 2023-05-23T09:20:41-05:00
New Revision: ad00a3db4dde0507f8a6be5f1c5eb2b54d242f0a
URL: https://github.com/llvm/llvm-project/commit/ad00a3db4dde0507f8a6be5f1c5eb2b54d242f0a
DIFF: https://github.com/llvm/llvm-project/commit/ad00a3db4dde0507f8a6be5f1c5eb2b54d242f0a.diff
LOG: [libc][AMDGPU] Disable the AMDGPU backend's ctor/dtor lowering for libc
The AMDGPU backend has a built-in pass to lower constructors. We do this
manually in the `start.cpp` implementation so we can disable this to
keep the binaries smaller.
Differential Revision: https://reviews.llvm.org/D151213
Added:
Modified:
libc/startup/gpu/amdgpu/CMakeLists.txt
Removed:
################################################################################
diff --git a/libc/startup/gpu/amdgpu/CMakeLists.txt b/libc/startup/gpu/amdgpu/CMakeLists.txt
index 0f1d4edf285df..e7c0aeafafd9a 100644
--- a/libc/startup/gpu/amdgpu/CMakeLists.txt
+++ b/libc/startup/gpu/amdgpu/CMakeLists.txt
@@ -25,4 +25,5 @@ target_link_libraries(
"-mcpu=${LIBC_GPU_TARGET_ARCHITECTURE}"
"--target=${LIBC_GPU_TARGET_TRIPLE}"
"-flto"
+ "-Wl,-mllvm,-amdgpu-lower-global-ctor-dtor=0"
)
More information about the libc-commits
mailing list