[compiler-rt] 86339ef - [compiler-rt] [test] Add an .exe suffix for unit test executables on MinGW
Martin Storsjö via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 25 11:09:56 PDT 2023
Author: Martin Storsjö
Date: 2023-04-25T21:09:05+03:00
New Revision: 86339ef088e9aac6cf52cf9022d7a5bd144d4c42
URL: https://github.com/llvm/llvm-project/commit/86339ef088e9aac6cf52cf9022d7a5bd144d4c42
DIFF: https://github.com/llvm/llvm-project/commit/86339ef088e9aac6cf52cf9022d7a5bd144d4c42.diff
LOG: [compiler-rt] [test] Add an .exe suffix for unit test executables on MinGW
Previously, an .exe suffix was only added for MSVC configurations.
In practice, an .exe suffix is added implicitly by MinGW toolchains
if the output is a suffixless file name. However this can cause lots
of subtle build system confusion, when it's not generating the file it
expected.
Differential Revision: https://reviews.llvm.org/D149029
Added:
Modified:
compiler-rt/cmake/Modules/AddCompilerRT.cmake
Removed:
################################################################################
diff --git a/compiler-rt/cmake/Modules/AddCompilerRT.cmake b/compiler-rt/cmake/Modules/AddCompilerRT.cmake
index 045221312a820..752ce2ff1c8f5 100644
--- a/compiler-rt/cmake/Modules/AddCompilerRT.cmake
+++ b/compiler-rt/cmake/Modules/AddCompilerRT.cmake
@@ -508,7 +508,7 @@ function(add_compiler_rt_test test_suite test_name arch)
set(output_dir "${output_dir}/${CMAKE_CFG_INTDIR}")
file(MAKE_DIRECTORY "${output_dir}")
set(output_bin "${output_dir}/${test_name}")
- if(MSVC)
+ if(WIN32)
set(output_bin "${output_bin}.exe")
endif()
More information about the llvm-commits
mailing list