[llvm-shlib] Fix cross-compilation for LLVM-C
authorShoaib Meenai <smeenai@fb.com>
Tue, 2 Apr 2019 15:58:05 +0000 (15:58 +0000)
committerShoaib Meenai <smeenai@fb.com>
Tue, 2 Apr 2019 15:58:05 +0000 (15:58 +0000)
commit7c16c5b6aec53ae59c5c611af55d089a84ed3f10
treeeaf72fc1081c02ea4ef2efdcb5d368f09270975b
parentf92acf1299500b3b161a2bdf94639244a8fc4cae
[llvm-shlib] Fix cross-compilation for LLVM-C

When we're cross-compiling, build and use a native llvm-nm instead of
attempting to use the one from the target's build tree.

A nice follow-up would be to add a cache variable to allow specifying a
path to an external native llvm-nm instead of building one ourselves,
similar to LLVM_TABLEGEN and LLVM_CONFIG_PATH.

Differential Revision: https://reviews.llvm.org/D60025

llvm-svn: 357487
llvm/tools/llvm-shlib/CMakeLists.txt