[libFuzzer] Fix multi-arch build support for fuzzer tests.

The bug was not previously exposed as only one architecture is currently
supported for libFuzzer.

Differential Revision: https://reviews.llvm.org/D47287

llvm-svn: 333242
This commit is contained in:
George Karpenkov 2018-05-24 23:55:53 +00:00
parent 02c85f1489
commit 464d1415b2
1 changed files with 7 additions and 5 deletions

View File

@ -50,14 +50,16 @@ macro(test_fuzzer stdlib)
${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}/lit.site.cfg
)
add_lit_testsuite(check-fuzzer-${stdlib_name} "Running Fuzzer ${stdlib} tests"
${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}
add_lit_testsuite(check-fuzzer-${stdlib_name}-${arch}
"Running Fuzzer ${stdlib} tests"
${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}/
DEPENDS ${LIBFUZZER_TEST_DEPS})
if(TEST_DEPS)
add_dependencies(check-fuzzer-${stdlib_name} ${TEST_DEPS})
add_dependencies(check-fuzzer-${stdlib_name}-${arch} ${TEST_DEPS})
endif()
set_target_properties(check-fuzzer-${stdlib_name} PROPERTIES FOLDER "Compiler-RT Tests")
add_dependencies(check-fuzzer check-fuzzer-${stdlib_name})
set_target_properties(check-fuzzer-${stdlib_name}-${arch}
PROPERTIES FOLDER "Compiler-RT Tests")
add_dependencies(check-fuzzer check-fuzzer-${stdlib_name}-${arch})
endforeach()
endmacro()