[PATCH] [cmake/multilib] Teach llgo to respect the LLVM_LIBDIR_SUFFIX variable formultilib build and installs.

Peter Collingbourne peter at pcc.me.uk
Mon Dec 29 06:40:19 PST 2014


I think the right thing to do is to teach the `getVariantDir` function in `gllgo.go` to return an appropriate string (something like `"../lib${LLVM_LIBDIR_SUFFIX}[/sanitizer]"`). That string should eventually make its way to many of the appropriate places including the libgo build system. That and the `initCompiler` function looks like everything that needs to be taught about this.

Did you end up exposing `LLVM_LIBDIR_SUFFIX` somewhere like a `#define` in a header file? If so, we should be able to pick it up from Go (see e.g. `bindings/go/llvm/version.go` for an example of how to do that).

Let me know if you have any trouble making changes to the Go code and I'll see if I can take a look at it.


================
Comment at: CMakeLists.txt:113
@@ -112,3 +112,3 @@
     INSTALL_DIR ${CMAKE_BINARY_DIR}
-    CONFIGURE_COMMAND <SOURCE_DIR>/configure --disable-multilib --without-libatomic --prefix=<INSTALL_DIR> "CC=env REAL_CC=${CMAKE_BINARY_DIR}/bin/clang at SPACE@${cflags} ${CMAKE_BINARY_DIR}/bin/cc-wrapper" "GOC=${CMAKE_BINARY_DIR}/bin/llgo -no-prefix -fcompilerrt-prefix=${CMAKE_BINARY_DIR} ${gocflags}"
+    CONFIGURE_COMMAND <SOURCE_DIR>/configure --disable-multilib --without-libatomic --prefix=<INSTALL_DIR> --libdir=<INSTALL_DIR>/lib${LLVM_LIBDIR_SUFFIX} "CC=env REAL_CC=${CMAKE_BINARY_DIR}/bin/clang at 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}
----------------
We shouldn't need this change after making my suggested changes.

http://reviews.llvm.org/D6795

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list