Skip to content

Use bundled libFuzzer runtime from clang instead of building it locally #2164

@jonathanmetzman

Description

@jonathanmetzman

@kcc points out that building locally is causing performance issues since we aren't using the correct build flags.

I've experimented with linking fuzz targets against the bundled runtime instead of the locally built one.
I'm hoping to transparently do this so that $LIB_FUZZING_ENGINE is the bundled runtime instead of a locally built one without needing any changes in projects' build processes.

However, @Dor1s and I found that we need to use -lc++abi when linking directly against the bundled libFuzzer. Is this expected?
Is there a way to force everyone linking against libFuzzer to also link against c++abi (maybe the libcxxabi.a and libclang_rt.fuzzer-x86_64.a libraries can be combined)?
Adding -lc++abi to CXXFLAGS/CFLAGS sort of works, but causes a lot of compiler warnings when the flags are used just for compilation and not linking.

cc @morehouse

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions