Index: CMakeLists.txt =================================================================== --- CMakeLists.txt +++ CMakeLists.txt @@ -110,7 +110,7 @@ SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/gofrontend/libgo BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${suffix}/libgo INSTALL_DIR ${CMAKE_BINARY_DIR} - CONFIGURE_COMMAND /configure --disable-multilib --without-libatomic --prefix= "CC=env REAL_CC=${CMAKE_BINARY_DIR}/bin/clang@SPACE@${cflags} ${CMAKE_BINARY_DIR}/bin/cc-wrapper" "GOC=${CMAKE_BINARY_DIR}/bin/llgo -no-prefix -fcompilerrt-prefix=${CMAKE_BINARY_DIR} ${gocflags}" + CONFIGURE_COMMAND /configure --disable-multilib --without-libatomic --prefix= --libdir=/lib${LLVM_LIBDIR_SUFFIX} "CC=env REAL_CC=${CMAKE_BINARY_DIR}/bin/clang@SPACE@${cflags} ${CMAKE_BINARY_DIR}/bin/cc-wrapper" "GOC=${CMAKE_BINARY_DIR}/bin/llgo -no-prefix -fcompilerrt-prefix=${CMAKE_BINARY_DIR} ${gocflags}" BUILD_COMMAND make -j${PROCESSOR_COUNT} LOG_CONFIGURE 1 LOG_BUILD 1 @@ -142,15 +142,17 @@ add_libgo_variant("_dfsan" "-fsanitize=dataflow" "-fsanitize=dataflow" dfsan TRUE) endif() -install(FILES ${CMAKE_BINARY_DIR}/lib/libgo-llgo.a - ${CMAKE_BINARY_DIR}/lib/libgo-llgo.so - ${CMAKE_BINARY_DIR}/lib/libgo-llgo.so.6 - ${CMAKE_BINARY_DIR}/lib/libgo-llgo.so.6.0.0 - ${CMAKE_BINARY_DIR}/lib/libgobegin-llgo.a - DESTINATION lib) +set(LLGO_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}) -install(DIRECTORY ${CMAKE_BINARY_DIR}/lib/go - DESTINATION lib) +install(FILES ${LLGO_LIBRARY_DIR}/libgo-llgo.a + ${LLGO_LIBRARY_DIR}/libgo-llgo.so + ${LLGO_LIBRARY_DIR}/libgo-llgo.so.6 + ${LLGO_LIBRARY_DIR}/libgo-llgo.so.6.0.0 + ${LLGO_LIBRARY_DIR}/libgobegin-llgo.a + DESTINATION lib${LLVM_LIBDIR_SUFFIX}) + +install(DIRECTORY ${LLGO_LIBRARY_DIR}/go + DESTINATION lib${LLVM_LIBDIR_SUFFIX}) add_custom_target(check-libgo COMMAND make -C ${CMAKE_CURRENT_BINARY_DIR}/libgo -j${PROCESSOR_COUNT} check