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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271692
91177308-0d34-0410-b5e6-
96231b3b80d8
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
/* Linker version detected at compile time. */
#cmakedefine HOST_LINK_VERSION "${HOST_LINK_VERSION}"
+/* pass --build-id to ld */
+#cmakedefine ENABLE_LINKER_BUILD_ID
+
#endif
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");