Björn Svensson 55d6c6ff58
[clang][driver] Correcting arguments when using libFuzzer with -shared-libsan (#164842)
This PR contains two commits:
- Add required dependencies when using `-shared-libsan` and fuzzer.
Since libFuzzer is a static library we need to make sure that we add its
dependencies when building with `-shared-libsan`. E.g libFuzzer uses
`ceilf()` from `libm.so` when building on Gnu toolchain.
Previously, the resulting command did not contain the required link
libraries, giving build failures
(only a static sanitizer runtime would trigger the call to
`linkSanitizerRuntimeDeps`).
    
- Correcting dependency order when using fuzzer.
When building using `-shared-libsan` the sanitizer library needs to be
first in link order.
Since the fuzzer requires `-lstdc++` we have to make sure that the
sanitizer library is added before `-lstdc++`.

---------

Signed-off-by: Björn Svensson <bjorn.a.svensson@est.tech>
2026-02-09 16:13:17 -08:00
..
2025-10-31 11:15:19 -07:00
O.c
p.c