[libc-commits] [PATCH] D149527: [libc] Support global constructors and destructors on NVPTX
Siva Chandra via Phabricator via libc-commits
libc-commits at lists.llvm.org
Mon May 1 11:37:49 PDT 2023
sivachandra added inline comments.
================
Comment at: libc/test/IntegrationTest/test.cpp:80
// Integration tests are linked with -nostdlib. BFD linker expects
// __dso_handle when -nostdlib is used.
void *__dso_handle = nullptr;
----------------
jhuber6 wrote:
> tra wrote:
> > What exactly needs this symbol?
> >
> > I'm surprised we need to care about DSOs on NVPTX as we do not have any there.
> >
> > Googling around (https://stackoverflow.com/questions/34308720/where-is-dso-handle-defined) suggests that we may avoid the issue by compiling with `-fno-use-cxa-atexit`.
> >
> > @MaskRay -- any suggestions on what's the right way to deal with this?
> That might work for these hermetic tests since we should provide the base `atexit`. @sivachandra do you think we could use this? It seems to be supported on both Clang and GCC.
You can choose to build for the GPUs with `-fno-use-cxa-atexit`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149527/new/
https://reviews.llvm.org/D149527
More information about the libc-commits
mailing list