Skip to content

Commit a3cd524

Browse files
author
George Karpenkov
committed
Allow building libFuzzer in two-stage compiler-rt build
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. Differential Revision: https://reviews.llvm.org/D38904 llvm-svn: 315771
1 parent 29d3ba7 commit a3cd524

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/runtime/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ if(LLVM_BUILD_EXTERNAL_COMPILER_RT AND EXISTS ${COMPILER_RT_SRC_ROOT}/)
109109
USES_TERMINAL)
110110

111111
# Add top-level targets that build specific compiler-rt runtimes.
112-
set(COMPILER_RT_RUNTIMES asan builtins dfsan lsan msan profile tsan ubsan ubsan-minimal)
112+
set(COMPILER_RT_RUNTIMES fuzzer asan builtins dfsan lsan msan profile tsan ubsan ubsan-minimal)
113113
foreach(runtime ${COMPILER_RT_RUNTIMES})
114114
get_ext_project_build_command(build_runtime_cmd ${runtime})
115115
add_custom_target(${runtime}

0 commit comments

Comments
 (0)