[PATCH] D149029: [compiler-rt] [test] Add an .exe suffix for unit test executables on MinGW

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 23 13:25:19 PDT 2023


mstorsjo created this revision.
mstorsjo added reviewers: alvinhochun, vitalybuka.
Herald added subscribers: Enna1, dberris.
Herald added a project: All.
mstorsjo requested review of this revision.
Herald added a project: Sanitizers.
Herald added a subscriber: Sanitizers.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D149029

Files:
  compiler-rt/cmake/Modules/AddCompilerRT.cmake


Index: compiler-rt/cmake/Modules/AddCompilerRT.cmake
===================================================================
--- compiler-rt/cmake/Modules/AddCompilerRT.cmake
+++ compiler-rt/cmake/Modules/AddCompilerRT.cmake
@@ -508,7 +508,7 @@
   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()
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149029.516202.patch
Type: text/x-patch
Size: 463 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230423/111fe377/attachment.bin>


More information about the llvm-commits mailing list