Commit c3cb7d84 authored by thakis's avatar thakis Committed by Commit bot

Reland of build: Prepare for building clang without ENABLE_LINKER_BUILD_ID=ON...

Reland of build: Prepare for building clang without ENABLE_LINKER_BUILD_ID=ON (patchset #1 id:1 of https://codereview.chromium.org/2732023004/ )

Reason for revert:
With https://bugs.chromium.org/p/nativeclient/issues/detail?id=4391#c1 fixed, this might now work.

Original issue's description:
> Revert of build: Prepare for building clang without ENABLE_LINKER_BUILD_ID=ON (patchset #2 id:20001 of https://codereview.chromium.org/2732293002/ )
>
> Reason for revert:
> https://build.chromium.org/p/chromium.chrome/builders/Google%20Chrome%20ChromeOS/builds/30394/steps/compile/logs/stdio
>
> pnacl-ld: Unrecognized option: --build-id=sha1
>
> gn args:
> goma_dir = "/b/c/goma_client"
> is_chrome_branded = true
> is_debug = false
> is_official_build = true
> target_os = "chromeos"
> use_goma = true
>
> Original issue's description:
> > build: Prepare for building clang without ENABLE_LINKER_BUILD_ID=ON
> >
> > BUG=622775
> >
> > Review-Url: https://codereview.chromium.org/2732293002
> > Cr-Commit-Position: refs/heads/master@{#455154}
> > Committed: https://chromium.googlesource.com/chromium/src/+/4e5c4a1545902ab817b8d758c8b3ec4380552b5d
>
> TBR=hans@chromium.org,torne@chromium.org,mcgrathr@chromium.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=622775
>
> Review-Url: https://codereview.chromium.org/2732023004
> Cr-Commit-Position: refs/heads/master@{#455172}
> Committed: https://chromium.googlesource.com/chromium/src/+/e806d46df51009e8c254727b374873bc4379b1fb

TBR=hans@chromium.org,torne@chromium.org,mcgrathr@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=622775

Review-Url: https://codereview.chromium.org/2756713002
Cr-Commit-Position: refs/heads/master@{#457493}
parent d56e56c7
...@@ -39,7 +39,6 @@ config("compiler") { ...@@ -39,7 +39,6 @@ config("compiler") {
} }
ldflags = [ ldflags = [
"-Wl,--build-id=sha1",
"-Wl,--no-undefined", "-Wl,--no-undefined",
# Don't allow visible symbols from libgcc or libc++ to be # Don't allow visible symbols from libgcc or libc++ to be
......
...@@ -277,6 +277,16 @@ config("compiler") { ...@@ -277,6 +277,16 @@ config("compiler") {
} }
} }
if (is_official_build) {
# Explicitly pass --build-id to ld. Compilers used to always pass this
# implicitly but don't any more (in particular clang when built without
# ENABLE_LINKER_BUILD_ID=ON). The crash infrastructure does need a build
# id, so explicitly enable it in official builds. It's not needed in
# unofficial builds and computing it does slow down the link, so go with
# faster links in unofficial builds.
ldflags += [ "-Wl,--build-id=sha1" ]
}
defines += [ "_FILE_OFFSET_BITS=64" ] defines += [ "_FILE_OFFSET_BITS=64" ]
if (!is_android) { if (!is_android) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment