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
This commit is contained in:
Mike Hommey
2018-08-30 10:55:49 +09:00
parent 70fc33a9b0
commit b577f7e4fc

View File

@@ -217,6 +217,8 @@ def build_one_stage(cc, cxx, asm, ld, ar, ranlib, libtool,
"-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")