[compiler-rt] [DFSan] Replace `cat` with `cmake -E cat` (PR #90557)

via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 29 21:40:19 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-compiler-rt-sanitizer

Author: Igor Kudrin (igorkudrin)

<details>
<summary>Changes</summary>

`CMake` supports [this command](https://cmake.org/cmake/help/latest/manual/cmake.1.html#cmdoption-cmake-E-arg-cat) as of version 3.18. [D151344](https://reviews.llvm.org/D151344) bumped the minimum version to 3.20, so, it is now possible to remove the dependency on the external utility. This helps to cross-compile from Windows to Linux without installing additional tools, such as MSYS2.

---
Full diff: https://github.com/llvm/llvm-project/pull/90557.diff


1 Files Affected:

- (modified) compiler-rt/lib/dfsan/CMakeLists.txt (+2-1) 


``````````diff
diff --git a/compiler-rt/lib/dfsan/CMakeLists.txt b/compiler-rt/lib/dfsan/CMakeLists.txt
index f6479e9da87b0f..37c386d2de1f52 100644
--- a/compiler-rt/lib/dfsan/CMakeLists.txt
+++ b/compiler-rt/lib/dfsan/CMakeLists.txt
@@ -63,7 +63,8 @@ add_custom_command(OUTPUT ${dfsan_abilist_filename}
                    COMMAND
                     ${CMAKE_COMMAND} -E make_directory ${dfsan_abilist_dir}
                    COMMAND
-                     cat ${CMAKE_CURRENT_SOURCE_DIR}/done_abilist.txt
+                    ${CMAKE_COMMAND} -E 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)

``````````

</details>


https://github.com/llvm/llvm-project/pull/90557


More information about the llvm-commits mailing list