Skip to content

Commit

Permalink
[compiler-rt] [test] Add an .exe suffix for unit test executables on …
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
mstorsjo committed Apr 25, 2023
1 parent 4021215 commit 86339ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler-rt/cmake/Modules/AddCompilerRT.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit 86339ef

Please sign in to comment.