[PATCH] D23127: [test-suite] Bitcode tests: Update cmake to build driver and halide runtime only once.

Matthias Braun via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 3 12:27:18 PDT 2016


MatzeB accepted this revision.
MatzeB added a comment.
This revision is now accepted and ready to land.

Looks good to me when the code duplication issue is addressed:


================
Comment at: Bitcode/simd_ops/CMakeLists.txt:9
@@ -8,1 +8,3 @@
 list(APPEND LDFLAGS -lpthread -ldl)
+add_library(simd_ops STATIC ${CMAKE_CURRENT_SOURCE_DIR}/simd_ops.cpp ${CMAKE_CURRENT_SOURCE_DIR}/${ARCH}_halide_runtime.bc)
+target_link_libraries(simd_ops)
----------------
You can probably simplify this by leaving out the ${CMAKE_CURRENT_SOURCE_DIR}/ prefixes.

================
Comment at: Bitcode/simd_ops/CMakeLists.txt:11-14
@@ +10,6 @@
+target_link_libraries(simd_ops)
+if (NOT TEST_SUITE_USE_PERF)
+  add_dependencies(simd_ops timeit-target)
+endif()
+add_dependencies(simd_ops timeit-host fpcmp-host)
+set_target_properties(simd_ops PROPERTIES LINKER_LANGUAGE CXX)
----------------
Could you factor this code into a helper function (test_suite_add_build_dependencies(target) maybe?) so we avoid the code duplication with SingleMultiSource.cmake?


https://reviews.llvm.org/D23127





More information about the llvm-commits mailing list