aboutsummaryrefslogtreecommitdiff
path: root/libc/startup
diff options
context:
space:
mode:
authorJoseph Huber <jhuber6@vols.utk.edu>2023-05-23 09:16:30 -0500
committerJoseph Huber <jhuber6@vols.utk.edu>2023-05-23 09:20:41 -0500
commitad00a3db4dde0507f8a6be5f1c5eb2b54d242f0a (patch)
treef836470ef6053667cc43a0236c8f8512c71e5223 /libc/startup
parentd67c91b5e728d94376873c04ffac3ba6d29b95b8 (diff)
downloadllvm-ad00a3db4dde0507f8a6be5f1c5eb2b54d242f0a.zip
llvm-ad00a3db4dde0507f8a6be5f1c5eb2b54d242f0a.tar.gz
llvm-ad00a3db4dde0507f8a6be5f1c5eb2b54d242f0a.tar.bz2
[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
Diffstat (limited to 'libc/startup')
-rw-r--r--libc/startup/gpu/amdgpu/CMakeLists.txt1
1 files changed, 1 insertions, 0 deletions
diff --git a/libc/startup/gpu/amdgpu/CMakeLists.txt b/libc/startup/gpu/amdgpu/CMakeLists.txt
index 0f1d4ed..e7c0aea 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"
)