mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 15:11:24 +00:00
bdc3a5b99a
This tool lets us build LLVM components within the tree by setting up a $GOPATH that resembles a tree fetched in the normal way with "go get". It is intended that components such as the Go frontend will be built in-tree using this tool. Differential Revision: http://reviews.llvm.org/D5902 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220462 91177308-0d34-0410-b5e6-96231b3b80d8
10 lines
410 B
CMake
10 lines
410 B
CMake
if(LLVM_BINDINGS MATCHES "go")
|
|
set(binpath ${CMAKE_BINARY_DIR}/bin/llvm-go${CMAKE_EXECUTABLE_SUFFIX})
|
|
add_custom_command(OUTPUT ${binpath}
|
|
COMMAND ${GO_EXECUTABLE} build -o ${binpath} llvm-go.go
|
|
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/llvm-go.go
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
|
COMMENT "Building Go executable llvm-go")
|
|
add_custom_target(llvm-go ALL DEPENDS ${binpath})
|
|
endif()
|