[PATCH] D73524: [CMake][DFSan] Don't use cat as it's not available on Windows
Petr Hosek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 31 15:58:09 PST 2020
phosek updated this revision to Diff 241836.
phosek edited the summary of this revision.
phosek added a comment.
I've tried the pure CMake approach and seems to be working well so I'm inclined to land this version unless there're any objections.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73524/new/
https://reviews.llvm.org/D73524
Files:
compiler-rt/lib/dfsan/CMakeLists.txt
Index: compiler-rt/lib/dfsan/CMakeLists.txt
===================================================================
--- compiler-rt/lib/dfsan/CMakeLists.txt
+++ compiler-rt/lib/dfsan/CMakeLists.txt
@@ -41,19 +41,13 @@
clang_rt.dfsan-${arch}-symbols)
endforeach()
-set(dfsan_abilist_dir ${COMPILER_RT_OUTPUT_DIR}/share)
-set(dfsan_abilist_filename ${dfsan_abilist_dir}/dfsan_abilist.txt)
-add_custom_target(dfsan_abilist ALL
- DEPENDS ${dfsan_abilist_filename})
-add_custom_command(OUTPUT ${dfsan_abilist_filename}
- VERBATIM
- COMMAND
- ${CMAKE_COMMAND} -E make_directory ${dfsan_abilist_dir}
- COMMAND
- cat ${CMAKE_CURRENT_SOURCE_DIR}/done_abilist.txt
- ${CMAKE_CURRENT_SOURCE_DIR}/libc_ubuntu1404_abilist.txt
- > ${dfsan_abilist_filename}
- DEPENDS done_abilist.txt libc_ubuntu1404_abilist.txt)
-add_dependencies(dfsan dfsan_abilist)
+set(dfsan_abilist_in_filename ${CMAKE_CURRENT_BINARY_DIR}/dfsan_abilist.txt.in)
+set(dfsan_abilist_filename ${COMPILER_RT_OUTPUT_DIR}/share/dfsan_abilist.txt)
+file(WRITE ${dfsan_abilist_in_filename} "")
+file(READ ${CMAKE_CURRENT_SOURCE_DIR}/done_abilist.txt CONTENTS)
+file(APPEND ${dfsan_abilist_in_filename} "${CONTENTS}")
+file(READ ${CMAKE_CURRENT_SOURCE_DIR}/libc_ubuntu1404_abilist.txt CONTENTS)
+file(APPEND ${dfsan_abilist_in_filename} "${CONTENTS}")
+configure_file(${dfsan_abilist_in_filename} ${dfsan_abilist_filename} COPYONLY)
install(FILES ${dfsan_abilist_filename}
DESTINATION ${COMPILER_RT_INSTALL_PATH}/share)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73524.241836.patch
Type: text/x-patch
Size: 1641 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200131/779efbcf/attachment.bin>
More information about the llvm-commits
mailing list