Bug 1488307 - Build the LLVM gold plugin. r=mshal
authorMike Hommey <mh+mozilla@glandium.org>
Thu, 30 Aug 2018 10:55:49 +0900
changeset 434751 e2a02b08089b0bd0c18ceac0b2eb1e3888d56dc2
parent 434750 417f206531b6659dcedb5be8a43f8f8b7813673f
child 434752 9dc064f701b6df79d4fd3ca7ab8f7cecc5870aaa
push id34577
push userebalazs@mozilla.com
push dateWed, 05 Sep 2018 09:45:59 +0000
treeherdermozilla-central@019d95c8106d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmshal
bugs1488307
milestone64.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1488307 - Build the LLVM gold plugin. r=mshal As much as it's tempting to use LLD for LTO, it still causes some subtle problems with the build, and it's still better to keep using BFD ld for the time being. Doing so requires the gold plugin, which only requires to pass cmake the directory where the binutils headers are, and they are part of the gcc toolchain headers. Differential Revision: https://phabricator.services.mozilla.com/D4896
build/build-clang/build-clang.py
--- a/build/build-clang/build-clang.py
+++ b/build/build-clang/build-clang.py
@@ -212,16 +212,18 @@ def build_one_stage(cc, cxx, asm, ld, ar
             "-DCMAKE_BUILD_TYPE=%s" % build_type,
             "-DCMAKE_INSTALL_PREFIX=%s" % inst_dir,
             "-DLLVM_TARGETS_TO_BUILD=X86;ARM;AArch64",
             "-DLLVM_ENABLE_ASSERTIONS=%s" % ("ON" if assertions else "OFF"),
             "-DPYTHON_EXECUTABLE=%s" % slashify_path(python_path),
             "-DLLVM_TOOL_LIBCXX_BUILD=%s" % ("ON" if build_libcxx else "OFF"),
             "-DLIBCXX_LIBCPPABI_VERSION=\"\"",
         ]
+        if is_linux():
+            cmake_args += ["-DLLVM_BINUTILS_INCDIR=%s/include" % gcc_dir]
         if is_windows():
             cmake_args.insert(-1, "-DLLVM_EXPORT_SYMBOLS_FOR_PLUGINS=ON")
             cmake_args.insert(-1, "-DLLVM_USE_CRT_RELEASE=MT")
         if ranlib is not None:
             cmake_args += ["-DCMAKE_RANLIB=%s" % slashify_path(ranlib)]
         if libtool is not None:
             cmake_args += ["-DCMAKE_LIBTOOL=%s" % slashify_path(libtool)]
         if osx_cross_compile: