gollvm: compile libgo and gotools directly with llvm-goc
Switch from using gccgo wrapper to direct llvm-goc invocation
in the libgo and gotools builds.
Change-Id: I97ebeaa288c804f7204d32b6c77aab72a1437573
Reviewed-on: https://go-review.googlesource.com/112356
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
diff --git a/gotools/CMakeLists.txt b/gotools/CMakeLists.txt
index 9f39547..ad655dc 100644
--- a/gotools/CMakeLists.txt
+++ b/gotools/CMakeLists.txt
@@ -11,15 +11,10 @@
message(STATUS "starting gotools configuration.")
-# FIXME: rewrite this to locate llvm-goc in a more official way
-# set(driver "${bin}/../bin/llvm-goc")
+# Driver for compiling *.go files.
get_target_property(driverdir llvm-goc RUNTIME_OUTPUT_DIRECTORY)
set(gollvm_driver "${driverdir}/llvm-goc")
-#set(gocompiler ${gollvm_driver})
-
-# FIXME: still need to use wrapper for compilation, since
-# llvm-goc functionality not yet complete.
-set(gocompiler "gccgo")
+set(gocompiler ${gollvm_driver})
set(cmd_srcroot "${GOLLVM_SOURCE_DIR}/gofrontend/libgo/go/cmd")
set(libgo_srcroot "${GOLLVM_SOURCE_DIR}/gofrontend/libgo")
diff --git a/libgo/CMakeLists.txt b/libgo/CMakeLists.txt
index 6226f50..83ee5df 100644
--- a/libgo/CMakeLists.txt
+++ b/libgo/CMakeLists.txt
@@ -74,15 +74,10 @@
#......................................................................
-# FIXME: rewrite this to locate llvm-goc in a more official way
-# set(driver "${bin}/../bin/llvm-goc")
+# Driver for compiling *.go files.
get_target_property(driverdir llvm-goc RUNTIME_OUTPUT_DIRECTORY)
set(gollvm_driver "${driverdir}/llvm-goc")
-#set(gocompiler ${gollvm_driver})
-
-# FIXME: still need to use wrapper for compilation, since
-# llvm-goc functionality not yet complete.
-set(gocompiler "gccgo")
+set(gocompiler ${gollvm_driver})
# Read in list of all libgo packages
file(STRINGS "${libgo_srcroot}/libgo-packages.txt" libpackages)