From 28d88c7d816515f08df13cb038e48e317deb2669 Mon Sep 17 00:00:00 2001 From: Andrew Wilkins Date: Tue, 21 Jul 2015 00:46:23 +0000 Subject: [PATCH 1/6] [cmake] pass GO_EXECUTABLE to llgo-go Summary: When calling llgo-go from the llvm_add_go_executable cmake function, specify $GO_EXECUTABLE as the go command to call. Without this, llgo-go searches $PATH which may be inconsistent with $GO_EXECUTABLE. Reviewers: pcc Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D11290 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242749 91177308-0d34-0410-b5e6-96231b3b80d8 --- cmake/modules/AddLLVM.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake index 45f6746..583415b 100644 --- a/cmake/modules/AddLLVM.cmake +++ b/cmake/modules/AddLLVM.cmake @@ -786,7 +786,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 "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}" ${ARG_GOFLAGS} build -o ${binpath} ${pkgpath} DEPENDS llvm-config ${CMAKE_BINARY_DIR}/bin/llvm-go${CMAKE_EXECUTABLE_SUFFIX} ${llvmlibs} ${ARG_DEPENDS} -- 2.5.3