summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorAndrew Wilkins <axwalk@gmail.com>2016-07-27 03:21:51 +0000
committerAndrew Wilkins <axwalk@gmail.com>2016-07-27 03:21:51 +0000
commit064517fef6b855f9324a3aa0ae3937c52696f283 (patch)
tree6f10309cfa147435f6cdbfa1c226e48c3a0ce9b5 /cmake
parent00429d5fa925f838b2cbd7643a0094a9654d7338 (diff)
[llvm-go] parameterize $GOPATH construction
Summary: To build llgo, you must currently ensure that llgo is in the tools/llgo directory, due to a hard-coded path in llvm-go. To support the use of LLVM_EXTERNAL_LLGO_SOURCE_DIR, we introduce a flag to llvm-go that enables the caller to specify the paths to symlink in the temporary $GOPATH. Reviewers: pcc Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D21634 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276829 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake')
-rw-r--r--cmake/modules/AddLLVM.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake
index 9cd46ebc730..9590a1bee92 100644
--- a/cmake/modules/AddLLVM.cmake
+++ b/cmake/modules/AddLLVM.cmake
@@ -997,7 +997,7 @@ function(llvm_add_go_executable binary pkgpath)
endforeach(d)
set(ldflags "${CMAKE_EXE_LINKER_FLAGS}")
add_custom_command(OUTPUT ${binpath}
- COMMAND ${CMAKE_BINARY_DIR}/bin/llvm-go "go=${GO_EXECUTABLE}" "cc=${cc}" "cxx=${cxx}" "cppflags=${cppflags}" "ldflags=${ldflags}"
+ COMMAND ${CMAKE_BINARY_DIR}/bin/llvm-go "go=${GO_EXECUTABLE}" "cc=${cc}" "cxx=${cxx}" "cppflags=${cppflags}" "ldflags=${ldflags}" "packages=${LLVM_GO_PACKAGES}"
${ARG_GOFLAGS} build -o ${binpath} ${pkgpath}
DEPENDS llvm-config ${CMAKE_BINARY_DIR}/bin/llvm-go${CMAKE_EXECUTABLE_SUFFIX}
${llvmlibs} ${ARG_DEPENDS}