NVPTX: link against TransformUtils

Tamir Duberstein tamird at gmail.com
Tue May 12 11:31:45 PDT 2015


Hi, I discovered LLVM doesn't compile with `-DBUILD_SHARED_LIBS=On`.
The solution was to link NVPTX against TransformUtils. Please see the
change below.

Thanks!

    NVPTX: link against TransformUtils

    This fixes a linking failure when building with shared libraries:
    `lib/Target/NVPTX/NVPTXGenericToNVVM.cpp` `#include`s
    `llvm/Transforms/Utils/ValueMapper.h`, but does not link against it.

    See https://github.com/Homebrew/homebrew/pull/39683

diff --git a/lib/Target/NVPTX/CMakeLists.txt b/lib/Target/NVPTX/CMakeLists.txt
index cdd2f1f..46d8043 100644
--- a/lib/Target/NVPTX/CMakeLists.txt
+++ b/lib/Target/NVPTX/CMakeLists.txt
@@ -1,5 +1,5 @@
 set(LLVM_TARGET_DEFINITIONS NVPTX.td)
-
+set(LLVM_LINK_COMPONENTS TransformUtils)

 tablegen(LLVM NVPTXGenRegisterInfo.inc -gen-register-info)
 tablegen(LLVM NVPTXGenInstrInfo.inc -gen-instr-info)



More information about the llvm-commits mailing list