[libc-commits] [PATCH] D151213: [libc][AMDGPU] Disable the AMDGPU backend's ctor/dtor lowering for libc
Joseph Huber via Phabricator via libc-commits
libc-commits at lists.llvm.org
Tue May 23 07:20:26 PDT 2023
jhuber6 created this revision.
Herald added subscribers: libc-commits, ecnelises, kerbowa, tschuett, tpr, dstuttard, yaxunl, jvesely, kzhuravl.
Herald added projects: libc-project, All.
jhuber6 requested review of this revision.
Herald added a subscriber: wdng.
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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D151213
Files:
libc/startup/gpu/amdgpu/CMakeLists.txt
Index: libc/startup/gpu/amdgpu/CMakeLists.txt
===================================================================
--- libc/startup/gpu/amdgpu/CMakeLists.txt
+++ libc/startup/gpu/amdgpu/CMakeLists.txt
@@ -25,4 +25,5 @@
"-mcpu=${LIBC_GPU_TARGET_ARCHITECTURE}"
"--target=${LIBC_GPU_TARGET_TRIPLE}"
"-flto"
+ "-Wl,-mllvm,-amdgpu-lower-global-ctor-dtor=0"
)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D151213.524701.patch
Type: text/x-patch
Size: 364 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230523/77310d44/attachment-0001.bin>
More information about the libc-commits
mailing list