[libc-commits] [PATCH] D152190: [CMake][libc] Don't put archive in build/lib/<target triple> by default
Aiden Grossman via Phabricator via libc-commits
libc-commits at lists.llvm.org
Mon Jun 5 17:04:42 PDT 2023
aidengrossman added a comment.
@goldstein.w.n reported this failure with full build mode after this patch:
$> echo "int main() {}" > tmp.c && ./bin/clang tmp.c -o tmp
/bin/ld: /lib/x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x21): undefined reference to `__libc_start_main'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
As far as I understand it, the previous patch also moved the full build `libc.a` and `libm.a` into the `build/lib/<target triple>` directory, so clang would try and link against the full built LLVM libc there by default instead of the system libc, causing build failures. It didn't break the overlay mode because `llvmlibc.a` needs to be explicitly linked against.
In addition it seems to make more sense to keep this gated behind a flag even just for the overlay mode as LLVM libc matures further.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152190/new/
https://reviews.llvm.org/D152190
More information about the libc-commits
mailing list