forked from OSchip/llvm-project
Don't pass --build-id to ld by default.
We now have a cmake option to change the default: ENABLE_LINKER_BUILD_ID. The reason is that build-id is fairly expensive, so we shouldn't impose it in the regular edit/build cycle. This is similar to gcc, that has an off by default --enable-linker-build-id option. llvm-svn: 271692
This commit is contained in:
parent
45afd7e8fc
commit
5ed89d4a01
|
@ -197,6 +197,8 @@ set(GCC_INSTALL_PREFIX "" CACHE PATH "Directory where gcc is installed." )
|
|||
set(DEFAULT_SYSROOT "" CACHE PATH
|
||||
"Default <path> to all compiler invocations for --sysroot=<path>." )
|
||||
|
||||
set(ENABLE_LINKER_BUILD_ID OFF CACHE BOOL "pass --build-id to ld")
|
||||
|
||||
set(CLANG_DEFAULT_CXX_STDLIB "" CACHE STRING
|
||||
"Default C++ stdlib to use (empty for architecture default, \"libstdc++\" or \"libc++\"")
|
||||
if (NOT(CLANG_DEFAULT_CXX_STDLIB STREQUAL "" OR
|
||||
|
|
|
@ -38,4 +38,7 @@
|
|||
/* Linker version detected at compile time. */
|
||||
#cmakedefine HOST_LINK_VERSION "${HOST_LINK_VERSION}"
|
||||
|
||||
/* pass --build-id to ld */
|
||||
#cmakedefine ENABLE_LINKER_BUILD_ID
|
||||
|
||||
#endif
|
||||
|
|
|
@ -3978,10 +3978,9 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
|
|||
if (IsRedhat(Distro) && Distro != RHEL5 && Distro != RHEL6)
|
||||
ExtraOpts.push_back("--no-add-needed");
|
||||
|
||||
if ((IsDebian(Distro) && Distro >= DebianSqueeze) || IsOpenSUSE(Distro) ||
|
||||
(IsRedhat(Distro) && Distro != RHEL5) ||
|
||||
(IsUbuntu(Distro) && Distro >= UbuntuKarmic))
|
||||
ExtraOpts.push_back("--build-id");
|
||||
#ifdef ENABLE_LINKER_BUILD_ID
|
||||
ExtraOpts.push_back("--build-id");
|
||||
#endif
|
||||
|
||||
if (IsOpenSUSE(Distro))
|
||||
ExtraOpts.push_back("--enable-new-dtags");
|
||||
|
|
Loading…
Reference in New Issue