[clang] [clang] force libc linked with --no-as-needed when using compiler-rt (PR #95848)

Fangrui Song via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 22 23:09:06 PDT 2024


MaskRay wrote:

> ```shell
> ../build/bin/clang test.c -o libtest.so -fPIC -shared -v -Wl,--as-needed -Wl,--trace-symbol=__cxa_finalize
> ```

This command line does not close `--as-needed` with `--no-as-needed`, so `-lc` is linked in `as-needed` mode.
The driver is not responsible for forcing `--no-as-needed`. I believe this PR should be closed.

https://github.com/llvm/llvm-project/pull/95848


More information about the cfe-commits mailing list