[compiler-rt] [DFSan] Replace `cat` with `cmake -E cat` (PR #90557)
Igor Kudrin via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 29 21:39:47 PDT 2024
https://github.com/igorkudrin created https://github.com/llvm/llvm-project/pull/90557
`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.
>From d985cac998b0ffb282578fbd0926d880ee38d636 Mon Sep 17 00:00:00 2001
From: Igor Kudrin <ikudrin at accesssoftek.com>
Date: Mon, 29 Apr 2024 21:32:06 -0700
Subject: [PATCH] [DFSan] Replace `cat` with `cmake -E cat`
`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.
---
compiler-rt/lib/dfsan/CMakeLists.txt | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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)
More information about the llvm-commits
mailing list