Skip to content

Commit

Permalink
Merge pull request #67 from arlosi/llvmnm
Browse files Browse the repository at this point in the history
Add option LLVM_NM to allow specifying the location of the llvm-nm tool
  • Loading branch information
nikic authored Jul 7, 2020
2 parents 6c040dd + e10146d commit d134a53
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions llvm/tools/llvm-shlib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -154,13 +154,17 @@ if(MSVC)
set(GEN_SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/gen-msvc-exports.py)

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}")
if(NOT LLVM_NM)
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()
else()
set(llvm_nm $<TARGET_FILE:llvm-nm>)
set(llvm_nm_target llvm-nm)
set(llvm_nm ${LLVM_NM})
set(llvm_nm_target "")
endif()

add_custom_command(OUTPUT ${LLVM_EXPORTED_SYMBOL_FILE}
Expand Down

0 comments on commit d134a53

Please sign in to comment.