[PATCH] D60025: [llvm-shlib] Fix cross-compilation for LLVM-C
Shoaib Meenai via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 1 11:32:24 PDT 2019
smeenai updated this revision to Diff 193139.
smeenai added a comment.
Rebase
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60025/new/
https://reviews.llvm.org/D60025
Files:
llvm/tools/llvm-shlib/CMakeLists.txt
Index: llvm/tools/llvm-shlib/CMakeLists.txt
===================================================================
--- llvm/tools/llvm-shlib/CMakeLists.txt
+++ llvm/tools/llvm-shlib/CMakeLists.txt
@@ -164,9 +164,17 @@
set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/libllvm-c.exports)
+ if(CMAKE_CROSSCOMPILING)
+ build_native_tool(llvm-nm llvm_nm)
+ set(llvm_nm_target "${llvm_nm}")
+ else()
+ set(llvm_nm $<TARGET_FILE:llvm-nm>)
+ set(llvm_nm_target llvm-nm)
+ endif()
+
add_custom_command(OUTPUT ${LLVM_EXPORTED_SYMBOL_FILE}
- COMMAND ${PYTHON_EXECUTABLE} ${GEN_SCRIPT} --libsfile ${LIBSFILE} ${GEN_UNDERSCORE} --nm ${LLVM_TOOLS_BINARY_DIR}/llvm-nm -o ${LLVM_EXPORTED_SYMBOL_FILE}
- DEPENDS ${LIB_NAMES} llvm-nm
+ COMMAND ${PYTHON_EXECUTABLE} ${GEN_SCRIPT} --libsfile ${LIBSFILE} ${GEN_UNDERSCORE} --nm "${llvm_nm}" -o ${LLVM_EXPORTED_SYMBOL_FILE}
+ DEPENDS ${LIB_NAMES} ${llvm_nm_target}
COMMENT "Generating export list for LLVM-C"
VERBATIM )
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60025.193139.patch
Type: text/x-patch
Size: 1015 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190401/707ec76d/attachment.bin>
More information about the llvm-commits
mailing list