r271692 - Don't pass --build-id to ld by default.

Nico Weber via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 3 12:53:32 PDT 2016


Can you add this to the release notes? It'll for example break chromium's
crash server (we can fix this on our end by explicitly passing
-Wl,--build-id for release builds, but we only saw this commit fly by by
chance.)

On Fri, Jun 3, 2016 at 1:26 PM, Rafael Espindola via cfe-commits <
cfe-commits at lists.llvm.org> wrote:

> Author: rafael
> Date: Fri Jun  3 12:26:16 2016
> New Revision: 271692
>
> URL: http://llvm.org/viewvc/llvm-project?rev=271692&view=rev
> Log:
> 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.
>
> Modified:
>     cfe/trunk/CMakeLists.txt
>     cfe/trunk/include/clang/Config/config.h.cmake
>     cfe/trunk/lib/Driver/ToolChains.cpp
>
> Modified: cfe/trunk/CMakeLists.txt
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/CMakeLists.txt?rev=271692&r1=271691&r2=271692&view=diff
>
> ==============================================================================
> --- cfe/trunk/CMakeLists.txt (original)
> +++ cfe/trunk/CMakeLists.txt Fri Jun  3 12:26:16 2016
> @@ -197,6 +197,8 @@ set(GCC_INSTALL_PREFIX "" CACHE PATH "Di
>  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
>
> Modified: cfe/trunk/include/clang/Config/config.h.cmake
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Config/config.h.cmake?rev=271692&r1=271691&r2=271692&view=diff
>
> ==============================================================================
> --- cfe/trunk/include/clang/Config/config.h.cmake (original)
> +++ cfe/trunk/include/clang/Config/config.h.cmake Fri Jun  3 12:26:16 2016
> @@ -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
>
> Modified: cfe/trunk/lib/Driver/ToolChains.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.cpp?rev=271692&r1=271691&r2=271692&view=diff
>
> ==============================================================================
> --- cfe/trunk/lib/Driver/ToolChains.cpp (original)
> +++ cfe/trunk/lib/Driver/ToolChains.cpp Fri Jun  3 12:26:16 2016
> @@ -3978,10 +3978,9 @@ Linux::Linux(const Driver &D, const llvm
>    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");
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160603/89e51c0b/attachment.html>


More information about the cfe-commits mailing list