[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
Mon Aug 16 02:15:22 PDT 2021
dfukalov updated this revision to Diff 366571.
dfukalov added a comment.
Using introduced LLVM_HOST_EXECUTABLE_SUFFIX variable to add the extension for native binary.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107898/new/
https://reviews.llvm.org/D107898
Files:
llvm/cmake/config-ix.cmake
llvm/cmake/modules/CrossCompile.cmake
Index: llvm/cmake/modules/CrossCompile.cmake
===================================================================
--- llvm/cmake/modules/CrossCompile.cmake
+++ llvm/cmake/modules/CrossCompile.cmake
@@ -103,6 +103,7 @@
else()
set(output_path "${${PROJECT_NAME}_NATIVE_BUILD}/bin/${target}")
endif()
+ set(output_path ${output_path}${LLVM_HOST_EXECUTABLE_SUFFIX})
llvm_ExternalProject_BuildCmd(build_cmd ${target} ${${PROJECT_NAME}_NATIVE_BUILD}
CONFIGURATION Release)
Index: llvm/cmake/config-ix.cmake
===================================================================
--- llvm/cmake/config-ix.cmake
+++ llvm/cmake/config-ix.cmake
@@ -689,3 +689,21 @@
else()
set (LLVM_HAVE_OPT_VIEWER_MODULES 0)
endif()
+
+function(llvm_get_host_prefixes_and_suffixes)
+ message("CMAKE_HOST_SYSTEM_NAME: ${CMAKE_HOST_SYSTEM_NAME}")
+ include(Platform/${CMAKE_HOST_SYSTEM_NAME} OPTIONAL RESULT_VARIABLE _includedFile)
+ message("_includedFile: ${_includedFile}")
+ if (_includedFile)
+ set(LLVM_HOST_STATIC_LIBRARY_PREFIX ${CMAKE_STATIC_LIBRARY_PREFIX} PARENT_SCOPE)
+ set(LLVM_HOST_STATIC_LIBRARY_SUFFIX ${CMAKE_STATIC_LIBRARY_SUFFIX} PARENT_SCOPE)
+ set(LLVM_HOST_SHARED_LIBRARY_PREFIX ${CMAKE_SHARED_LIBRARY_PREFIX} PARENT_SCOPE)
+ set(LLVM_HOST_SHARED_LIBRARY_SUFFIX ${CMAKE_SHARED_LIBRARY_SUFFIX} PARENT_SCOPE)
+ set(LLVM_HOST_IMPORT_LIBRARY_PREFIX ${CMAKE_IMPORT_LIBRARY_PREFIX} PARENT_SCOPE)
+ set(LLVM_HOST_IMPORT_LIBRARY_SUFFIX ${CMAKE_IMPORT_LIBRARY_SUFFIX} PARENT_SCOPE)
+ set(LLVM_HOST_EXECUTABLE_SUFFIX ${CMAKE_EXECUTABLE_SUFFIX} PARENT_SCOPE)
+ set(LLVM_HOST_LINK_LIBRARY_SUFFIX ${CMAKE_LINK_LIBRARY_SUFFIX} PARENT_SCOPE)
+ endif()
+endfunction()
+
+llvm_get_host_prefixes_and_suffixes()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D107898.366571.patch
Type: text/x-patch
Size: 1768 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210816/492368ae/attachment.bin>
More information about the llvm-commits
mailing list