Re: r271692 - Don't pass --build-id to ld by default.
lgtm On Sun, Jun 5, 2016 at 3:31 PM, Rafael EspĂndolawrote: > Patch attached. What do you think? > > Cheers, > Rafael > > > On 3 June 2016 at 16:11, Ed Maste wrote: > > On 3 June 2016 at 15:53, Nico Weber via cfe-commits > > wrote: > >> 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.) > > > > Good point. The Debian, SUSE, Redhat and Ubuntu package maintainers > > will also have to update their package build recipes and we want to > > make sure they don't miss the change. > ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Re: r271692 - Don't pass --build-id to ld by default.
Patch attached. What do you think? Cheers, Rafael On 3 June 2016 at 16:11, Ed Mastewrote: > On 3 June 2016 at 15:53, Nico Weber via cfe-commits > wrote: >> 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.) > > Good point. The Debian, SUSE, Redhat and Ubuntu package maintainers > will also have to update their package build recipes and we want to > make sure they don't miss the change. From e803bb8f8f9bf5d4cea513e489fabce5e96a5658 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20=C3=81vila=20de=20Esp=C3=ADndola?= Date: Sun, 5 Jun 2016 15:30:13 -0400 Subject: [PATCH] Add a release not about --build-id. --- docs/ReleaseNotes.rst | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/ReleaseNotes.rst b/docs/ReleaseNotes.rst index bcf67ec..376b4c7 100644 --- a/docs/ReleaseNotes.rst +++ b/docs/ReleaseNotes.rst @@ -47,7 +47,10 @@ sections with improvements to Clang's support for those languages. Major New Features -- -- Feature1... +- Clang will no longer passes --build-id by default to the linker. In modern + linkers that is a relatively expensive option. It can be passed explicitly + with -Wl,--build-id. To have clang always pass it, build it with + -DENABLE_LINKER_BUILD_ID. Improvements to Clang's diagnostics ^^^ -- 2.5.5 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Re: r271692 - Don't pass --build-id to ld by default.
On 3 June 2016 at 15:53, Nico Weber via cfe-commitswrote: > 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.) Good point. The Debian, SUSE, Redhat and Ubuntu package maintainers will also have to update their package build recipes and we want to make sure they don't miss the change. ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Re: r271692 - Don't pass --build-id to ld by default.
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@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=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=271691=271692=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 to all compiler invocations for --sysroot=." ) > > +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=271691=271692=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=271691=271692=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 , 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@lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits > ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
r271692 - Don't pass --build-id to ld by default.
Author: rafael Date: Fri Jun 3 12:26:16 2016 New Revision: 271692 URL: http://llvm.org/viewvc/llvm-project?rev=271692=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=271691=271692=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 to all compiler invocations for --sysroot=." ) +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=271691=271692=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=271691=271692=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 , 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@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits