[PATCH] D107898: [CMake] Fix recompile all .inc files with LLVM_OPTIMIZED_TABLEGEN in Visual Studio.

Daniil Fukalov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 11 05:54:27 PDT 2021


dfukalov created this revision.
dfukalov added reviewers: beanz, smeenai, Flakebi.
Herald added a subscriber: mgorny.
dfukalov requested review of this revision.
Herald added a project: LLVM.

After some moment VS solution generated with LLVM_OPTIMIZED_TABLEGEN started to
generate all .inc files for each build. The reason was it had
"<path to native tablegen>/llvm-tblgen" without .exe as a dependency.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D107898

Files:
  llvm/cmake/modules/CrossCompile.cmake


Index: llvm/cmake/modules/CrossCompile.cmake
===================================================================
--- llvm/cmake/modules/CrossCompile.cmake
+++ llvm/cmake/modules/CrossCompile.cmake
@@ -104,6 +104,10 @@
     set(output_path "${${PROJECT_NAME}_NATIVE_BUILD}/bin/${target}")
   endif()
 
+  if (CMAKE_GENERATOR MATCHES "Visual Studio")
+    set(output_path ${output_path}.exe)
+  endif()
+
   llvm_ExternalProject_BuildCmd(build_cmd ${target} ${${PROJECT_NAME}_NATIVE_BUILD}
                                 CONFIGURATION Release)
   add_custom_command(OUTPUT "${output_path}"


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D107898.365730.patch
Type: text/x-patch
Size: 590 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210811/3eebe9ad/attachment.bin>


More information about the llvm-commits mailing list