Граф коммитов

403 Коммитов

Автор SHA1 Сообщение Дата
khasim.mohammed 842fb0e8f5 Revert arm_fpu flags for arm64
Tried to set arm_fpu to "cortex-a57+simd+crypto+fp+crc" for clang

These lines also affect GCC which is used to ship official chrome,
All ARMv8 implementations would support SIMD and FP by default, but
crypto is optional, so the code generated might fail on devices which
do not support crypto also adding cortex-a57 and using on cortex-a53
or vice versa might generate code that is going to be slower.

So we decided to revert this patch.

BUG : http://crbug.com/539781

BUG=539781
R=thakis@chromium.org
TEST=download apk to ARMv8 board and launch

Review-Url: https://codereview.chromium.org/1987733002
Cr-Original-Commit-Position: refs/heads/master@{#394334}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 5d3069f38c1bbacbfc9d1ef672ea8c8dc9d12b3f
2016-05-18 04:21:31 +00:00
tsniatowski 50b325baf7 Use clang "--target=x" rather than "-target x" for icecc
Icecc is confused by the two-argument -target form and ends up compiling
everything locally. It works with the equivalent single argument form, so prefer
this in GN compiler configs.

Previously done just for android in https://codereview.chromium.org/1871813003

Review-Url: https://codereview.chromium.org/1977733003
Cr-Original-Commit-Position: refs/heads/master@{#394065}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: f167315cf808e4047916cbd07b3d12b5f5a6fdf1
2016-05-17 05:56:52 +00:00
dpranke d4fdf55ba8 Make x86 linux use gold by default again after android revert.
The revert of the Android gold change in r393738 also partially
reverted the change to using gold on x86 linux in r393645.

This CL re-lands the x86 linux part.

TBR=mlliu@chromium.org
BUG=590004, 611618,606749
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_chromium_compile_dbg_32_ng,linux_chromium_dbg_32_ng

Review-Url: https://codereview.chromium.org/1985503002
Cr-Original-Commit-Position: refs/heads/master@{#393759}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 665f2abb04029e72a8852a2ecb0959031272ff25
2016-05-15 01:26:55 +00:00
mlliu c48c58d18e Revert of 👻 Merge android's use_gold settings with the main use_gold GN arg logic (patchset #2 id:20001 of https://codereview.chromium.org/1972183003/ )
Reason for revert:
causing crash on x86 after the user signs in

https://bugs.chromium.org/p/chromium/issues/detail?id=611668

Original issue's description:
> Merge android's use_gold settings with the main use_gold GN arg logic
>
> This also fixes Android settin -Wl,--icf=all in a different spot.
>
> BUG=606749
>
> Committed: https://crrev.com/0f484bfda36d849c474922639f94eaf12d785d04
> Cr-Commit-Position: refs/heads/master@{#393355}

TBR=dpranke@chromium.org,agrieve@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=606749

Review-Url: https://codereview.chromium.org/1979043002
Cr-Original-Commit-Position: refs/heads/master@{#393738}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e0f86c9c79b888051c81609f496fe7b598dc4e51
2016-05-14 20:27:23 +00:00
dpranke 6b7dd5e4be Use gold and the bundled binutils on x86 by default
The only reason we were not using gold by default on x86
is that using icf was buggy. However, we think we've updated
to a working version of gold, and so we should now use it.

R=mcgrathr@chromium.org, thakis@chromium.org
BUG=590004
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_chromium_compile_dbg_32_ng,linux_chromium_dbg_32_ng

Review-Url: https://codereview.chromium.org/1951133002
Cr-Original-Commit-Position: refs/heads/master@{#393645}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 11668d5556912ae81fa645cea8a5b7bb381407c7
2016-05-13 21:27:47 +00:00
dpranke 93814d6827 use icf=safe w/ gcc+gold+x86/x64, icf=all w/ gold elsewhere.
This is another attempt to fix which flags we use by default when
linking w/ gold. The interaction of gold + gcc on intel platforms
appears buggy, so we only use icf=safe there; gold + gcc on non-intel
platforms, and gold + clang on intel can use icf=all, as long
as we have the latest binutils.

This change is GN-only, since linux GYP builds are on their last
breaths and it's not worth worrying about x86 flags there.

R=mcgrathr@chromium.org, thakis@chromium.org
BUG=576197

Review-Url: https://codereview.chromium.org/1952353004
Cr-Original-Commit-Position: refs/heads/master@{#393563}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: a403dd9d7c3b7d3619da3ef989f4666e1e11cf95
2016-05-13 17:22:04 +00:00
khasim.mohammed a989c81e52 Build 64bit browser for Android with clang for ARMv8
This series is to

a) Add my name to AUTHORS
I have few patches to submit to fix the chromium 64bit browser
build for ARMv8 with clang.

b) Fix FPCR access for 64bit clang compilation
Compilation fails as the MSR and MRS instructions access
the FPCR register in 32bit mode.

c) Fix Build.gn and config files
To build 64bit browser for Android with clang for ARMv8

BUG : http://crbug.com/539781

Signed-off-by: Bernhard Rosenkränzer <bero@linaro.org>
Signed-off-by: Khasim Syed Mohammed <khasim.mohammed@linaro.org>

BUG=539781
R=thakis@chromium.org
TEST=download apk to ARMv8 board and launch

Review-Url: https://codereview.chromium.org/1888763002
Cr-Original-Commit-Position: refs/heads/master@{#393517}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 2c5ec51ea564705b02dcb6aeff6a56722cc3890f
2016-05-13 13:49:38 +00:00
agrieve be888670a0 Merge android's use_gold settings with the main use_gold GN arg logic
This also fixes Android settin -Wl,--icf=all in a different spot.

BUG=606749

Review-Url: https://codereview.chromium.org/1972183003
Cr-Original-Commit-Position: refs/heads/master@{#393355}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 0f484bfda36d849c474922639f94eaf12d785d04
2016-05-12 21:14:14 +00:00
dskiba 39b207f5fd Don't omit frame pointers in profiling Android GN builds.
This CL makes sure that frame pointers (used for fast stack unwinding)
are not omitted when enable_profiling is true. There are two changes:

1. Don't add -fomit-frame-pointer flag (Android-specific change).

2. Add -fno-omit-frame-pointer flag even in debug builds. This is needed
   for Android where debug builds are optimized too (-Os).

BUG=602701

Review-Url: https://codereview.chromium.org/1965143003
Cr-Original-Commit-Position: refs/heads/master@{#393320}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 14430a4de781aca8e67f6ec7b8893647d7ee26d9
2016-05-12 19:02:58 +00:00
saiarcot895 b81f2a05b5 Add SSE2/MMX build flags when building on an x86 host. This is necessary
because some files use SSE2 extensions, which may not be available on
all x86 CPUs.

BUG=607938
R=dpranke@chromium.org

Review-Url: https://codereview.chromium.org/1952043003
Cr-Original-Commit-Position: refs/heads/master@{#392206}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: bfb9e9ef5c13843e22a74a7bced0d48b6f42c112
2016-05-06 23:44:47 +00:00
brettw 07e0992560 Address some TODO(GYP)s in the GN build.
Some were obsolete, some I implemented in this patch. Some I left as-is if they applied to Mac or iOS.

A few items are TODOs for when transition is complete. I changed these to "TODO(GYP_GONE)"

This patch only addresses ~25% of the build.
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel

Review-Url: https://codereview.chromium.org/1953523002
Cr-Original-Commit-Position: refs/heads/master@{#391943}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: f9427f9e3edb7be9bd540bb35b3d3156c08c3df6
2016-05-05 23:20:10 +00:00
krasin 07a3b5592d Fix LTO on Linux by not specifying a blacklist.
The new Clang toolchain rolled yesterday makes LTO devirtualization
working on visibility basis, instead of being based on a blacklist.
This CL just removes the now unsupported option.

BUG=601822

Review-Url: https://codereview.chromium.org/1947103002
Cr-Original-Commit-Position: refs/heads/master@{#391572}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 806f95f1974ea657e43b854c3ec30c2b59eca8b4
2016-05-04 18:28:38 +00:00
sebmarchand ca12175b57 Enable full WPO for the PGO builds.
BUG=309849

Review-Url: https://codereview.chromium.org/1938133002
Cr-Original-Commit-Position: refs/heads/master@{#391481}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 4910a3e72d57b89e26ee45ce3ba754b17efa62a8
2016-05-04 11:41:09 +00:00
sdefresne b1e634702a [GN] Add support for generating Xcode projects.
tools/gn/xcode_object.{cc,h}

  Implements a class hierarchy mimicking the structure of an Xcode
  pbxproj file with methods to dump them as text file.

tools/gn/xcode_writer.{cc,h}

  Implements generation of Xcode project structure from GN settings
  and for dumping the output to pbxproj and xcworkspacedata files.

tools/gn/*

  Add product_type field to create_bundle target. This is used when
  generating the Xcode project file to use the correct product type
  in Xcode.

  Fix a minor DCHECK failure in create_bundle_target_generator.cc.

build/config/compiler/BUILD.gn

  Remove -fdebug-prefix-map from the clang command-line as it does
  not work with Xcode (and is unnecessary as the path given to the
  compiler are relative already).

  With this flag, Xcode cannot find the source file when debbugging
  the application, without it breakpoint and displaying code work.

BUG=597975

Review-Url: https://codereview.chromium.org/1827103005
Cr-Original-Commit-Position: refs/heads/master@{#391377}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 6ee04b5ce48981fd997b94c58240602df1a329d6
2016-05-03 22:21:59 +00:00
pcc 8a94eac564 Do not use lld to link NaCl binaries.
The NaCl toolchain does not know how to find lld. (Besides, lld does not
have support for NaCl.)

BUG=607968
R=brettw@chromium.org

Review-Url: https://codereview.chromium.org/1943163002
Cr-Original-Commit-Position: refs/heads/master@{#391182}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: cbb9923180edc9297292e746cae996630f1cd867
2016-05-03 07:50:23 +00:00
brettw 938ae65395 Implement arflags in the GN build.
This flag was recently added in GN. This patch hooks it up to the toolchains
and moves some flags to use it that previously had to be hardcoded on the
tool command itself.

Clarifies usage of concurrent_links variable in gcc_toolchain which was confusing.

TBR=brucedawson@chromium.org
BUG=598599
Reland of http://crrev.com/1909163002 with fixes which was a reland of http://crrev.com/1896163003 with fix.

Review-Url: https://codereview.chromium.org/1924203004
Cr-Original-Commit-Position: refs/heads/master@{#390797}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 5404cdff57233dbad6e0b20afd547e445c57cd23
2016-04-29 23:12:20 +00:00
sebmarchand d174c1fefc Enable /GL for all targets in Official (behind a flag)
This is controlled by the full_wpo_on_official GYP/GN flag.

The plan is to use this flag to do an experiment on Dev.

I've done some local tests regarding the impact on the delta patches (I checked out 2 different revisions of Chrome and did 2 builds for each one, one WPO and one not), here's the numbers:

Normal 1 (non-WPO):
chrome.dll: 35274.5 KB
chrome_child.dll: 43636 KB

Normal 2 (non-WPO) :
chrome.dll: 35405 KB
chrome_child.dll: 43792 KB

WPO 1:
chrome.dll: 34944.5 KB (-330 KB)
chrome_child.dll: 44569 KB (+933 KB)

WPO 2:
chrome.dll: 35066 KB (-339 KB)
chrome_child.dll 44710.5 KB (+918.5 KB)

non-WPO 1 -> non-WPO 2:
patch: 6205.23 KB
patch.7z: 2765.42 KB

WPO 1 -> WPO 2:
patch: 6640.88 KB (+435.65 KB)
patch.7z: 2951.07 KB (+185.65 KB)

BUG=490934

Review-Url: https://codereview.chromium.org/1880113003
Cr-Original-Commit-Position: refs/heads/master@{#390779}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: ea6b4cf8e486d9e8321030cde31024e7662130d5
2016-04-29 22:07:50 +00:00
pcc cc6bca418e Make the GN build flag 'use_lld' usable on Linux.
We are testing a new linker, LLD, for use within Chromium. This CL adds the
necessary machinery to allow us to use LLD on Linux by enabling the existing
GN build flag 'use_lld'.

This CL teaches the LLVM package build script to build LLD on non-Windows
platforms (for top-of-tree builds only), moves the 'use_lld' build flag from
the Windows toolchain configuration to the generic GN compiler configuration,
and gates the required linker flags for LLD on Linux on that flag.

BUG=607968
R=thakis@chromium.org,brettw@chromium.org,krasin@chromium.org

Review-Url: https://codereview.chromium.org/1925843002
Cr-Original-Commit-Position: refs/heads/master@{#390733}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 22afe741dcbb7bca0b792349f07fcac175716692
2016-04-29 20:17:16 +00:00
danakj a3ae5fdaf8 Replace WTF::Optional the base::Optional implementation.
R=jbroman, thakis@chromium.org
BUG=604860

Committed: https://crrev.com/0a079b3fb27d30609aed6eaaaf2b72423741b5e5
Cr-Commit-Position: refs/heads/master@{#388624}

Review-Url: https://codereview.chromium.org/1897863006
Cr-Original-Commit-Position: refs/heads/master@{#390594}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: f337675ea340b9d2070e773ec4c14a8e179c78ab
2016-04-29 05:36:00 +00:00
bpastene e2c903e77f Revert of Implement arflags in the GN build. (patchset #4 id:60001 of https://codereview.chromium.org/1907403002/ )
Reason for revert:
As with the previous attempts to land this cl, android and GPU builders are failing compile with OOM errors:
https://bugs.chromium.org/p/chromium/issues/detail?id=607673

Original issue's description:
> Implement arflags in the GN build.
>
> This flag was recently added in GN. This patch hooks it up to the toolchains
> and moves some flags to use it that previously had to be hardcoded on the
> tool command itself.
>
> Remove concurrent_links variable from gcc_toolchain which was unused.
>
> BUG=598599
> Reland of http://crrev.com/1909163002 with no changes (now that a GN binary push to fix the bug has gone in) which was a reland of http://crrev.com/1896163003 with fix.

TBR=brucedawson@chromium.org,brettw@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=598599

Review-Url: https://codereview.chromium.org/1930293002
Cr-Original-Commit-Position: refs/heads/master@{#390545}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 500a5624ab6d616b503bf75449cfc772b9c3d2c2
2016-04-29 00:41:16 +00:00
brettw 10ea720915 Implement arflags in the GN build.
This flag was recently added in GN. This patch hooks it up to the toolchains
and moves some flags to use it that previously had to be hardcoded on the
tool command itself.

Remove concurrent_links variable from gcc_toolchain which was unused.

BUG=598599
Reland of http://crrev.com/1909163002 with no changes (now that a GN binary push to fix the bug has gone in) which was a reland of http://crrev.com/1896163003 with fix.

Review-Url: https://codereview.chromium.org/1907403002
Cr-Original-Commit-Position: refs/heads/master@{#390424}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 897cde76d084732227ea88af76163e33eda18778
2016-04-28 18:23:37 +00:00
sebmarchand cb815b4605 Add a new 'optimize_no_wpo' compiler config to GN.
This config will be used on the projects that don't support WPO (FFmpeg
and Yasm).

This config is a clone of the 'optimize' compiler config for now as we're not using WPO everywhere (it's only for the target building with the 'optimize_max' config).

BUG=490934

Review-Url: https://codereview.chromium.org/1916423003
Cr-Original-Commit-Position: refs/heads/master@{#390087}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: bd3a9d19352bcbec819f22d69223cebcc2e92989
2016-04-27 15:52:02 +00:00
pasko 8777f9714c Revert of Build: disable icf for gcc builds with bundled gold (patchset #2 id:20001 of https://codereview.chromium.org/1887303003/ )
Reason for revert:
Seems to be causing a 2.5MiB regression in libchrome.so on Android/ARM. Please re-land with disabling ICF for Linux-only.

See: crbug.com/605494

Original issue's description:
> Build: disable icf for gcc builds with bundled gold
>
> Gold doesn't respect section alignment when merging symbols
> https://sourceware.org/bugzilla/show_bug.cgi?id=17704
>
> BUG=576197
>
> Committed: https://crrev.com/feea41a011671a28dd15e2bb1d1290d817d601c0
> Cr-Commit-Position: refs/heads/master@{#388437}

TBR=dpranke@chromium.org,mcgrathr@chromium.org,ljagielski@opera.com
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=576197

Review URL: https://codereview.chromium.org/1930473002

Cr-Original-Commit-Position: refs/heads/master@{#390057}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: a5cd3c9a6ab2ce65e3775064893182ac42f305e9
2016-04-27 13:21:47 +00:00
thakis ccdbde804b roll clang 266460:267383
Also switch to gnuwin-3, which is identical to gnuwin-1
(which is a zip of all binaries from GnuWin32 needed to
run llvm regression tests), except that rm.exe, mv.exe
and find.exe have been replaced with rm.exe, mv.exe,
and find.exe from msys (and three msys dlls needed
to run them have been added).  This new rm.exe is
able to delete paths longer than 260 characters, needed
for clang's Modules/dependency-dump.m test, and the new
mv.exe is needed for ExecutionEngine/OrcMCJIT/load-object-a.ll
which moves long paths around with `find.exe -exec mv.exe`

BUG=604993,603364

Review URL: https://codereview.chromium.org/1917853002

Cr-Original-Commit-Position: refs/heads/master@{#389632}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 8aa292dd634877fc41e5844af23d1dee28694f41
2016-04-26 00:27:15 +00:00
dpranke 7181610b0c Add MB configs for ClangToTLinux* bots on FYI
The tip-of-tree Clang bots rely on an environment variable
called LLVM_FORCE_HEAD_REVISION to be set in order to know
to fetch the tip-of-tree Clang and use its version in the compile
time defines, rather than the checked-in version.

We don't want GN to use or depend on environment variables,
so this patch modifies the clang update script to also look at
a new command line arg, and adds a GN arg called 'llvm_force_head_revision' to cause the same effect.

However, we need to keep the env var around for `gclient runhooks`
and to keep the existing bots (and devs) working while on GYP,
and, perhaps more importantly, adding a new GYP_DEFINE that
does what we need to build/common.gypi is proving intractable,
so we hack MB to rewrite what the GYP_DEFINE would be if life
made sense back into the env var.

BUG=481692, 582737
R=thakis@chromium.org, brettw@chromium.org

Review URL: https://codereview.chromium.org/1908293002

Cr-Original-Commit-Position: refs/heads/master@{#389408}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 909bad6afa7124f67c4890f3c1bc244179141978
2016-04-24 23:16:33 +00:00
jbudorick 1152b29903 Revert of Implement arflags in the GN build. (patchset #2 id:20001 of https://codereview.chromium.org/1909163002/ )
Reason for revert:
speculatively reverting: issues with linking on the gpu bots again: https://build.chromium.org/p/chromium.gpu/builders/Android%20Debug%20%28Nexus%206%29/builds/8079

Original issue's description:
> Implement arflags in the GN build.
>
> This flag was recently added in GN. This patch hooks it up to the toolchains
> and moves some flags to use it that previously had to be hardcoded on the
> tool command itself.
>
> Remove concurrent_links variable from gcc_toolchain which was unused.
>
> BUG=598599
> Reland of http://crrev.com/1896163003 with fix.

TBR=brucedawson@chromium.org,brettw@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=598599

Review URL: https://codereview.chromium.org/1910393002

Cr-Original-Commit-Position: refs/heads/master@{#389000}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 2ce39e29422675764e94de94458ce3bb22fe53d3
2016-04-22 02:18:50 +00:00
brettw 89ef3456cd Implement arflags in the GN build.
This flag was recently added in GN. This patch hooks it up to the toolchains
and moves some flags to use it that previously had to be hardcoded on the
tool command itself.

Remove concurrent_links variable from gcc_toolchain which was unused.

BUG=598599
Reland of http://crrev.com/1896163003 with fix.

Review URL: https://codereview.chromium.org/1909163002

Cr-Original-Commit-Position: refs/heads/master@{#388971}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 920a09e4e58f92bf1ece1fcf1f31ec44185a4959
2016-04-22 00:24:54 +00:00
jbudorick f03f2e0cf9 Revert of Implement arflags in the GN build. (patchset #2 id:20001 of https://codereview.chromium.org/1896163003/ )
Reason for revert:
variety of compile failures on Android bots that have been switched to GN, see https://codereview.chromium.org/1896163003/#msg18

Original issue's description:
> Implement arflags in the GN build.
>
> This flag was recently added in GN. This patch hooks it up to the toolchains
> and moves some flags to use it that previously had to be hardcoded on the
> tool command itself.
>
> Remove concurrent_links variable from gcc_toolchain which was unused.
>
> BUG=598599

TBR=brucedawson@chromium.org,brettw@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=598599

Review URL: https://codereview.chromium.org/1903363003

Cr-Original-Commit-Position: refs/heads/master@{#388646}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 0d539e12630324a0ab446b19cacf765761cf9684
2016-04-21 01:06:15 +00:00
brettw f2cc0b265f Implement arflags in the GN build.
This flag was recently added in GN. This patch hooks it up to the toolchains
and moves some flags to use it that previously had to be hardcoded on the
tool command itself.

Remove concurrent_links variable from gcc_toolchain which was unused.

BUG=598599

Review URL: https://codereview.chromium.org/1896163003

Cr-Original-Commit-Position: refs/heads/master@{#388554}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: c33bfab4e4dc2702bc6ccc36038defd850837bd2
2016-04-20 19:41:16 +00:00
ljagielski 94c1354aa0 Build: disable icf for gcc builds with bundled gold
Gold doesn't respect section alignment when merging symbols
https://sourceware.org/bugzilla/show_bug.cgi?id=17704

BUG=576197

Review URL: https://codereview.chromium.org/1887303003

Cr-Original-Commit-Position: refs/heads/master@{#388437}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: feea41a011671a28dd15e2bb1d1290d817d601c0
2016-04-20 07:55:12 +00:00
thakis b65e4bea2a Disable -Wundefined-var-template on the clang tot bots.
It's a new warning upstream and it fires in several places in Chromium.
Suppress this for now to get the clang tot bots back green.

BUG=604888
TBR=hans@chromium.org

Review URL: https://codereview.chromium.org/1902263003

Cr-Original-Commit-Position: refs/heads/master@{#388364}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: d4e7c5c697e2d59d897a7bbedc77a33d798df85b
2016-04-19 23:53:35 +00:00
brucedawson 33b3da23bf Remove disabling of C4267 in 64-bit gn builds
As part of the VS 2015 port some C4267 warnings (size_t truncated to
smaller type) warnings were globally suppressed. This change removes the
global suppression for 64-bit gn builds and fixes the last few warnings.

The warning suppression remains for 32-bit builds because there are many
warnings there that still need suppression - they were C4244 warnings in
VS 2013 builds.

BUG=440500,566113

Review URL: https://codereview.chromium.org/1892143004

Cr-Original-Commit-Position: refs/heads/master@{#388293}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: d0ecb3bae2d232c17581eed59fe8aa31fa68f96b
2016-04-19 20:20:19 +00:00
thestig cdab3108e5 Revert of Android: Avoid linking with --gc-sections. (patchset #5 id:80001 of https://codereview.chromium.org/1883723004/ )
Reason for revert:
May have caused the Android Debug (Nexus 9) GPU bot to go red.

FAILED: python ../../build/android/gyp/finalize_apk.py ...

Exception in thread "main" java.lang.UnsupportedOperationException: Found more than one library
Multiple libraries are not supported for APKs that use 'load_library_from_zip'.

Original issue's description:
> Android: Avoid linking with --gc-sections.
>
> No more --gc-sections in debug mode for test targets either.
>
> Re-enable instrumentation of globals in ASAN builds.
>
> BUG=159801,159847
>
> Committed: https://crrev.com/6ef23a61fab8467ac15f12173d29ea94b5306101
> Cr-Commit-Position: refs/heads/master@{#387491}

TBR=agrieve@chromium.org,eugenis@chromium.org,yfriedman@chromium.org,inferno@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=159801,159847

Review URL: https://codereview.chromium.org/1889073002

Cr-Original-Commit-Position: refs/heads/master@{#387542}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: d842acfbc6f896427c4684ae471aead7e477bf13
2016-04-15 06:39:51 +00:00
thestig b2616b5c72 Android: Avoid linking with --gc-sections.
No more --gc-sections in debug mode for test targets either.

Re-enable instrumentation of globals in ASAN builds.

BUG=159801,159847

Review URL: https://codereview.chromium.org/1883723004

Cr-Original-Commit-Position: refs/heads/master@{#387491}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 6ef23a61fab8467ac15f12173d29ea94b5306101
2016-04-15 00:42:42 +00:00
bcf d67f5f53a3 Add GN arg to optimize for size
BUG=internal b/27889508

Review URL: https://codereview.chromium.org/1881193002

Cr-Original-Commit-Position: refs/heads/master@{#386826}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 3bca76f6d2a14ba232c08fa133d0186679a3f78e
2016-04-12 22:07:52 +00:00
sdefresne 54fce8bc3b [GN] Fix -g flags to be consistent between gyp & gn on iOS.
The gyp build uses -gdwarf-2 debug level so change GN to also use
that level instead of -g2 when targetting iOS.

BUG=None

Review URL: https://codereview.chromium.org/1873133002

Cr-Original-Commit-Position: refs/heads/master@{#386656}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: fa0530bfbfe97a969c23a00cb56d4f8d409c5eb9
2016-04-12 12:08:07 +00:00
brucedawson 8b2c02d30e Fix C4334 (32-bit shift converted to 64-bit) warnings
VS 2015's warning about 32-bit shifts that are then assigned to a
64-bit target fires more frequently than in VS 2013. This type of
code triggers it:

  int64_t size = 1 << shift_amount;

Because the '1' being shifted is a 32-bit int the result of the shift
will be a 32-bit result, so assigning it to a 64-bit variable is just
misleading and can lead to undefined behavior and lost bits.

During the port to VS 2015 this warning was globally suppressed. This
removes that global suppression.

There were ~nine C4334 warnings in Chromium with most of them being in
external repos such as pdfium, skia, webrtc, and angle. The external
repos have all been fixed. This fixes the Chromium repo warnings and
enables C4334 in gn builds.

In these cases the code that triggers it was assigning to a size_t
so it only showed up on 64-bit builds. In some cases there was already a
cast but it was after the shift, which is not as good as before the
shift. In one case the 32-bit constant was completely superfluous.

The Chromium specific warnings were:
 net\base\mime_sniffer_perftest.cc(93)
 third_party\webkit\source\platform\heap\heappage.cpp(738)
 net\spdy\hpack\hpack_huffman_table.cc(172)
 media\filters\vp8_parser.cc(157)
   warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits

BUG=593448

Review URL: https://codereview.chromium.org/1858423002

Cr-Original-Commit-Position: refs/heads/master@{#386480}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: c8615da7ebb48668de21b3e23edec64c1685ffbb
2016-04-11 21:39:30 +00:00
pcc 545f95b0b0 Enable whole-program virtual function optimization in LTO mode.
Also move LTO config out of sanitizer config, and enable function
sections on all architectures (not just ARM) as it improves
the linker's ability to do ICF.

BUG=580389

Review URL: https://codereview.chromium.org/1809273002

Cr-Original-Commit-Position: refs/heads/master@{#385630}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 5f4ec37b6548c11b0b470ce824a3d28f7f54fcd1
2016-04-07 02:33:57 +00:00
thakis 279c0286d3 Reland of clang/win: Stop passing -Qunused-arguments. (patchset #1 id:1 of https://codereview.chromium.org/1846633004/ )
Reason for revert:
Wasn't the culprit for that problem.

Original issue's description:
> Revert of clang/win: Stop passing -Qunused-arguments. (patchset #6 id:100001 of https://codereview.chromium.org/1828543003/ )
>
> Reason for revert:
> Speculative; official builds mysteriously exploded (crbug.com/599186) and this is on the blame list...
>
> Original issue's description:
> > clang/win: Stop passing -Qunused-arguments.
> >
> > All flags except /GS and /GL are accepted by clang-cl by now. To be able
> > to turn on -Qunused-arguments, don't pass /GS and /GL in clang builds
> > for now.
> >
> > BUG=504658,598772,598767
> > NOTRY=true
> >
> > Committed: https://crrev.com/de51a84b69b5b1dd458c65f6aaf2335f81b57785
> > Cr-Commit-Position: refs/heads/master@{#383954}
> >
> > R=hans@chromium.org
> >
> > Committed: https://crrev.com/cb19a4e78e9c472914680235c75f2b9afe554b20
> > Cr-Commit-Position: refs/heads/master@{#384004}
>
> TBR=hans@chromium.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=504658,598772,598767
>
> Committed: https://crrev.com/12edf36d8d15b8f517b750b6dc1eb12e4d21f681
> Cr-Commit-Position: refs/heads/master@{#384033}

TBR=hans@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=504658,598772,598767

Review URL: https://codereview.chromium.org/1844793003

Cr-Original-Commit-Position: refs/heads/master@{#384059}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: c5670cbd43bdeb6f5e03b36c7ac20b7d239f1c96
2016-03-30 19:44:13 +00:00
thakis fa15391149 Revert of clang/win: Stop passing -Qunused-arguments. (patchset #6 id:100001 of https://codereview.chromium.org/1828543003/ )
Reason for revert:
Speculative; official builds mysteriously exploded (crbug.com/599186) and this is on the blame list...

Original issue's description:
> clang/win: Stop passing -Qunused-arguments.
>
> All flags except /GS and /GL are accepted by clang-cl by now. To be able
> to turn on -Qunused-arguments, don't pass /GS and /GL in clang builds
> for now.
>
> BUG=504658,598772,598767
> NOTRY=true
>
> Committed: https://crrev.com/de51a84b69b5b1dd458c65f6aaf2335f81b57785
> Cr-Commit-Position: refs/heads/master@{#383954}
>
> R=hans@chromium.org
>
> Committed: https://crrev.com/cb19a4e78e9c472914680235c75f2b9afe554b20
> Cr-Commit-Position: refs/heads/master@{#384004}

TBR=hans@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=504658,598772,598767

Review URL: https://codereview.chromium.org/1846633004

Cr-Original-Commit-Position: refs/heads/master@{#384033}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 12edf36d8d15b8f517b750b6dc1eb12e4d21f681
2016-03-30 18:41:45 +00:00
Nico Weber 17300f8034 clang/win: Stop passing -Qunused-arguments.
All flags except /GS and /GL are accepted by clang-cl by now. To be able
to turn on -Qunused-arguments, don't pass /GS and /GL in clang builds
for now.

BUG=504658,598772,598767
NOTRY=true

Committed: https://crrev.com/de51a84b69b5b1dd458c65f6aaf2335f81b57785
Cr-Commit-Position: refs/heads/master@{#383954}

R=hans@chromium.org

Review URL: https://codereview.chromium.org/1828543003 .

Cr-Original-Commit-Position: refs/heads/master@{#384004}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: cb19a4e78e9c472914680235c75f2b9afe554b20
2016-03-30 16:51:20 +00:00
thakis 9e2a3ba099 Revert of clang/win: Stop passing -Qunused-arguments. (patchset #5 id:80001 of https://codereview.chromium.org/1828543003/ )
Reason for revert:
Broke https://build.chromium.org/p/chromium.chrome/builders/Google%20Chrome%20Win/builds/5643

gyp: name 'clang' is not defined while evaluating condition 'optimize=="max" and clang==0' in C:\b\build\slave\google-chrome-rel-win\build\src\v8\tools\gyp\v8.gyp

Original issue's description:
> clang/win: Stop passing -Qunused-arguments.
>
> All flags except /GS and /GL are accepted by clang-cl by now. To be able
> to turn on -Qunused-arguments, don't pass /GS and /GL in clang builds
> for now.
>
> BUG=504658,598772,598767
> NOTRY=true
>
> Committed: https://crrev.com/de51a84b69b5b1dd458c65f6aaf2335f81b57785
> Cr-Commit-Position: refs/heads/master@{#383954}

TBR=hans@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=504658,598772,598767

Review URL: https://codereview.chromium.org/1838903008

Cr-Original-Commit-Position: refs/heads/master@{#383959}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 90c7ceaea4dc9ebab7a43248c3ae29d478219249
2016-03-30 13:07:20 +00:00
thakis 51e60257dc clang/win: Stop passing -Qunused-arguments.
All flags except /GS and /GL are accepted by clang-cl by now. To be able
to turn on -Qunused-arguments, don't pass /GS and /GL in clang builds
for now.

BUG=504658,598772,598767
NOTRY=true

Review URL: https://codereview.chromium.org/1828543003

Cr-Original-Commit-Position: refs/heads/master@{#383954}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: de51a84b69b5b1dd458c65f6aaf2335f81b57785
2016-03-30 12:32:19 +00:00
rnk 8ff72389e5 Enable symbols with ASan
This sets -gline-tables-only to try to keep linking fast. This is
consistent with other platforms, which do the same for DWARF.

R=thakis@chromium.org
BUG=598344

Review URL: https://codereview.chromium.org/1840873002

Cr-Original-Commit-Position: refs/heads/master@{#383659}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: a9fefb873b684ccd3732a8859c3c8daa7635da2e
2016-03-29 02:42:24 +00:00
brucedawson 7eaf7ea986 Clean up gn VC++ linker settings
/fastfail and /maxilksize:0x7ff00000 were added to the wrong place in
crrev.com/1816333002 and need to be moved/merged. Also, the
mini_installer link command removes executable_config (which suppresses
LNK4199 warnings) and then triggers those warnings so that suppression
needs to be added back in.

The /maxilksize argument is also changed to be consistent and to avoid
duplication.

This doesn't change build behavior at all, it just suppresses some
warnings and tidies up the configuration.

Review URL: https://codereview.chromium.org/1835603002

Cr-Original-Commit-Position: refs/heads/master@{#383399}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 304172167717e13b6579ecfb7e3fc63338de66ac
2016-03-25 23:13:03 +00:00
atotic 4f670deb00 adds gdb-index option for linker
This cl adds a new configuration flag to gold linker: "gdb_index"

The flag is on by default if is_desktop_linux && is_debug && is_component_build

The previous attempt to add this flag to all the builds was reverted
because of disk-space requirements. This checkin makes it a default
only for linux debug builds.

Why do this?

gold linker has a flag to automatically generate gdb-index section
inside shared libraries when linking.

Webkit single-file compile/linking time:

16.31s without gdb-index
16.11s with gdb-index

gdb startup time

~51s without gdb-index
~19s with gdb-index

BUG=

Committed: https://crrev.com/f68b7c07a30baac088b8eda055ba52835c04692c
Cr-Commit-Position: refs/heads/master@{#378600}

Review URL: https://codereview.chromium.org/1680943002

Cr-Original-Commit-Position: refs/heads/master@{#383324}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: fcb018ec85c2e56e44180bb3e2a822082826000d
2016-03-25 18:53:12 +00:00
brucedawson 37e98fbaf3 Remove /RTC1 switch to let debug mini_installer build
The /RTC1 switch adds references to _RTC_CheckStackVars and
_RTC_InitBase which causes msvcrtd.lib to be pulled in which causes
gn debug builds of mini_installer to fail. /RTC1 is not used in gyp
builds and therefore it should be removed from gn builds unless we
decide that it offers enough value to justify the effort required to put
it back in.

BUG=596885

Review URL: https://codereview.chromium.org/1831213002

Cr-Original-Commit-Position: refs/heads/master@{#383261}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: bc907653b0b0bd505ee0393925517f11713df643
2016-03-25 07:10:46 +00:00
brucedawson 1fa79182e5 Add fastfail to VC++ linker
/fastfail should get us crash dumps when the linker crashes, which it
has been doing. /maxilksize is being added for consistency with gyp
builds, and because the linker crashes are incremental linking related.

This is being added in order to investigate a particular problem but
it is a good long-term change also - crashing without a crash dump is
not helpful.

BUG=482671

Review URL: https://codereview.chromium.org/1816333002

Cr-Original-Commit-Position: refs/heads/master@{#382682}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 1a87fbf87fc1ac4aaef80094be817c6b3a87dc1b
2016-03-22 21:27:25 +00:00
thakis cecebadb49 clang/win: Enable fastbuild=1 by default for now.
Linking currently takes forever when building with clang/win
without fastbuild=1 (see bug for details).  Turn this on by
default until things are usable without it again.

BUG=589977
TBR=rnk

Review URL: https://codereview.chromium.org/1816683002

Cr-Original-Commit-Position: refs/heads/master@{#382095}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 28bfb18a1cf236f46860a8e0165ed36532ee5c49
2016-03-18 21:37:23 +00:00
hashimoto df7edd927e Apply -fno-tree-sra and -fno-caller-saves only to Android
I don't know why http://crrev.com/293913 has moved these flags outside
if(is_android),
but the corresponding GYP code (build/config.gypi) is still applying
these flags only to Android.

BUG=433082

Review URL: https://codereview.chromium.org/1807163002

Cr-Original-Commit-Position: refs/heads/master@{#381890}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 4e700fe2518474e66cf61946ccfe04158e59613c
2016-03-18 04:56:08 +00:00