[libcxx-commits] [PATCH] D81190: [libc++] Link against libatomic when it is found
Loïc Yhuel via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Feb 25 05:50:28 PST 2021
loic.yhuel added a comment.
Herald added a subscriber: arichardson.
On which platform does this commit work ?
On Linux, the test program would still need an explicit `-latomic`, since indirect dependencies are not used to resolve undefined symbols from the program.
For this to work, it would need `PUBLIC atomic` instead of `PRIVATE atomic`, so that `libcxx/cmake/Modules/DefineLinkerScript.cmake` would add it to the linker script (`libc++.so`).
It would be even better with `AS_NEEDED` in the linker script, and `-Wl,--as-needed` for the lib, in order to only load the library when it is actually used.
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
More information about the libcxx-commits