This is an archive of the discontinued LLVM Phabricator instance.

Allow building libFuzzer in two-stage compiler-rt build
ClosedPublic

Authored by george.karpenkov on Oct 13 2017, 2:54 PM.

Details

Summary

When LLVM_BUILD_EXTERNAL_COMPILER_RT option is set to true,
all of projects in compiler-rt are built with a freshly-built compiler using
a recursive CMake invocation.
(e.g. that's how compiler-rt is used in Swift)

Just now I have noticed that libFuzzer binaries were missing in such a case,
and ninja fuzzer returned "no such target", while ninja asan worked just fine.

To my surprise, the list of allowed targets was actually hardcoded in Clang!
While the current setup is clearly suboptimal, for the lack of a better fix
I'm just adding fuzzer to a list of compiler-rt targets.

Diff Detail

Repository
rL LLVM

Event Timeline

kubamracek accepted this revision.Oct 13 2017, 2:59 PM
This revision is now accepted and ready to land.Oct 13 2017, 2:59 PM
This revision was automatically updated to reflect the committed changes.