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

631 Коммитов

Автор SHA1 Сообщение Дата
Justin Cohen 0992a465bc [ios] Default use_xcode_clang to false for all builders.
Bug: 964650
Change-Id: I23109e8e3dbcacfe4a24611f5a3d5de29708a156
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1650236
Reviewed-by: Misha Efimov <mef@chromium.org>
Reviewed-by: Rohit Rao <rohitrao@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#667733}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 0fc28f5201e13086c79e5b3fe8d7671afec78c1b
2019-06-10 20:26:15 +00:00
Erik Chen d953fd9452 Remove DEVELOPER_DIR env wrapper for toolchain commands.
When we use the hermetic toolchain, all binaries are specified by path. Since we
no longer use xcrun to find the binaries, we also no longer need DEVELOPER_DIR.

Bug: 971452
Change-Id: I46499bef18afc19e51aae943047fd33beecac75c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1650281
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Erik Chen <erikchen@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#667280}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: b5f646147dee024274d30f24b5ce939c32fa2887
2019-06-07 19:29:54 +00:00
Erik Chen a827852225 Explicitly specify path to strip for linker_driver.py
This allows the macOS toolchain to avoid using xcrun to find the path for strip.

Bug: 971452
Change-Id: I7d7b87462ee33201b57a75bfa58e5fbf8ddaee5f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1649187
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Erik Chen <erikchen@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#667215}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 2eaf8f5a560c5b86a74b97c9e5623b72c106c433
2019-06-07 17:50:31 +00:00
Erik Chen 55867660f4 Move iOS only toolchain-related scripts into build/config/ios.
This CL is a refactor with no intended behavior change.

Bug: 965663
Change-Id: I07a61658d730c0982e52f7e496d05cb274c9ef2d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1648695
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Erik Chen <erikchen@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#667184}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 7479370d8d92077c27d77434ace959a331ce1182
2019-06-07 17:06:24 +00:00
Erik Chen 8f8142bb13 Specify explicit path for libtool
Bug: 971452
Change-Id: I980b4113a011d37af3ba2582883604cc40b87fe3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1648736
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Erik Chen <erikchen@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#667177}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e549bc63ae70056717244f6ab39c4affa24b241c
2019-06-07 16:57:05 +00:00
Erik Chen f39ebe5610 Add explicit search path for linker on macOS.
Linking on macOS is invoked via clang++. If clang++ cannot find ld on the
default search path, clang++ will invoke xcrun to search for ld. This CL
explicitly passes the path to ld if we're using hermetic xcode. This way clang++
will not invoke xcrun.

Bug: 971452
Change-Id: I5bcaa577d9ccc6d3ceca6e2524482e299b371e92
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1649179
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Erik Chen <erikchen@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#667154}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: ea5d6db4f364752de2a5d71e44ced11784475a55
2019-06-07 16:12:36 +00:00
Erik Chen c2c8bfe5f0 Add explicit path for otool and nm on macOS.
Both binaries show up in the default macOS search path, but as minimal wrappers
around xcrun. By specifying the paths explicitly, we avoid calls to xcrun.

Bug: 971452
Change-Id: Ia852f4b9991fd548f3c83bc04fdda7389e44a72a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1649223
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Erik Chen <erikchen@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#667153}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: bcdbc4c814be4fc16af355b88d4f6788e78fe7f7
2019-06-07 16:12:04 +00:00
Takashi Sakamoto b83cffc465 Revert "Explicitly specify path to strip and dsymutil for linker_driver.py."
This reverts commit 9cc11952e44ef12a6f4b16ff4e310f838bd0319f.

Reason for revert: 
causes compile failure on Mac ASan 64 Builder
https://ci.chromium.org/p/chromium/builders/ci/Mac%20ASan%2064%20Builder/84739
https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8911354223898031376/+/steps/compile/0/stdout


Original change's description:
> Explicitly specify path to strip and dsymutil for linker_driver.py.
> 
> This allows the macOS toolchain to avoid using xcrun to find the path for strip
> and dsymutil.
> 
> Bug: 971452
> Change-Id: Ib3d8865c44e1d95ed2fe22b6393d7e1549f9e621
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1649054
> Reviewed-by: Dirk Pranke <dpranke@chromium.org>
> Commit-Queue: Erik Chen <erikchen@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#666915}

TBR=dpranke@chromium.org,erikchen@chromium.org

Change-Id: Id03189c55b584ec468ebed289206888abe5a0fa1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 971452
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1647599
Reviewed-by: Takashi Sakamoto <tasak@google.com>
Commit-Queue: Takashi Sakamoto <tasak@google.com>
Cr-Original-Commit-Position: refs/heads/master@{#666986}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 2993e88f26894f8388d048417d454aa106de7500
2019-06-07 02:25:11 +00:00
Takashi Sakamoto 3b046f8e27 Reland "Use explicit path for libtool rather than implicit invocation of xcrun."
This reverts commit 6f979049822acf3e4cde9b34f5dcfeb8e94745e5.

Reason for revert: This doesn't cause compile failure.
I have to revert 
https://chromium-review.googlesource.com/c/chromium/src/+/1649054

Original change's description:
> Revert "Use explicit path for libtool rather than implicit invocation of xcrun."
> 
> This reverts commit 1f49775ab209ba5668029cdffe63f40ce5e98668.
> 
> Reason for revert: causes compile failure on Mac ASan 64 Builder
> https://ci.chromium.org/p/chromium/builders/ci/Mac%20ASan%2064%20Builder/84739
> https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8911354223898031376/+/steps/compile/0/stdout
> 
> 
> Original change's description:
> > Use explicit path for libtool rather than implicit invocation of xcrun.
> > 
> > libtool is part of the default path at /usr/bin/libtool. That binary is just a
> > shim that calls out to xcrun to find the actual libtool. If we're using hermetic
> > xcode, then we can explicitly specify the path to avoid invoking xcrun.
> > 
> > Bug: 971452
> > Change-Id: If9344a244160ccc43895cf913d48f9c9a44ac5d9
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1648836
> > Reviewed-by: Dirk Pranke <dpranke@chromium.org>
> > Commit-Queue: Erik Chen <erikchen@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#666906}
> 
> TBR=dpranke@chromium.org,erikchen@chromium.org
> 
> Change-Id: I0cdc4acdff512213116ecd872230b6d7b634b865
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 971452
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1647598
> Reviewed-by: Takashi Sakamoto <tasak@google.com>
> Commit-Queue: Takashi Sakamoto <tasak@google.com>
> Cr-Commit-Position: refs/heads/master@{#666983}

TBR=dpranke@chromium.org,tasak@google.com,erikchen@chromium.org

Change-Id: I1180b957926016864fcb83f351985ce6ec4fb8bb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 971452
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1647600
Reviewed-by: Takashi Sakamoto <tasak@google.com>
Commit-Queue: Takashi Sakamoto <tasak@google.com>
Cr-Original-Commit-Position: refs/heads/master@{#666985}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 20fb0ca2321693ac194b9efd7c83d8a4b856fdb4
2019-06-07 02:24:59 +00:00
Takashi Sakamoto 0152244f91 Revert "Use explicit path for libtool rather than implicit invocation of xcrun."
This reverts commit 1f49775ab209ba5668029cdffe63f40ce5e98668.

Reason for revert: causes compile failure on Mac ASan 64 Builder
https://ci.chromium.org/p/chromium/builders/ci/Mac%20ASan%2064%20Builder/84739
https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8911354223898031376/+/steps/compile/0/stdout


Original change's description:
> Use explicit path for libtool rather than implicit invocation of xcrun.
> 
> libtool is part of the default path at /usr/bin/libtool. That binary is just a
> shim that calls out to xcrun to find the actual libtool. If we're using hermetic
> xcode, then we can explicitly specify the path to avoid invoking xcrun.
> 
> Bug: 971452
> Change-Id: If9344a244160ccc43895cf913d48f9c9a44ac5d9
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1648836
> Reviewed-by: Dirk Pranke <dpranke@chromium.org>
> Commit-Queue: Erik Chen <erikchen@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#666906}

TBR=dpranke@chromium.org,erikchen@chromium.org

Change-Id: I0cdc4acdff512213116ecd872230b6d7b634b865
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 971452
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1647598
Reviewed-by: Takashi Sakamoto <tasak@google.com>
Commit-Queue: Takashi Sakamoto <tasak@google.com>
Cr-Original-Commit-Position: refs/heads/master@{#666983}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 6f979049822acf3e4cde9b34f5dcfeb8e94745e5
2019-06-07 02:22:44 +00:00
Erik Chen 4bc4163ba2 Explicitly specify path to strip and dsymutil for linker_driver.py.
This allows the macOS toolchain to avoid using xcrun to find the path for strip
and dsymutil.

Bug: 971452
Change-Id: Ib3d8865c44e1d95ed2fe22b6393d7e1549f9e621
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1649054
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Erik Chen <erikchen@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#666915}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 9cc11952e44ef12a6f4b16ff4e310f838bd0319f
2019-06-06 22:59:15 +00:00
Erik Chen 5da88c384b Use explicit path for libtool rather than implicit invocation of xcrun.
libtool is part of the default path at /usr/bin/libtool. That binary is just a
shim that calls out to xcrun to find the actual libtool. If we're using hermetic
xcode, then we can explicitly specify the path to avoid invoking xcrun.

Bug: 971452
Change-Id: If9344a244160ccc43895cf913d48f9c9a44ac5d9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1648836
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Erik Chen <erikchen@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#666906}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 1f49775ab209ba5668029cdffe63f40ce5e98668
2019-06-06 22:47:06 +00:00
Erik Chen 8c4847774e Disable compile_xcassets on macOS.
xcassets are only used on iOS, not macOS. We want to minimize the number of
Xcode-based tools used by the macOS toolchain, so we intentionally disallow
future uses of xcassets on macOS.

Change-Id: Id559f84633be6c935211561b976a7991810d94ad
Bug: 965663
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1643406
Commit-Queue: Nico Weber <thakis@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#666695}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 6c478646f25b58fe24c885b76f3f3e5c0a0fcd51
2019-06-06 14:39:34 +00:00
Mark Mentovai 84c2d32f7d Revert "[Mac] Preserve symbolic links in the copy_bundle_data tool"
This reverts commit 28c84c16d28cba67c4ec61997632f71583453d22.

Reason for revert: https://crbug.com/969587

Original change's description:
> [Mac] Preserve symbolic links in the copy_bundle_data tool
> 
> This is a reland of 6a008993a2e5, which was reverted in 235d842aa70a.
> (Thus, this is a revert of that revert.)
> 
> Since the last attempt, the structure of the keystone_registration
> bundle_data rule in third_party/googlemac (via src-internal DEPS) has
> changed to avoid the dangling symbolic link problem previously
> encountered.
> 
> The description from 6a008993a2e5:
> 
> The copy_bundle_data tool is implemented in terms of pax for directories
> and ln hard links for files. The pax command does preserve symbolic
> links within the tree that is being copied. But with the way that pax is
> invoked by the tool, cd-ing into the source, if the source is itself
> a symbolic link to a directory, the tree will be logically copied rather
> than just as a symbolic link.
> 
> A similar issue exists with the non-directory symbolic link source case,
> where a hard link will be produced instead of a symbolic link.
> 
> Fix both of these cases by specifically testing if the source is a
> symbolic link and then re-creating it if so.
> 
> Bug: 955936
> Change-Id: Ia13ddf743603e98337c3523e9101e7627e1c31d0
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1637673
> Reviewed-by: Nico Weber <thakis@chromium.org>
> Commit-Queue: Mark Mentovai <mark@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#665203}

TBR=thakis@chromium.org,mark@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 955936
Change-Id: I4de6596c29598961ac15fbd24acc54b1f763735a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1639152
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#665543}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 13865f386b4286efad2d98e0c7118ed614ce92df
2019-06-03 15:02:34 +00:00
Mark Mentovai fd7665151e [Mac] Preserve symbolic links in the copy_bundle_data tool
This is a reland of 6a008993a2e5, which was reverted in 235d842aa70a.
(Thus, this is a revert of that revert.)

Since the last attempt, the structure of the keystone_registration
bundle_data rule in third_party/googlemac (via src-internal DEPS) has
changed to avoid the dangling symbolic link problem previously
encountered.

The description from 6a008993a2e5:

The copy_bundle_data tool is implemented in terms of pax for directories
and ln hard links for files. The pax command does preserve symbolic
links within the tree that is being copied. But with the way that pax is
invoked by the tool, cd-ing into the source, if the source is itself
a symbolic link to a directory, the tree will be logically copied rather
than just as a symbolic link.

A similar issue exists with the non-directory symbolic link source case,
where a hard link will be produced instead of a symbolic link.

Fix both of these cases by specifically testing if the source is a
symbolic link and then re-creating it if so.

Bug: 955936
Change-Id: Ia13ddf743603e98337c3523e9101e7627e1c31d0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1637673
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#665203}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 28c84c16d28cba67c4ec61997632f71583453d22
2019-05-31 19:06:48 +00:00
Daniel Bratell 8f344e2dd9 Revert "[BrowserSwitcher] Build BHO for both bitnesses"
This reverts commit 6c3a34bfc2030ffd304c54f5cb96d234622ef389.

Reason for revert: It broke some builds with:
The file:
  //out/Release_x64/win_clang_x86/browser_switcher_bho.dll.pdb
is listed as an input or source for the target:
  //chrome/browser/browser_switcher/bho:copy_browser_switcher_binaries
but no targets in the build generate that file.
See for instance https://ci.chromium.org/p/chromium/builders/ci/Jumbo%20Win%20x64/35757

and the comment in the bug.

Original change's description:
> [BrowserSwitcher] Build BHO for both bitnesses
> 
> To do so, this CL also adds support for the x86 toolchain in an x64
> build.
> 
> Instead of generating one DLL, we now generate 2 DLLs in the root
> out-dir:
> 
> - browser_switcher_bho.dll (x86)
> - browser_switcher_bho_64.dll (x64)
> 
> The one that is cross-built (i.e. bitness doesn't match the host) is
> built in a sub-directory, and then copied to the root out-dir.
> 
> Bug: 952897
> Change-Id: Ie96ff95556dbe41c8d8eb2fb5ce748964705e096
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1589457
> Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
> Reviewed-by: Dirk Pranke <dpranke@chromium.org>
> Commit-Queue: Nicolas Ouellet-Payeur <nicolaso@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#663196}

TBR=thakis@chromium.org,dpranke@chromium.org,brucedawson@chromium.org,nicolaso@chromium.org

Change-Id: I2f1929a4e2ea2f9408273c5f04b52ee79580b4cc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 952897
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1630427
Reviewed-by: Daniel Bratell <bratell@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Original-Commit-Position: refs/heads/master@{#663392}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: b0179d714f8129f2e95e447f35fc5c1031ffdb65
2019-05-25 09:29:41 +00:00
Nicolas Ouellet-Payeur 81bece9962 [BrowserSwitcher] Build BHO for both bitnesses
To do so, this CL also adds support for the x86 toolchain in an x64
build.

Instead of generating one DLL, we now generate 2 DLLs in the root
out-dir:

- browser_switcher_bho.dll (x86)
- browser_switcher_bho_64.dll (x64)

The one that is cross-built (i.e. bitness doesn't match the host) is
built in a sub-directory, and then copied to the root out-dir.

Bug: 952897
Change-Id: Ie96ff95556dbe41c8d8eb2fb5ce748964705e096
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1589457
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Nicolas Ouellet-Payeur <nicolaso@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#663196}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 6c3a34bfc2030ffd304c54f5cb96d234622ef389
2019-05-24 19:25:58 +00:00
Mark Mentovai ee85cb34c6 Revert "[Mac] Preserve symbolic link in the copy_bundle_data tool."
This reverts commit 6a008993a2e54af93edd956a53c786668bc0e253.

Reason for revert: https://crbug.com/966766, more information at https://crbug.com/955936 beginning at comment 13

Original change's description:
> [Mac] Preserve symbolic link in the copy_bundle_data tool.
> 
> The copy_bundle_data tool is implemented in terms of pax for directories
> and ln hard links for files. The pax command does preserve symbolic
> links within the tree that is being copied. But with the way that pax is
> invoked by the tool, cd-ing into the source, if the source is itself
> a symbolic link to a directory, the tree will be logically copied rather
> than just as a symbolic link.
> 
> A similar issue exists with the non-directory symbolic link source case,
> where a hard link will be produced instead of a symbolic link.
> 
> Fix both of these cases by specifically testing if the source is a
> symbolic link and then re-creating it if so.
> 
> Bug: 955936
> Change-Id: I69cf96878e59b0b7b121ae46cba5bc1e81f261ae
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1626269
> Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
> Reviewed-by: Mark Mentovai <mark@chromium.org>
> Commit-Queue: Robert Sesek <rsesek@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#662575}

TBR=sdefresne@chromium.org,rsesek@chromium.org,mark@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 955936
Change-Id: Ia1489278b62d0cdb33ed8980bbd6a6bcab0bb199
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1628045
Reviewed-by: Mark Mentovai <mark@chromium.org>
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#663076}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 235d842aa70a59c872d89e16b4a65606db5fb000
2019-05-24 15:00:36 +00:00
Robert Sesek 98e75e1e0c [Mac] Preserve symbolic link in the copy_bundle_data tool.
The copy_bundle_data tool is implemented in terms of pax for directories
and ln hard links for files. The pax command does preserve symbolic
links within the tree that is being copied. But with the way that pax is
invoked by the tool, cd-ing into the source, if the source is itself
a symbolic link to a directory, the tree will be logically copied rather
than just as a symbolic link.

A similar issue exists with the non-directory symbolic link source case,
where a hard link will be produced instead of a symbolic link.

Fix both of these cases by specifically testing if the source is a
symbolic link and then re-creating it if so.

Bug: 955936
Change-Id: I69cf96878e59b0b7b121ae46cba5bc1e81f261ae
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1626269
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Robert Sesek <rsesek@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#662575}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 6a008993a2e54af93edd956a53c786668bc0e253
2019-05-23 11:39:06 +00:00
Raul Tambre 0fdfe6341a //build: Convert print statements to Python 3 style
Ran "2to3 -w -n -f print ./base" and manually added imports.
There are no intended behaviour changes.

Bug: 941669
Change-Id: Ie2830e213eae3a5d7753ce503020e02811b726d1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1585890
Commit-Queue: Raul Tambre <raul@tambre.ee>
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Auto-Submit: Raul Tambre <raul@tambre.ee>
Cr-Original-Commit-Position: refs/heads/master@{#658917}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 9e24293bf2459779641201495baa3b2ae9d13cd9
2019-05-12 06:11:07 +00:00
Raul Tambre ebd17ddb44 midl: Support adding .tlb files to outputs. Specify it where appropriate.
.tlb files aren't always generated nor used, so it'll be up to the invoker to specify when adding them to outputs is necessary.
This CL also enables this for existing code where appropriate.

The issue was found and a fix discussed in https://chromium-review.googlesource.com/c/chromium/src/+/1585890/.

TBR=jamiewalch

Bug: 959555
Change-Id: I426fdabf0f7a03500cf2078a6e759255c2df7ddc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1606162
Commit-Queue: Nico Weber <thakis@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#658898}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: c6ab2e74d22eb49d72bd7084aaa6e84e8ec8113c
2019-05-11 17:40:09 +00:00
Christopher Grant 6ff84bb755 Add partitioned native library generation tooling
This change builds on the prototype posted by pcc@, here:
http://crrev.com/c/1521283

The partitioned_shared_library GN template may be used in place of
shared_library to create a set of libraries linked simultaneously.  This
will be leveraged in later changes to split code into Android dynamic
feature modules.  The current change adds the GN template for the set of
partitions, along with the Python wrapper script invoked by GN.

Bug: 921663
Change-Id: I805d598b03ae15bd4ceeb8e915526ed8b15af4cb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1568772
Reviewed-by: Peter Collingbourne <pcc@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Tibor Goldschwendt <tiborg@chromium.org>
Commit-Queue: Christopher Grant <cjgrant@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#654117}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 3b06acce01851078c171e97d7480b8b719e7f6d9
2019-04-25 18:26:41 +00:00
Raul Tambre a8588c9446 Python 3 compatibility fix in //build/toolchain/win/tool_wrapper.py
The script still works with Python 2.
There are no intended behaviour changes.

Bug: 941669
Change-Id: Ib02270d39aab9a74a412106c19edbf5ac5518428
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1552832
Auto-Submit: Raul Tambre <raul@tambre.ee>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Raul Tambre <raul@tambre.ee>
Cr-Original-Commit-Position: refs/heads/master@{#648807}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: b37e04b0e95da89eeb35b350e94471a31ae80f1e
2019-04-08 19:38:11 +00:00
Kui Tan 2fcd50d93d Add support for precompiled headers in gcc toolchain.
Gn can't generate ninja-files with precompiled headers when compiled on
linux or android due to lack of relative configuration in gcc toolchain.

Relative discuss:
https://groups.google.com/a/chromium.org/forum/#!topic/gn-dev/VRbhgdW6qAE

Bug: none
Change-Id: I966e11baacd9168a44f65f773148d4a7509574b9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1546791
Commit-Queue: Nico Weber <thakis@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#646152}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 639ee288b64df96b4df0395f73aa3ab2502b0016
2019-03-31 17:34:24 +00:00
Nico Weber 53f08836a0 Remove use_clang_static_analyzer and use_vs_code_analysis.
The clang we ship no longer includes the static analyzer, so this flag
hasn't been working for a while. Remove it, and mb stuff for an FYI bot
that uses it.

The plan is to run the static analyzer through clang-tidy instead.

While here, also remove the 'win analyze' bot src bits, since that
bot depends on MSVC which we haven't supported in a while either,
and the little bit of GN code kept alive by it.

Bug: 925145,687243
Change-Id: I042d3cc9f512a024a6eae6a8e7d43aa2f9a74fea
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1538987
Commit-Queue: Nico Weber <thakis@chromium.org>
Reviewed-by: Hans Wennborg <hans@chromium.org>
Auto-Submit: Nico Weber <thakis@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#644866}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: db1eca94f6af3ebca12da507180ed20afe038b5d
2019-03-27 17:06:19 +00:00
Nico Weber 6d94f9dd4f win: Reorganize some build flags.
- Move global win-only flags from //build/config/compiler to
  //build/config/win:compiler which the former already references if is_win

- Move /FC from the toolchain to //build/config/win:compiler too: The
  toolchain isn't where random compiler flags should be added.

- This allows moving msvc_use_absolute_paths from a gni file to a gn file,
  so do that as well.

No intended behavior change.

Bug: none
Change-Id: I1b35a4242649105e005b94df911849ebf44d7c5d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1541636
Commit-Queue: Nico Weber <thakis@chromium.org>
Commit-Queue: Hans Wennborg <hans@chromium.org>
Auto-Submit: Nico Weber <thakis@chromium.org>
Reviewed-by: Hans Wennborg <hans@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#644799}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: d4061911728278e25b342e0213dd42aa4155d89c
2019-03-27 15:07:43 +00:00
Nico Weber fe11f7a18b win/arm64: Don't pass both -m64 and --target=arm64-windows; keep target flags in one place.
Also simplify the ml code a bit, and remove explicitly passed defaults.

No intended behavior change.

Bug: none
Change-Id: I3c3b0b173eb4a4652617c14989309395db5aa07f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1536745
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Auto-Submit: Nico Weber <thakis@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#643938}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 8acf9b23b32b986baef826f71f82b1c3d0bbc0c3
2019-03-25 19:01:29 +00:00
Raul Tambre d411745b0d Improve Python 3 compatibility of build scripts
These changes allow more of Chromium to be built using Python 3.

The scripts still work with Python 2.
There are no intended behaviour changes.

Bug: 941669
Change-Id: I6897d00ce00ec6aa5d7ca216b9f302e725a21897
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1527522
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Raul Tambre <raul@tambre.ee>
Cr-Original-Commit-Position: refs/heads/master@{#642401}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 79fbf3cf437660defd0eee56685c7a785812591d
2019-03-20 05:48:38 +00:00
Raul Tambre e625c0fa04 Improve Python 3 support in build scripts
The changes are to allow build files to be generated using Python 3 on Windows.

The scripts still work with Python 2.
There are no intended behaviour changes.

Bug: 941669
Change-Id: I52c912c624660c7a46c05f8f36871744abd7b8d4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1521487
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Raul Tambre <raul@tambre.ee>
Cr-Original-Commit-Position: refs/heads/master@{#641870}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 4197d3af6e42aa72076d6051153a644f3df62dd5
2019-03-19 15:04:20 +00:00
Sajjad Mirza 657f4f1cb0 Disable coverage for Android x86/x86_64 toolchains.
Since we lack the libclang_rt.profile library for Android x86/x86_64,
we cannot link any Android binaries that are built with coverage
instrumentation. This blocks generating coverage builds for Chrome OS,
because of ARC. Therefore, we need to ensure that no files built for
Android x86/x86_64 have coverage instrumentation.

We previously attempted to workaround this by excluding libmojo.so from
Chrome OS builds in crrev.com/c/1493471. We have since discovered that
that change is insufficient, and also fragile, since a dependency on
mojo can be added anywhere in the build files.

This new change is a better workaround. Instead of special-casing mojo,
we disable coverage instrumentation for the all of android_clang_x86
and android_clang_x64 toolchains. This is better because it prevents
any Android-toolchain files from generating coverage instrumentation.

Bug: 865376
Change-Id: Ia0ea208fc850d5e0d78ff172eabf02e503a8c1de
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1515902
Commit-Queue: Sajjad Mirza <sajjadm@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Yuke Liao <liaoyuke@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#639698}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 07197e8e3c9432e317a50921e2c705afb6024226
2019-03-11 23:30:23 +00:00
Sajjad Mirza 0dc5c0fd3c Use the wrapper script in all coverage builds (fixed).
This is a fix for crrev.com/c/1496002, which was reverted because of a
1-character mistake. The rest of the CL message is copied from the
original:

Previously the wrapper script would only be used for coverage builds
that required selective instrumentation of specific files. Now it
will also be used for any coverage builds.

Since the script's job is to remove flags from files that shouldn't
have them the default_coverage config now adds to cflags even in a
CQ build.

Bug: 918215
Change-Id: Ifdb13657c0c7a80d79960b411050e4f8918fa172
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1508560
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Sajjad Mirza <sajjadm@google.com>
Cr-Original-Commit-Position: refs/heads/master@{#638762}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 494df319742a206bca4d28ac6e0707bdd7d9a3ee
2019-03-07 21:54:53 +00:00
Sajjad Mirza c2602146e0 Reland "Reland "Adding an exclusion list to the coverage wrapper script.""
This is a reland of cdc92f96b8b0e231e1e6c9cc173c9c473d10e908

Original change's description:
> Reland "Adding an exclusion list to the coverage wrapper script."
> 
> This is a reland of 6b7213a45382f01ac0a2efec1015545bd051da89
> 
> Original change's description:
> > Adding an exclusion list to the coverage wrapper script.
> > 
> > The script now assumes GN adds coverage flags to the cflags for each
> > source file. The script removes the flag if the file is in an exclusion
> > list, or if `--files-to-instrument` is set it will also remove flags if
> > the file is not listed in that argument.
> > 
> > The script supports multiple exclusion lists that can be selected with
> > the `--target-os` flag.
> > 
> > It's expected that GN will set these flags correctly and invoke the
> > script in all coverage builds. http://crrev.com/c/1496002 does that.
> > 
> > 
> > Bug: 918215
> > Change-Id: I4454f67067a083581f31a22cfef85368825789f9
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1495994
> > Commit-Queue: Sajjad Mirza <sajjadm@google.com>
> > Reviewed-by: Max Moroz <mmoroz@chromium.org>
> > Reviewed-by: Yuke Liao <liaoyuke@chromium.org>
> > Reviewed-by: Roberto Carrillo <robertocn@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#637892}
> 
> Bug: 918215
> Change-Id: I1254d288ff263ff94c46b46e6be99738e31b9574
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1506974
> Reviewed-by: Yuke Liao <liaoyuke@chromium.org>
> Reviewed-by: Max Moroz <mmoroz@chromium.org>
> Commit-Queue: Sajjad Mirza <sajjadm@google.com>
> Cr-Commit-Position: refs/heads/master@{#638362}

Bug: 918215
Change-Id: Ibd1e68a066bddd69e46c9cb32fcd9df209d97a1a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1509459
Reviewed-by: Max Moroz <mmoroz@chromium.org>
Commit-Queue: Sajjad Mirza <sajjadm@google.com>
Cr-Original-Commit-Position: refs/heads/master@{#638758}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: bf9e66a59b64620d096c5c2701532e16381361ca
2019-03-07 21:49:06 +00:00
Yuke Liao 9d091f7698 Revert "Reland "Adding an exclusion list to the coverage wrapper script.""
This reverts commit cdc92f96b8b0e231e1e6c9cc173c9c473d10e908.

Reason for revert: Since the other one was reverted: https://chromium-review.googlesource.com/c/chromium/src/+/1508457

Original change's description:
> Reland "Adding an exclusion list to the coverage wrapper script."
> 
> This is a reland of 6b7213a45382f01ac0a2efec1015545bd051da89
> 
> Original change's description:
> > Adding an exclusion list to the coverage wrapper script.
> > 
> > The script now assumes GN adds coverage flags to the cflags for each
> > source file. The script removes the flag if the file is in an exclusion
> > list, or if `--files-to-instrument` is set it will also remove flags if
> > the file is not listed in that argument.
> > 
> > The script supports multiple exclusion lists that can be selected with
> > the `--target-os` flag.
> > 
> > It's expected that GN will set these flags correctly and invoke the
> > script in all coverage builds. http://crrev.com/c/1496002 does that.
> > 
> > 
> > Bug: 918215
> > Change-Id: I4454f67067a083581f31a22cfef85368825789f9
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1495994
> > Commit-Queue: Sajjad Mirza <sajjadm@google.com>
> > Reviewed-by: Max Moroz <mmoroz@chromium.org>
> > Reviewed-by: Yuke Liao <liaoyuke@chromium.org>
> > Reviewed-by: Roberto Carrillo <robertocn@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#637892}
> 
> Bug: 918215
> Change-Id: I1254d288ff263ff94c46b46e6be99738e31b9574
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1506974
> Reviewed-by: Yuke Liao <liaoyuke@chromium.org>
> Reviewed-by: Max Moroz <mmoroz@chromium.org>
> Commit-Queue: Sajjad Mirza <sajjadm@google.com>
> Cr-Commit-Position: refs/heads/master@{#638362}

TBR=stgao@chromium.org,robertocn@chromium.org,mmoroz@chromium.org,liaoyuke@chromium.org,sajjadm@google.com

Change-Id: I43834e520ccadd680217e80fc6ca40a210684b3c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 918215
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1508597
Reviewed-by: Yuke Liao <liaoyuke@chromium.org>
Commit-Queue: Yuke Liao <liaoyuke@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#638587}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 20eb9bf1ab3a31f4a80d1524e447989275106f8b
2019-03-07 16:21:03 +00:00
Hans Wennborg 765920bd73 Revert "Use the wrapper script in all coverage builds."
This reverts commit 78d6b9950b4bd9462c226b2cc2ac1f74ad84ad6a.

Reason for revert:

This broke the coverage builds, see e.g.
https://ci.chromium.org/p/chromium/builders/ci/ToTLinuxCoverage/6258
which fails with:
"/bin/sh: 1: ../../build/toolchain/clang_code_coverage_wrapper.py--target-os=linux: not found"

I guess there's a missing space before --target-os.

Could this have been found in testing?


Original change's description:
> Use the wrapper script in all coverage builds.
> 
> Previously the wrapper script would only be used for coverage builds
> that required selective instrumentation of specific files. Now it
> will also be used for any coverage builds.
> 
> Since the script's job is to remove flags from files that shouldn't
> have them the default_coverage config now adds to cflags even in a
> CQ build.
> 
> Bug: 918215
> Change-Id: I012c5732d46bf5cff9eaf8f50615739bb781cc29
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1496002
> Commit-Queue: Sajjad Mirza <sajjadm@google.com>
> Reviewed-by: Dirk Pranke <dpranke@chromium.org>
> Reviewed-by: Max Moroz <mmoroz@chromium.org>
> Reviewed-by: Yuke Liao <liaoyuke@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#638321}

TBR=stgao@chromium.org,dpranke@chromium.org,robertocn@chromium.org,mmoroz@chromium.org,liaoyuke@chromium.org,sajjadm@google.com

Change-Id: I8a945239dadc84d5e1c55a94ee84e34f413e54d5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 918215
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1508457
Reviewed-by: Hans Wennborg <hans@chromium.org>
Commit-Queue: Hans Wennborg <hans@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#638561}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: a3a48425d72da578ca09184e89ef898b405550c5
2019-03-07 14:34:38 +00:00
Sajjad Mirza 2cef3110b4 Reland "Adding an exclusion list to the coverage wrapper script."
This is a reland of 6b7213a45382f01ac0a2efec1015545bd051da89

Original change's description:
> Adding an exclusion list to the coverage wrapper script.
> 
> The script now assumes GN adds coverage flags to the cflags for each
> source file. The script removes the flag if the file is in an exclusion
> list, or if `--files-to-instrument` is set it will also remove flags if
> the file is not listed in that argument.
> 
> The script supports multiple exclusion lists that can be selected with
> the `--target-os` flag.
> 
> It's expected that GN will set these flags correctly and invoke the
> script in all coverage builds. http://crrev.com/c/1496002 does that.
> 
> 
> Bug: 918215
> Change-Id: I4454f67067a083581f31a22cfef85368825789f9
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1495994
> Commit-Queue: Sajjad Mirza <sajjadm@google.com>
> Reviewed-by: Max Moroz <mmoroz@chromium.org>
> Reviewed-by: Yuke Liao <liaoyuke@chromium.org>
> Reviewed-by: Roberto Carrillo <robertocn@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#637892}

Bug: 918215
Change-Id: I1254d288ff263ff94c46b46e6be99738e31b9574
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1506974
Reviewed-by: Yuke Liao <liaoyuke@chromium.org>
Reviewed-by: Max Moroz <mmoroz@chromium.org>
Commit-Queue: Sajjad Mirza <sajjadm@google.com>
Cr-Original-Commit-Position: refs/heads/master@{#638362}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: cdc92f96b8b0e231e1e6c9cc173c9c473d10e908
2019-03-07 00:29:10 +00:00
Sajjad Mirza 7c892d012b Use the wrapper script in all coverage builds.
Previously the wrapper script would only be used for coverage builds
that required selective instrumentation of specific files. Now it
will also be used for any coverage builds.

Since the script's job is to remove flags from files that shouldn't
have them the default_coverage config now adds to cflags even in a
CQ build.

Bug: 918215
Change-Id: I012c5732d46bf5cff9eaf8f50615739bb781cc29
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1496002
Commit-Queue: Sajjad Mirza <sajjadm@google.com>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Max Moroz <mmoroz@chromium.org>
Reviewed-by: Yuke Liao <liaoyuke@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#638321}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 78d6b9950b4bd9462c226b2cc2ac1f74ad84ad6a
2019-03-06 22:55:16 +00:00
Sajjad Mirza 7180bf13be Revert "Adding an exclusion list to the coverage wrapper script."
This reverts commit 6b7213a45382f01ac0a2efec1015545bd051da89.

Reason for revert: This CL will break per-CL coverage gathering without CL 1496002, and that other CL is not ready yet.

Original change's description:
> Adding an exclusion list to the coverage wrapper script.
> 
> The script now assumes GN adds coverage flags to the cflags for each
> source file. The script removes the flag if the file is in an exclusion
> list, or if `--files-to-instrument` is set it will also remove flags if
> the file is not listed in that argument.
> 
> The script supports multiple exclusion lists that can be selected with
> the `--target-os` flag.
> 
> It's expected that GN will set these flags correctly and invoke the
> script in all coverage builds. http://crrev.com/c/1496002 does that.
> 
> 
> Bug: 918215
> Change-Id: I4454f67067a083581f31a22cfef85368825789f9
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1495994
> Commit-Queue: Sajjad Mirza <sajjadm@google.com>
> Reviewed-by: Max Moroz <mmoroz@chromium.org>
> Reviewed-by: Yuke Liao <liaoyuke@chromium.org>
> Reviewed-by: Roberto Carrillo <robertocn@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#637892}

TBR=stgao@chromium.org,robertocn@chromium.org,mmoroz@chromium.org,liaoyuke@chromium.org,sajjadm@google.com

Change-Id: I0cadb9c3d3ed0600648e273ffe58e7dc3f6ef7f8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 918215
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1504960
Reviewed-by: Yuke Liao <liaoyuke@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#638167}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 8a9b3730aaf5380049962633b72339e835c4cf72
2019-03-06 17:19:34 +00:00
Sajjad Mirza 0416321348 Adding an exclusion list to the coverage wrapper script.
The script now assumes GN adds coverage flags to the cflags for each
source file. The script removes the flag if the file is in an exclusion
list, or if `--files-to-instrument` is set it will also remove flags if
the file is not listed in that argument.

The script supports multiple exclusion lists that can be selected with
the `--target-os` flag.

It's expected that GN will set these flags correctly and invoke the
script in all coverage builds. http://crrev.com/c/1496002 does that.


Bug: 918215
Change-Id: I4454f67067a083581f31a22cfef85368825789f9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1495994
Commit-Queue: Sajjad Mirza <sajjadm@google.com>
Reviewed-by: Max Moroz <mmoroz@chromium.org>
Reviewed-by: Yuke Liao <liaoyuke@chromium.org>
Reviewed-by: Roberto Carrillo <robertocn@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#637892}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 6b7213a45382f01ac0a2efec1015545bd051da89
2019-03-05 23:23:35 +00:00
Elly Fong-Jones 7b62c8979c mac: use local dsymutil
The Xcode 9.3 dsymutil dies with "IO Error" when handling objects larger than
2**32 bytes; the upstream llvm one seems not to have this problem.

Bug: 780980
Change-Id: I6846383329bd28a65516c0ef3ad177e1a78d08f3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1500198
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Elly Fong-Jones <ellyjones@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#637756}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 99453a4326a2d09990877c4516a343028bf89f29
2019-03-05 18:59:21 +00:00
Sajjad Mirza a673c9bb79 Adding optimization flags necessary for building on MacOS.
These flags are present in build/config/coverage/BUILD.gn. They
need to be copied to the coverage script.

Bug: 918215
Change-Id: I0c5670f5e826b0640e68fd667f5b69006639b10f
Reviewed-on: https://chromium-review.googlesource.com/c/1497291
Reviewed-by: Yuke Liao <liaoyuke@chromium.org>
Reviewed-by: Max Moroz <mmoroz@chromium.org>
Commit-Queue: Sajjad Mirza <sajjadm@google.com>
Cr-Original-Commit-Position: refs/heads/master@{#636989}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 49c00e305772d381b6dd6d94799631df7af99d4a
2019-03-01 22:46:52 +00:00
Yuke Liao a311351d6d [code coverage] Add optimization cflags to coverage compiler wrapper
This CL adds "-mllvm" and "-limited-coverage-experimental=true" cflags
to the code coverage compiler wrapper because they're critical for
reducing the size of the generated binaries.

Bug: 933512
Change-Id: I0d61a36b71605fc160fea164f280206084afe302
Reviewed-on: https://chromium-review.googlesource.com/c/1493383
Auto-Submit: Yuke Liao <liaoyuke@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Max Moroz <mmoroz@chromium.org>
Commit-Queue: Max Moroz <mmoroz@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#636304}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 5eff782d191d008e48177bcf2b6b59be8154aef9
2019-02-28 03:56:24 +00:00
Shawn Anastasio 6bc75b2530 Add support for a clang toolchain on ppc64
This change allows a clang toolchain to be used on ppc64 hosts.

This change is part of the effort to upstream a set of patches
that allow chromium to build and run on ppc64le hosts available here:
https://wiki.raptorcs.com/wiki/Porting/Chromium

Change-Id: I4496523f4948c675d4d1d8e529e0f4d5bbf99b8c
Reviewed-on: https://chromium-review.googlesource.com/c/1480698
Commit-Queue: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#635290}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 878414eeeb7995e61b5ed467feb41e2799fa493b
2019-02-25 22:32:20 +00:00
Tom Anderson 4189339aba Allow goma in Linux-to-Windows cross builds
Bug: 495204
R=thakis

Change-Id: I4c2e9b0a57e7d51e487ae1671e8822b487e0f42a
Reviewed-on: https://chromium-review.googlesource.com/c/1114301
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
Auto-Submit: Thomas Anderson <thomasanderson@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Fumitoshi Ukai <ukai@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#633872}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 497ff623dc5f41044bbd3da1af25375ef061f794
2019-02-20 21:11:41 +00:00
Peter Collingbourne 3977a3971e build: Implement resource whitelisting for Windows.
With this the uncompressed size of resources.pak + locales/*.pak
decreases from 27664141 bytes to 26027031 bytes (1.6MB decrease)
and the size of mini_installer.exe decreases from 48125440 bytes
to 47843328 bytes (280KB decrease).

Build times for "touch ../../chrome/app/chrome_main.cc && ninja chrome"
(median of 3 runs) go from 8.3s to 12.1s.

This works by scanning the PDB for instantiations of
ui::WhitelistedResource in the symbol table.

Bug: 684788
Change-Id: I989b01b45b46a746c3f1707f112be89f2c4cc182
Reviewed-on: https://chromium-review.googlesource.com/c/1176979
Commit-Queue: Peter Collingbourne <pcc@chromium.org>
Reviewed-by: Richard Coles <torne@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#629416}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: c9b621de676aaa774a6683ebbb593aa343b5b387
2019-02-06 01:58:55 +00:00
Peter Collingbourne 0cd60a7310 build: Enable resource whitelisting in official builds only by default.
This helps reduce incremental build times in non-official
builds as discussed in https://chromium-review.googlesource.com/c/chromium/src/+/1176979

Bug: 684788
Change-Id: I768d5d103a26949c95f0cd702f2e6455cc63570e
Reviewed-on: https://chromium-review.googlesource.com/c/1455031
Commit-Queue: Peter Collingbourne <pcc@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#629288}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 97963e96a378a0618766b21404e4ace49e48bc3e
2019-02-05 20:34:14 +00:00
Nico Weber 036ce949f6 clang packaging: Stop uploading llvm-strip package.
Per discussion on bug.

Bug: 877080
Change-Id: I7d5c8c4a5ab6887c1cc9885b8035c3bb83a2e9b3
Reviewed-on: https://chromium-review.googlesource.com/c/1443513
Reviewed-by: Fabrice de Gans-Riberi <fdegans@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#627958}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 64dc5c6c8c83ed7da2a2262382ea55d67b994357
2019-01-31 15:32:49 +00:00
Michael Spang d7787756cb Move eu-strip from third_party/ to buildtools/third_party/
The build and builtools directories are provided to standalone projects
such as angle. Move eu-strip into buildtools so that those projects'
copy of build/ can find it.

BUG=angleproject:2475
TEST=build standalone angle with target_os="fuchsia"
NOPRESUBMIT=true

Change-Id: If3d6b9027bd01cdc67db5ef825a304016bd77a7d
Reviewed-on: https://chromium-review.googlesource.com/c/1427781
Commit-Queue: Michael Spang <spang@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#627463}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: ab3960d5245483f446edfcbf477813780ae7af8f
2019-01-30 17:06:47 +00:00
Michael Spang 4ab9949ff1 [Fuchsia] Place built libraries in ${root_out_dir}/lib
Fuchsia has a platform requirement that libraries be placed in in the
/lib directory in order to be located by the loader. We used to have a
shlib_subdir variable to satisfy such a requirement.  Bring this variable
back and set it to "/lib" on Fuchsia.

This allows us to reduce special handling of libraries during the
packaging phase. Ideally all package artifacts would be placed correctly
by the build system so that the packager doesn't have to rearrange.

Don't use abspath() in the script, either. Using absolute paths in the
build can be harmful (leaks data, causes cache misses) and is rarely
necessary.

BUG=925040
TBR=mef@chromium.org

Change-Id: Idb2d8d4a0fa493904000244332ed242790698b8b

Reviewed-on: https://chromium-review.googlesource.com/c/1434221
Reviewed-by: Michael Spang <spang@chromium.org>
Reviewed-by: Scott Graham <scottmg@chromium.org>
Reviewed-by: Kevin Marshall <kmarshall@chromium.org>
Reviewed-by: Wez <wez@chromium.org>
Commit-Queue: Michael Spang <spang@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#626877}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 8803d94e9e68fd8c0a4cd41515c22bd8aee613a5
2019-01-29 03:33:47 +00:00
Reid Kleckner 213e0a3a3d Roll clang 350768:351477.
Update VERSION from 8.0.0 to 9.0.0 in update.py and toolchain.gni.

Add -fsplit-lto-unit to account for a change in behavior in upstream
ThinLTO.

Bug: 922384, 922386
Change-Id: Ic9dbf0a9f4d8c50756b8bdb01c75782ba387bdca
Reviewed-on: https://chromium-review.googlesource.com/c/1418440
Commit-Queue: Nico Weber <thakis@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Peter Collingbourne <pcc@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#624366}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: d8927fce44de956fae4c310fa13d36be0cfc7378
2019-01-19 00:00:41 +00:00
Hans Wennborg 3c43446e52 Clang: the tip-of-tree version is now 9
TBR=thakis

Bug: 922386
Change-Id: I14856f18ea5025fd9f1fd813e3fe87bdb787a656
Reviewed-on: https://chromium-review.googlesource.com/c/1412828
Reviewed-by: Hans Wennborg <hans@chromium.org>
Commit-Queue: Hans Wennborg <hans@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#623192}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 70d9d4df426e299d1f7d68d8d6215594afe21a6d
2019-01-16 11:09:58 +00:00
Andrew Grieve eab9b1722a Disable enable_resource_whitelist_generation for Chrome OS
It was already meant to be disabled for non-Android, but chrome_os has
parts that build with is_android=true, so check target_os instead.

This fixes a GN assert when building without symbols.

Bug: 891164
Change-Id: I02f7dcede5726c3b5f5ef2a63814ae39fd83c3dd
Reviewed-on: https://chromium-review.googlesource.com/c/1381695
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: agrieve <agrieve@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#617492}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e3bbb54556d1352db69f3aae9ccc354b6ef983d2
2018-12-18 15:00:41 +00:00
Bert Belder 8fd567c834 Control windows lld-link thin archive flag with config("thin_archive")
We're trying to build a self-contained static library of V8, for
inclusion in a Cargo crate. This is part of the broader effort to make
Deno (https://github.com/denoland/deno) available as a crate.

Currently it's not possible to build 'fat' static libraries with
lld-link, because the `/llvmlibthin` flag is hard-coded into the
windows toolchain.

The equivalent on posix platforms, ar's `-T` flag, is managed by the
`thin_archive` config. This config is enabled by default, but it can be
explicitly removed from a target when necessary.

This patch changes places the `/llvmlibthin` flag under control of
config("thin_archive") also.

This causes static_library targets that use the thin_archive machinery
to not be thin archives on Windows either. There aren't many of these
targets, and this looks like a neutral-to-vaguely-good change for these
targets on Windows.

Change-Id: If756650146459c4029d7925592e32dbe74650edf
Reviewed-on: https://chromium-review.googlesource.com/c/1372633
Commit-Queue: Nico Weber <thakis@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#616162}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 69dc1ea10c3aadd5dac7f524c78471c08c6c67aa
2018-12-13 02:02:46 +00:00
Li Hao e439f60824 Only overrides v8_current_cpu in mac toolchain when declared
Sometimes we expect to build mac target without v8, but there is a
warning that v8_current_cpu is set as a build argument, but not
appeared in declare_args(). If the declaration file v8_target_cpu.gni
is not imported, we should not override it.

Change-Id: I04ef533a565fb9272aa1117ccea1bdee022f5c9a
Reviewed-on: https://chromium-review.googlesource.com/c/1369645
Commit-Queue: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#615530}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: a40281ad05cfadc7af229ed5657139b67c2beaed
2018-12-11 15:29:50 +00:00
Nico Weber 0036f4eec0 mac: Don't set DEVELOPER_DIR env var for compiles.
Compiles shouldn't shell out to non-clang processes, and we know that
clang doesn't read DEVELOPER_DIR, so this shouldn't be needed.

Bug: 780980
Change-Id: I811786f567c517aee9a82867336da7b2adb3bf44
Reviewed-on: https://chromium-review.googlesource.com/c/1358698
Reviewed-by: Erik Chen <erikchen@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#613129}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: c70ff02e893652d6b3e2f3e91bcfd47cf0320ebf
2018-12-03 17:08:23 +00:00
Bruce Dawson dcab93e47d Remove the 10.0.17134 SDK requirement for building Chromium
Until recently Chrome required the 10.0.17134 SDK to build because it
needed declarations from that SDK and there was no more recent SDK. Now
there is a more recent (10.0.17763) SDK which can also build Chrome and
the 10.0.17134 requirement is annoying.

Removing the requirement for a specific version means that some new
Chromium developer might try building with an *older* version, but that
is unlikely, and they will hit errors and will then just need to install
the latest. That is better than forcing developers to install an old SDK
version.

Bug: 907300
Change-Id: Iad5a5bb1cdab944926df030cb1adb46ae0d55b56
Reviewed-on: https://chromium-review.googlesource.com/c/1345652
Reviewed-by: Xi Cheng <chengx@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#610141}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: a0ca59f8c4afea3f4fee8e37b958c6da1fefd620
2018-11-21 19:22:06 +00:00
Jeremy Apthorp 828f659993 win: implement cc_wrapper build variable
This allows usage on windows of non-goma build wrappers (e.g.
sccache[1]) for us lowly non-googlers.

We've been using this in Electron for several months[2].

[1]: https://github.com/mozilla/sccache
[2]: d56617e5d0/patches/common/chromium/windows_cc_wrapper.patch

Change-Id: I2de68eac93bfbf3343e04b3253330dfa28e6048b
Reviewed-on: https://chromium-review.googlesource.com/c/1343518
Commit-Queue: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#609852}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 72f650d9ec3e78b9c0c3f0c5642b5a9a2a499975
2018-11-20 23:37:24 +00:00
Daniel Bratell 5eb00e9b07 Update some documentation for the binary_size tool
The documentation didn't include the crucial information
that generate_linker_map has to be set to true in gn for the tool
to work in Linux.

Bug: 716209
Change-Id: I62919e26a80a0b5d592f6b8953762e35575142d2
Reviewed-on: https://chromium-review.googlesource.com/c/1338085
Reviewed-by: agrieve <agrieve@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Original-Commit-Position: refs/heads/master@{#609686}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 9d63558169c2945762c05b2809200736a40dcee2
2018-11-20 14:10:57 +00:00
Max Moroz 5f7104c3d7 [CSA] Remove an obsolette flag for Clang Static Analyzer.
That flag is now always enabled by default (https://reviews.llvm.org/D51251)
and the analyzer errors out when the flag is passed via command line.

Also adding myself as an owner for Clang Static Analyzer and Code Coverage
related files.

Bug: 901486, 759794
Change-Id: I54c9988c79f13287bb0580637d1a3ae4aa46bba7
Reviewed-on: https://chromium-review.googlesource.com/c/1330758
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Max Moroz <mmoroz@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#608199}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 7d3437a87caa2a437ab665579234ce4a6d2d2088
2018-11-15 00:49:40 +00:00
Tom Tan fd152b1b6c Add Windows arm64 target triple to clang-cl command line.
This change enables "is_clang=true" of Chromium build for Windows ARM64.

This change works with current clang-cl.exe in chromium repo mostly, except cannot compiling code with __try/__except. The fix of this compilation issue is under review in LLVM community (see below link).

https://reviews.llvm.org/D53540

Bug: 893460
Change-Id: I3fbc943c9fd04e325b3a9686ce80202dc0f27238
Reviewed-on: https://chromium-review.googlesource.com/c/1330355
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#607667}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: a17557eb9c36da233012d29da184fffe2b3d99ec
2018-11-13 18:38:31 +00:00
Yuke Liao 6a59547c6a [code coverage] Hook coverage wrapper to build toolchains
This CL hooks the Clang code coverage wrapper into the build
toolchains, and specifically, a new build flag:
coverage_instrumentation_input_file is added to allow turning on/off
the wrapper and pass the list-files-to-instrument around.

Bug: 898695
Change-Id: I405ccbfc1796afa44534794d711f2953fac78f6d
Reviewed-on: https://chromium-review.googlesource.com/c/1309999
Commit-Queue: Yuke Liao <liaoyuke@chromium.org>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#604858}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 9619c7100bab3b50c280efd021f92722bd1ab48e
2018-11-02 07:18:09 +00:00
Yuke Liao e527eb4225 [Code Coverage] Implement Clang code coverage compiler wrapper
This CL implements the Clang code coverage compiler wrapper, which can
be used to instrument a subset of source files, and the main use case
is to enable generating code coverage reports at per-cl level during
try jobs.

This CL only focuses on the wrapper itself, how to hook this wrapper
into the build system will be addressed in a separate CL.

Bug: 898695
Change-Id: Idb21640b5566ce78089059b3d0116390b488a383
Reviewed-on: https://chromium-review.googlesource.com/c/1301969
Commit-Queue: Yuke Liao <liaoyuke@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#604381}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: bb571bd6cb0a1fbbf5132f114a46801854c6fdf7
2018-10-31 21:51:52 +00:00
Yuke Liao 277ad43041 Refactoring gcc_toolchain compiler wrappers
This CL is pure non-op refactoring, it simplies the structure of
existing compiler wrappers and makes it easier to add new wrappers.

Specifically, this CL maintains the following behaviors:
1. When goma is off and static_analyzer is off:
cxx command: clang++ <flags>
asm command: clang <flags>
2. When goma is on and static_analyzer is off:
cxx command: gomacc clang++ <flags>
asm command: gomacc clang <flags>
3. When goma is off and static_analyzer is on:
cxx command: analyzer_wrapper.py clang++ <flags>
asm command: clang <flags>
4. When goma is on and static_analyzer is on:
cxx command: analyzer_wrapper.py gomacc clang++ <flags>
asm command: gomacc clang <flags>

Basically, goma wapper applies to both cxx and asm while
static_analyzer only applies to cxx.


Bug: 898695
Change-Id: I12ed474d1286daa9fdc2f7ab5611745e99dd66a3
Reviewed-on: https://chromium-review.googlesource.com/c/1307847
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Yuke Liao <liaoyuke@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#604098}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: d7ce006f2538789b89d0e3efdd0fac630d069e8a
2018-10-31 01:31:36 +00:00
Nico Weber c92428fe70 Minor tweaks to ml.py.
- Remove a partial comment fragment left over from before I rewrote the comment.

- Check all sections for absence of line numbers; stopping at debug_section_index
  was a leftover from when I thought the debug section was always last

No intended behavior change.

Bug: none
Change-Id: Ie278420ed2959fe7dc473cf0739fe54c45af1380
Reviewed-on: https://chromium-review.googlesource.com/c/1306645
Reviewed-by: Hans Wennborg <hans@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#603874}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: b1426e9d748920ca9d44d5f2eae0920d9da51631
2018-10-30 13:12:11 +00:00
Nico Weber 7e3b8c90bc win: Add hacky ml.exe wrapper that makes ml's output deterministic after the fact.
Without this, chrome.exe.pdb contains two absolute paths (to the two obj files
built by ml64 for crashpad).

Bug: 762167,330260,899438
Change-Id: If4e0195b51f7d9ff70d890fe3a5302f5961c94d6
Reviewed-on: https://chromium-review.googlesource.com/c/1303887
Reviewed-by: Reid Kleckner <rnk@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#603852}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: de2f0bfe2c61fe2a823640d2f5ffcada755cac59
2018-10-30 10:21:53 +00:00
Nico Weber 3d42c90ba4 win: Pass /nologo to rc.exe, simplify wrapper code a bit.
We used to have a comment saying "Older versions of RC don't support the
/nologo flag", but since we've been requiring MSVC 2017 for a long time now,
using `rc /nologo` should be safe by now.

No intended behavior change.

Bug: none
Change-Id: If13d1d3fc4647daada3af5ade526e6f774a9fb7c
Reviewed-on: https://chromium-review.googlesource.com/c/1303882
Reviewed-by: Scott Graham <scottmg@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#603534}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e874adda0d5fc60397c72eb4897b0c1a528ac0d4
2018-10-29 17:09:23 +00:00
Nico Weber bf947e347e win: Pass /nologo to ml / ml64 instead of filtering out logo in wrapper.
We still need the wrapper to set the env and to filter out ' Assembling: foo',
but less wrapper is probably better.

No intended behavior change.

Bug: none
Change-Id: Id8c165294cc3cf0ba7fc74f86a6a8fb9f8bfa042
Reviewed-on: https://chromium-review.googlesource.com/c/1303883
Reviewed-by: Scott Graham <scottmg@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#603533}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 6a285c4f6b31a63cc91bb25d4688768d9a6639f7
2018-10-29 17:09:04 +00:00
Tom Tan 47b1e3d07e Add Windows ARM64 support to Chromium build scripts.
This change mostly contains build script change under //chrome/build only.
It is targeting MSVC arm64 toolset, but enable clang-cl
could be based on this change.

Bug: 893460
Change-Id: Ia6f69f067a97fcaeb77021c1019bc594b0859eda
Reviewed-on: https://chromium-review.googlesource.com/c/1272076
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Steven Valdez <svaldez@chromium.org>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#600083}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: d5bf20624a99401dcb6c9e6aee9244334008222b
2018-10-16 19:37:14 +00:00
andrew-cc-chen 59021222cc [s390] added clang toolchain for s390x
Change-Id: I152104e5281e45454c25e0c22958737b7f1ac48c
Reviewed-on: https://chromium-review.googlesource.com/c/1273818
Reviewed-by: agrieve <agrieve@chromium.org>
Commit-Queue: agrieve <agrieve@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#598625}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 16dcfadaa3443e1ad0cd6d91be2cd8abe8b0623f
2018-10-11 01:40:04 +00:00
Andrew Grieve f5c7f61a56 Reland: Android: Make enable_resource_whitelist_generation GN arg work when setting to true
Also:
 * Default the arg to true for all release builds that contain debug info.
   (most bots set strip_debug_info=true though)
 * Add better failure messages for when no debug info is present.

This reverts commit 3a9bbf84099f2b522a599a8456a134bbd104c968.

Reason for reland: Has fixes for:
 * !is_debug && is_component_build
 * cronet bots (which set is_official=true and strip debug info)

TBR=agrieve

Bug: 864878
Change-Id: I99966ee4e12a0277951616159c844d4d94acaf1f
Reviewed-on: https://chromium-review.googlesource.com/1212347
Reviewed-by: agrieve <agrieve@chromium.org>
Commit-Queue: agrieve <agrieve@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#591036}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: cc6ba940be2d6fa4074e085978f58d513ccaf2d8
2018-09-13 16:21:23 +00:00
Bernhard Bauer fbf420eefc Revert "Android: Make enable_resource_whitelist_generation GN arg work when setting to true"
This reverts commit 90205fffe287a2bb9c4dbb288b8d8872ff2cee22.

Reason for revert: Breaks cronet build; see e.g. https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8936264155658998032/+/steps/generate_build_files/0/stdout

Original change's description:
> Android: Make enable_resource_whitelist_generation GN arg work when setting to true
> 
> Also:
>  * Default the arg to true for all release builds that contain debug info.
>    (most bots set strip_debug_info=true though)
>  * Add better failure messages for when no debug info is present.
> 
> Bug: 864878
> Change-Id: Ied849d6e24a672b896c802be6df6c0958ecabfe0
> Reviewed-on: https://chromium-review.googlesource.com/1142193
> Commit-Queue: agrieve <agrieve@chromium.org>
> Reviewed-by: Richard Coles <torne@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#588734}

TBR=torne@chromium.org,pcc@chromium.org,agrieve@chromium.org,lizeb@chromium.org

Change-Id: Ia7ca1c880cb1f2d5b8eda7f458cb0a3b2b8133ba
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 864878
Reviewed-on: https://chromium-review.googlesource.com/1206334
Reviewed-by: Bernhard Bauer <bauerb@chromium.org>
Commit-Queue: Bernhard Bauer <bauerb@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#588844}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 3a9bbf84099f2b522a599a8456a134bbd104c968
2018-09-05 13:12:51 +00:00
Andrew Grieve dffa2e89fe Android: Make enable_resource_whitelist_generation GN arg work when setting to true
Also:
 * Default the arg to true for all release builds that contain debug info.
   (most bots set strip_debug_info=true though)
 * Add better failure messages for when no debug info is present.

Bug: 864878
Change-Id: Ied849d6e24a672b896c802be6df6c0958ecabfe0
Reviewed-on: https://chromium-review.googlesource.com/1142193
Commit-Queue: agrieve <agrieve@chromium.org>
Reviewed-by: Richard Coles <torne@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#588734}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 90205fffe287a2bb9c4dbb288b8d8872ff2cee22
2018-09-05 01:36:28 +00:00
Hans Wennborg 05d482344f Roll clang 338452:340925
Update clang_version from 7.0.0 to 8.0.0 and remove the code to remove
the old library directory.

Remove the _LIBCPP_HIDE_FROM_ABI define, it is no longer needed.

R=hans@chromium.org,thakis@chromium.org

Bug: 871418, 872926
Change-Id: Ibf6734500aa75a349fa772b225b8b15fddfe3661
Reviewed-on: https://chromium-review.googlesource.com/1194698
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Hans Wennborg <hans@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#587602}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: d54494cbad8d5ff0a8cd74024902c8bd86258ae4
2018-08-30 15:59:01 +00:00
Fabrice de Gans-Riberi ed29828362 [Fuchsia] Add Mac build support.
This adds support to build Chromium for Fuchsia on macOS. Currently,
this configuration is to be treated as best-effort.

CQ_INCLUDE_TRYBOTS=luci.chromium.try:fuchsia_arm64_cast_audio;luci.chromium.try:fuchsia_x64_cast_audio

Bug: 707030
Test: Locally, builds on mac.
Change-Id: I9e4bde1b7ff658f51586856ae80598c93a2b2e33
Reviewed-on: https://chromium-review.googlesource.com/1185020
Reviewed-by: John Budorick <jbudorick@chromium.org>
Reviewed-by: Kevin Marshall <kmarshall@chromium.org>
Reviewed-by: Wez <wez@chromium.org>
Commit-Queue: Fabrice de Gans-Riberi <fdegans@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#587546}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: bbc67a1bd5cc611039aef8c6a2f9fa7151a07735
2018-08-30 13:19:21 +00:00
Reid Kleckner ed45ee2269 Revert "Roll clang 338452:340740"
This reverts commit 6c2527114e7363fe0656c4aaca8e580ae26b1a5b.

Reason for revert: Breaks Google Chrome Linux x64 bot somehow:
https://ci.chromium.org/buildbot/chromium.chrome/Google%20Chrome%20Linux%20x64/35385

LINK ./chrome step fails with null pointer assertion in isa<ReturnInst>.

Original change's description:
> Roll clang 338452:340740
> 
> Update clang_version from 7.0.0 to 8.0.0 and remove the code to remove
> the old library directory.
> 
> Remove the _LIBCPP_HIDE_FROM_ABI define, it is no longer needed.
> 
> Bug: 871418, 872926
> Change-Id: Ic02dcfbf17c4190fc4359271d880b7e65bf7ba27
> Reviewed-on: https://chromium-review.googlesource.com/1182196
> Commit-Queue: Reid Kleckner <rnk@chromium.org>
> Reviewed-by: Dirk Pranke <dpranke@chromium.org>
> Reviewed-by: Peter Collingbourne <pcc@chromium.org>
> Reviewed-by: Hans Wennborg <hans@chromium.org>
> Reviewed-by: Nico Weber <thakis@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#586816}

TBR=thakis@chromium.org,hans@chromium.org,rnk@chromium.org,dpranke@chromium.org,pcc@chromium.org

Change-Id: Ib32fe653d23cd7d4ce27d4cfc20faf2eec2a6ce0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 871418, 872926
Reviewed-on: https://chromium-review.googlesource.com/1194830
Reviewed-by: Reid Kleckner <rnk@chromium.org>
Commit-Queue: Reid Kleckner <rnk@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#586839}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 7cb8c3d3ef8f1e0d24e7986de28f885d1e394242
2018-08-28 20:45:18 +00:00
Reid Kleckner 646bddd937 Roll clang 338452:340740
Update clang_version from 7.0.0 to 8.0.0 and remove the code to remove
the old library directory.

Remove the _LIBCPP_HIDE_FROM_ABI define, it is no longer needed.

Bug: 871418, 872926
Change-Id: Ic02dcfbf17c4190fc4359271d880b7e65bf7ba27
Reviewed-on: https://chromium-review.googlesource.com/1182196
Commit-Queue: Reid Kleckner <rnk@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Peter Collingbourne <pcc@chromium.org>
Reviewed-by: Hans Wennborg <hans@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#586816}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 6c2527114e7363fe0656c4aaca8e580ae26b1a5b
2018-08-28 19:43:10 +00:00
Nico Weber e7f4f601bf Remove some obsolete TODO(GYP)s.
Since we didn't do them yet, they probably weren't important.

Bug: none
Change-Id: Ifbb2da04f2f6b0f3b125a7dbaa8ab732bd77fc6b
Reviewed-on: https://chromium-review.googlesource.com/1187013
Reviewed-by: agrieve <agrieve@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#585578}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: f6ef36933fc37baad14312c3232d4338fca0914d
2018-08-23 19:43:30 +00:00
Takuto Ikuta 674f1ecc7f Reland "Relativize cros compiler path"
This is a reland of be7c12590cbdbcf40ce36fcc3996ad9e3982100d

chromeos's simple chrome and build_package set additional flags in cc/cxx.
This CL checks that before relativize compiler path.

Original change's description:
> Relativize cros compiler path
>
> Combined with https://chromium-review.googlesource.com/c/chromiumos/chromite/+/1180801
> this patch removes absolute path from command line for simple chrome build.
>
> This is a part of effort for build cache sharing when using goma by
> removing absolute path from compile result.
>
> Bug: chromium:846610
> Change-Id: Ia40a7194b4e485f26424f27ebfc210355e352cc0
> Reviewed-on: https://chromium-review.googlesource.com/1180826
> Reviewed-by: Dirk Pranke <dpranke@chromium.org>
> Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#584648}

Bug: chromium:846610
Change-Id: I142f6b466be0147252b419abca8abd87cb099ee1
Reviewed-on: https://chromium-review.googlesource.com/1183121
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#584959}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 1fa6069561057a05c66dc1a7e5b3c5a4beb519c6
2018-08-22 04:11:11 +00:00
Yoshifumi Inoue a853806eb3 Revert "Relativize cros compiler path"
This reverts commit be7c12590cbdbcf40ce36fcc3996ad9e3982100d.

Reason for revert: Can't find gold.
/bin/sh: 1: ../../build/toolchain/cros/build/cros_cache/chrome-sdk/tarballs/daisy+10974.0.0+target_toolchain/usr/x86_64-pc-linux-gnu/armv7a-cros-linux-gnueabi/binutils-bin/2.27.0-gold: not found






Original change's description:
> Relativize cros compiler path
> 
> Combined with https://chromium-review.googlesource.com/c/chromiumos/chromite/+/1180801
> this patch removes absolute path from command line for simple chrome build.
> 
> This is a part of effort for build cache sharing when using goma by
> removing absolute path from compile result.
> 
> Bug: chromium:846610
> Change-Id: Ia40a7194b4e485f26424f27ebfc210355e352cc0
> Reviewed-on: https://chromium-review.googlesource.com/1180826
> Reviewed-by: Dirk Pranke <dpranke@chromium.org>
> Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#584648}

TBR=vapier@chromium.org,dpranke@chromium.org,tikuta@chromium.org,manojgupta@chromium.org

Change-Id: I93891636a39e5b72f019f262c297c4f07239d0e2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:846610
Reviewed-on: https://chromium-review.googlesource.com/1182882
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#584649}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 347fb734c75d4e79e37eacfc43500acde1aa7584
2018-08-21 04:24:52 +00:00
Takuto Ikuta 3ab629996d Relativize cros compiler path
Combined with https://chromium-review.googlesource.com/c/chromiumos/chromite/+/1180801
this patch removes absolute path from command line for simple chrome build.

This is a part of effort for build cache sharing when using goma by
removing absolute path from compile result.

Bug: chromium:846610
Change-Id: Ia40a7194b4e485f26424f27ebfc210355e352cc0
Reviewed-on: https://chromium-review.googlesource.com/1180826
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#584648}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: be7c12590cbdbcf40ce36fcc3996ad9e3982100d
2018-08-21 04:09:31 +00:00
Peter Collingbourne cbc08db949 grit: Replace current resource whitelisting implementation with a better one.
The new implementation works by embedding debug info in object
files instead of parsing compiler warning output. As a result,
our official builds are much less noisy. See the new header file
ui/base/resource/whitelist.h for details on how it works.

It is also simpler because it does not rely on wrapper scripts for
collecting the set of whitelisted resource ids. As a result we no
longer need, and can remove, the wrapper scripts for the compiler
and ar.

It is also theoretically more precise because it only whitelists
resource ids mentioned in archive members that were chosen by the
linker, although I didn't see an improvement in monochrome. It may
be possible to gain even more precision by extending the compiler
(see comments on bug) but first we'd need to investigate whether that
would be worth it.

Bug: 648475, 684788
Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: I12d83a8aaffa42c3afcdcc834f7dd7536b7a9248
Reviewed-on: https://chromium-review.googlesource.com/1174012
Reviewed-by: Eugene But <eugenebut@chromium.org>
Reviewed-by: Richard Coles <torne@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: agrieve <agrieve@chromium.org>
Reviewed-by: Steven Holte <holte@chromium.org>
Commit-Queue: Peter Collingbourne <pcc@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#584129}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: f26ebd65019e400184adad499c73264140c8fa96
2018-08-17 18:24:22 +00:00
Tom Bridgwater 4a55cb057a Update URL for GN quick start guide.
Change-Id: I8c76cf49161daf8cccaa1cfc32db8fcd930f01da
Reviewed-on: https://chromium-review.googlesource.com/1178692
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Dirk Pranke <dpranke@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#583909}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: eef401541bd009e7e7d502f49d0a0bd01efbc4d7
2018-08-17 00:54:43 +00:00
Takuto Ikuta f79db013c7 Use gomacc for host compiler in simple chrome build
I switched to use gomacc injection for chromeos toolchain in below CL.
https://chromium-review.googlesource.com/c/chromium/src/+/1151040

But simple chrome build also uses host compiler that does not know GOMACC_PATH
envvar. This CL revived goma's power for such toolchain.

This CL should be landed after cros side fix.
https://chromium-review.googlesource.com/c/chromiumos/chromite/+/1168277

And above CL was rolled.
https://chromium-review.googlesource.com/1168416

Bug: 872536
Change-Id: I938de4aea6c39b633a31cf1668ac147a9c6d0807
Reviewed-on: https://chromium-review.googlesource.com/1168275
Reviewed-by: Alexander Alekseev <alemate@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#582047}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 23b381af6c82c38b1f47bec61e022519977b99b8
2018-08-10 04:11:20 +00:00
Nico Weber c39b580d6e win: Stop deleting pdb file before links in official builds.
Reverts https://codereview.chromium.org/2519803003 , it shouldn't be needed
with lld.

(Running `ninja -t msvc` directly means ninja doesn't have to be in PATH,
since then clause 1 of how CreateProcessA() finds binaries can take effect:

1. The directory from which the application loaded.

Due to the delete, `ninja -t msvc` was run under `cmd /c`, which means we
did require ninja in PATH only for official builds. This removes this exception.
But we're also making sure ninja is in PATH for now until crbug.com/872740
is resolved, so this change is more a defense-in-depth thing.)

Bug: 665773,828472,828466
Change-Id: Ic86b255df1544fcb4744ff4d2bf1f3f0b25119c3
Reviewed-on: https://chromium-review.googlesource.com/1169302
Reviewed-by: Sébastien Marchand <sebmarchand@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#581905}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 15670f7fb95f709a9c6d71cf24e7707a161e7664
2018-08-09 21:37:19 +00:00
Hans Wennborg f77b34e2ea Clang: the tip-of-tree version is now 8.0.0svn
It was bumped in LLVM r338537.

R=thakis,rnk

Bug: 869850
Change-Id: Ida95943088bdf8921b5974e7e80a80e2739db01b
Reviewed-on: https://chromium-review.googlesource.com/1158580
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Hans Wennborg <hans@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#579800}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 6a6bf055c5b76e92201c13cb0c7f11ddb00247ba
2018-08-01 14:47:00 +00:00
Takuto Ikuta e9eade234d Support GOMACC_PATH env injection
Currently, compilation of simple chrome build is done like below.
gomacc -> chromeos's compiler wrapper -> actual compiler binary

But chromeos's compiler wrapper modifies some flags inside it before invoking actual compiler binary.
This prevents goma from knowing some information for build cache sharing.

To know all the flags passed to compiler binary, this change supports the way not using gomacc prefix.
If we set has_gomacc_path = true, we don't prepend gomacc and lets compiler wrapper find gomacc from GOMACC_PATH env and invoke gomacc inside wrapper.
By doing this, gomacc can know all the flags passed to compiler binary.

This is a part of effort to share build cache between goma users for simple chrome build.

chromite side change is
https://chromium-review.googlesource.com/c/chromiumos/chromite/+/1140099

BUG=chromium:846610

Change-Id: I84174b12a7f286d1b911f4d0a4e167883a4891c7
Reviewed-on: https://chromium-review.googlesource.com/1151040
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#579680}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 38a4180eac8c50a8cee10c867665bc354e1b6702
2018-08-01 03:07:37 +00:00
Sergiy Byelozyorov 385916c37b Allow to override whether stripped/unstripped binaries are used as runtime deps
In particular, this will be used in V8 Android perf tests, so that release
binaries are included into the isolate. We can not use unstripped binaries,
since they are slower and do not represent performance experienced by our uses.

R=agrieve@chromium.org

Bug: 838864
Change-Id: Ieaa9b2007d85b7868bd8f4c793baededde355757
Reviewed-on: https://chromium-review.googlesource.com/1143364
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: agrieve <agrieve@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#576541}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 110b23e7df8a18f0d4762a1b735a93f87210b3c0
2018-07-19 17:28:23 +00:00
Takuto Ikuta 379377c701 Do not use wrapper for link in win cross build
This is follow up of
f7d47b7e8c

This CL specifies libpath explicitly for LIB directories.

Bug: 854849, 787903
Change-Id: I9b65b0c0980af1f7eb4ece2ffbb31d8bde44e7ce
Reviewed-on: https://chromium-review.googlesource.com/1109452
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#569486}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 054eb9147e0a877d52410a18c948035fa6062381
2018-06-22 01:15:57 +00:00
Takuto Ikuta 7ccebdabd9 Increase the number of concurrent link when symbol_level is less than 2
This is mainly for compile step time improve for android-kitkat-arm-rel builder
having symbol_level=1

I measured peak memory usage when link some large targets with android-kitkat-arm-rel builder's config.

libchrome.so: 4776232 KB
lib_unit_tests__library.so: 5308156 KB
lib_components_unittests__library.so: 5383500 KB

So 6GB will be sufficient for such builder. This also increase parallelism of proguard steps too.

Bug: 804251
Change-Id: I7e8785ae3f14d8ba1f45da532585d7c61875d321
Reviewed-on: https://chromium-review.googlesource.com/1104280
Reviewed-by: agrieve <agrieve@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#569237}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 7dcf98f916babd3eae8f330824fcecdf97bd175c
2018-06-21 13:20:35 +00:00
Takuto Ikuta 5175f04ed2 Do not use tool-wrapper for lld link
When building chrome on windows, tool-wrapper for linking is called 794 times.
And I found that calling python wrapper is relatively slow than calling link via ninja.

This CL replaces python wrapper to ninja wrapper to remove such overhead when we use lld.

I compared time of wrapper invocation using following powershell script.

for ($i = 0; $i -lt 100; $i++) {
    # ninja -t msvc -e environment.x64 -- C:/src/depot_tools/win_tools-2_7_6_bin/python/bin/python.exe -c ' '
    # python.exe ../../build/toolchain/win/tool_wrapper.py link-wrapper environment.x64 False C:/src/depot_tools/win_tools-2_7_6_bin/python/bin/python.exe -c ' ' # code for FlushFileBuffers is commented out.
}

* ninja wrapper, 7.451s for 100 invocation
* python wrapper, 17.803s for 100 invocation
Using ninja as env wrapper is more than 2 times faster.

Bug: 787903
Change-Id: I6531b59a6c43085782b0138a264ecfc9a6f65833
Reviewed-on: https://chromium-review.googlesource.com/1107678
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#568836}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: f7d47b7e8c03400343d4b6753ff79ade9d09ca68
2018-06-20 14:41:09 +00:00
Bruce Dawson f29a733cc2 Revert "Check for LNK1201 and retry links when it occurs"
This reverts commit 798beff16c2ecc066861f848fb03611c3449ffab.

Reason for revert: The original bug has been made irrelevant by the
switch to lld, so this workaround is no longer needed. Additionally,
crbug.com/817797 reports a failure sort of *caused* by this
workaround.

Original change's description:
> Check for LNK1201 and retry links when it occurs
>
> LNK1201 seems to be happening increasingly frequently on our debug x64
> builds for no clear reason. Subsequent builds tend to succeed so this
> change updates our link wrapper to retry links when this error is hit.
>
> This retry logic may solve the problem. If not then it gives us more
> evidence about the problem, including a backup copy of the PDB that
> might be helpful in investigating.
>
> Bug: 782660
> Change-Id: Iad60648425a01e07a20d108fcc5b74acaead9ee8
> Reviewed-on: https://chromium-review.googlesource.com/769333
> Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
> Reviewed-by: Dirk Pranke <dpranke@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#516769}

R=dpranke@chromium.org,brucedawson@chromium.org

Bug: 782660,817797
Change-Id: Ifd03fecabdb462328898c7ef5253406cab2c570c
Reviewed-on: https://chromium-review.googlesource.com/1103377
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#568070}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: ac6758acc18dae70639b219e933955dfcd5f7fcb
2018-06-18 18:07:43 +00:00
Nico Weber 68d13d8434 win: Only quote /I and -imsvc flags if needed.
After https://chromium-review.googlesource.com/1075947, quoting is
never needed with the hermetic msvc toolchain, so let's make the
build command a tiny bit nicer in that scenario.

Bug: 640000,439949
Change-Id: I22e3470057b43fb6a5df3f675bc95a7d84dce9c9
Reviewed-on: https://chromium-review.googlesource.com/1101557
Commit-Queue: Nico Weber <thakis@chromium.org>
Reviewed-by: Scott Graham <scottmg@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#567401}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: b2293631d4e6450376aa4c8f21e593b4cc2824e1
2018-06-14 20:53:23 +00:00
Takuto Ikuta a73dc046b2 win: check drive letter before relativize include path
Bug: 847738
Change-Id: I49a8cbcaad484f8044a0196901b8cf6140b39388
Reviewed-on: https://chromium-review.googlesource.com/1080357
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#563148}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 3bee3633680db062b91d1d36e2911f13572284ed
2018-05-31 04:06:48 +00:00
Takuto Ikuta 10a93c2ce7 Relativize include dir for windows build
When we use relativized include dir, /showIncludes shows relativized
path for the files in include dir.

This is an effort of removing absolute path from compiling output.

Bug: 439949
Change-Id: I056cd8bb08c10f01855ef3bdb56ea1bcce1b769b
Reviewed-on: https://chromium-review.googlesource.com/1075947
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#562599}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: bed53c80fd3aa103d419bae8523beddbd89d679f
2018-05-29 21:35:45 +00:00
Nico Weber 7ca383cda4 Set use_lld = false in nacl toolchains and reland "Let lld emit colored diagnostics when invoked from ninja."
This reverts commit 18da5f23138a86e9142cbebc5b0ef44291d9569a.

Reason for revert: The original commit broke the CFI bot with errors like:

  src/native_client/toolchain/linux_x86/pnacl_newlib/bin/../x86_64-nacl/bin/ld:
      unrecognized option '--color-diagnostics'

I do not know why this only happened on the CFI bot (XXX), but since we only add
-fuse-ld=lld if !is_nacl, we should set use_lld to false in the nacl toolchains,
which fixes this, and probably many future issues like it.

Original change's description:
> Revert "Let lld emit colored diagnostics when invoked from ninja."
>
> This reverts commit 00db3ddc4c4f9ebd4d95ad44ea4ef74415c66394.
>
> Reason for revert: Breaks Linux CFI build here: https://ci.chromium.org/buildbot/chromium.memory/Linux%20CFI/8024
>
> Original change's description:
> > Let lld emit colored diagnostics when invoked from ninja.
> >
> > Bug: 841221
> > Change-Id: I72d13c78a2c623865a4f29542d25f6b3488b350b
> > Reviewed-on: https://chromium-review.googlesource.com/1067460
> > Reviewed-by: Reid Kleckner <rnk@chromium.org>
> > Commit-Queue: Nico Weber <thakis@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#560343}
>
> TBR=thakis@chromium.org,rnk@chromium.org
>
> Change-Id: I3811083daa622dca605ca32be5cc4c7098b60b4a
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 841221
> Reviewed-on: https://chromium-review.googlesource.com/1067949
> Reviewed-by: Tommy Li <tommycli@chromium.org>
> Commit-Queue: Tommy Li <tommycli@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#560345}

TBR=thakis@chromium.org,rnk@chromium.org,tommycli@chromium.org

Change-Id: I5d4c9298e3613ab84650f081a59715880d780805
Bug: 841221
Reviewed-on: https://chromium-review.googlesource.com/1068218
Commit-Queue: Reid Kleckner <rnk@chromium.org>
Reviewed-by: Reid Kleckner <rnk@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#560676}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 979ca1f97abdc13a5bd9605ca5bfd21cae211c42
2018-05-22 17:28:20 +00:00
Bruce Dawson 2273e4bf46 Reland "Switch to VS 2017 15.7.1 with 10.0.17134.0 SDK"
This is a reland of 5a7f3c442684be5eeb244b904bbfc8e6edaf6fda

goma now supports this compiler and the new warnings were dealt with.

Original change's description:
> Switch to VS 2017 15.7.1 with 10.0.17134.0 SDK
>
> This change switches the VS 2017 package to use VS 2017 Update 7.1 while
> using the 10.0.17134.12 SDK. The new SDK is needed to support new HDR
> features, and to stop forcing external developers to install an old
> ([Spring] Creators Update) SDK. This change will also bring in a new
> linker and other build tools, but the version of clang-cl will be
> unchanged.
>
> Packaging was done on a Windows Server 2016 VM, cleanly created for this
> purpose.
>
> Compiler was packaged up by downloading VS 2017 Update 7.1, from
> https://www.visualstudio.com/vs/, and then passing these parameters to
> the installer:
>
>     --add Microsoft.VisualStudio.Workload.NativeDesktop
>     --add Microsoft.VisualStudio.Component.VC.ATLMFC --includeRecommended
>     --passive
>
> Then Add or Remove Programs was used to modify the 10.0.17134.0 SDK to add
> the Debuggers package.
>
> Then the packaging script was run like this:
>
>   python depot_tools\win_toolchain\package_from_installed.py 2017 -w 10.0.17134.0
>
> Bug: 773476
> Change-Id: Ic819f3ae79d7e869227bf33fbb8d202e2f57039b
> Reviewed-on: https://chromium-review.googlesource.com/1054027
> Reviewed-by: Nico Weber <thakis@chromium.org>
> Reviewed-by: Dirk Pranke <dpranke@chromium.org>
> Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#559033}

Bug: 773476,834213
Change-Id: I903158f9dfa604f250010a7047496509f51782e7
Reviewed-on: https://chromium-review.googlesource.com/1066130
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#560002}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 82a5f004e0e52897a6e8bac10490a14fc2845625
2018-05-18 20:05:49 +00:00
Bruce Dawson aa787a64fe Revert "Switch to VS 2017 15.7.1 with 10.0.17134.0 SDK"
This reverts commit 5a7f3c442684be5eeb244b904bbfc8e6edaf6fda.

Reason for revert: this breaks v8's VC++ goma builds, reverting until
goma is updated to support this compiler

Original change's description:
> Switch to VS 2017 15.7.1 with 10.0.17134.0 SDK
> 
> This change switches the VS 2017 package to use VS 2017 Update 7.1 while
> using the 10.0.17134.12 SDK. The new SDK is needed to support new HDR
> features, and to stop forcing external developers to install an old
> ([Spring] Creators Update) SDK. This change will also bring in a new
> linker and other build tools, but the version of clang-cl will be
> unchanged.
> 
> Packaging was done on a Windows Server 2016 VM, cleanly created for this
> purpose.
> 
> Compiler was packaged up by downloading VS 2017 Update 7.1, from
> https://www.visualstudio.com/vs/, and then passing these parameters to
> the installer:
> 
>     --add Microsoft.VisualStudio.Workload.NativeDesktop
>     --add Microsoft.VisualStudio.Component.VC.ATLMFC --includeRecommended
>     --passive
> 
> Then Add or Remove Programs was used to modify the 10.0.17134.0 SDK to add
> the Debuggers package.
> 
> Then the packaging script was run like this:
> 
>   python depot_tools\win_toolchain\package_from_installed.py 2017 -w 10.0.17134.0
> 
> Bug: 773476
> Change-Id: Ic819f3ae79d7e869227bf33fbb8d202e2f57039b
> Reviewed-on: https://chromium-review.googlesource.com/1054027
> Reviewed-by: Nico Weber <thakis@chromium.org>
> Reviewed-by: Dirk Pranke <dpranke@chromium.org>
> Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#559033}

TBR=thakis@chromium.org,dpranke@chromium.org,hubbe@chromium.org,brucedawson@chromium.org

Change-Id: Ib8e84084a9717dafa6616f132b4824d93cbf39bf
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 773476
Reviewed-on: https://chromium-review.googlesource.com/1063810
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#559471}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 7ad7e759dd35a114375a671f02669c9a0283bea1
2018-05-17 09:35:36 +00:00
Bruce Dawson 74bdaa2547 Switch to VS 2017 15.7.1 with 10.0.17134.0 SDK
This change switches the VS 2017 package to use VS 2017 Update 7.1 while
using the 10.0.17134.12 SDK. The new SDK is needed to support new HDR
features, and to stop forcing external developers to install an old
([Spring] Creators Update) SDK. This change will also bring in a new
linker and other build tools, but the version of clang-cl will be
unchanged.

Packaging was done on a Windows Server 2016 VM, cleanly created for this
purpose.

Compiler was packaged up by downloading VS 2017 Update 7.1, from
https://www.visualstudio.com/vs/, and then passing these parameters to
the installer:

    --add Microsoft.VisualStudio.Workload.NativeDesktop
    --add Microsoft.VisualStudio.Component.VC.ATLMFC --includeRecommended
    --passive

Then Add or Remove Programs was used to modify the 10.0.17134.0 SDK to add
the Debuggers package.

Then the packaging script was run like this:

  python depot_tools\win_toolchain\package_from_installed.py 2017 -w 10.0.17134.0

Bug: 773476
Change-Id: Ic819f3ae79d7e869227bf33fbb8d202e2f57039b
Reviewed-on: https://chromium-review.googlesource.com/1054027
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#559033}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 5a7f3c442684be5eeb244b904bbfc8e6edaf6fda
2018-05-16 10:55:30 +00:00
Tom Anderson 9cfcd1cf68 Enable thin archives for ChromeOS builds
LLVM has been updated in the ChromeOS sysroot, so it should be safe to enable
thin archives now.

BUG=801925

Change-Id: I7dc2492937a26adc4f9af61abccbdb086e3a38cb
Reviewed-on: https://chromium-review.googlesource.com/1050980
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#557336}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 1ed851337f4781d2504bdcc03f11d1ffb5526a3a
2018-05-09 22:01:13 +00:00
Ken Rockot af60ab72c0 Fix linux OS check for generate_linker_map
This was changed by r554983, which really should have only changed the
android OS check, as Linux builds also need to support NaCl toolchains
where current_os != "linux".

Bug: 822034
Change-Id: I5ca924516158bdd6228b947f32db6b614d1caacd
Reviewed-on: https://chromium-review.googlesource.com/1038430
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Ken Rockot <rockot@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#555228}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: c77b371695be9335ffe86608871d9dc2fd537d8a
2018-05-01 23:33:34 +00:00
Ken Rockot a192baf56b Build 32- and 64-bit Android mojo_core for Chrome OS distribution
This is an unmodified reland of r554617 after fixing cases where
target_os=["chromeos"] was not set in some Chrome OS builders'
gclient configs.

Causes Chrome builds for Chrome OS to emit additional 32-bit and
64-bit copies of the mojo_core shared library built against the
Android toolchain, for use from within the ARC++ container.

In order to support building these library targets, this also
modifies DEPS to include a minimal set of required Android support
tools and libraries in chromeos checkouts.

Bug: 822034
Change-Id: I0e6ae87a1b9da80b82c40fd637a5be07dd7b8272
Reviewed-on: https://chromium-review.googlesource.com/1035619
Commit-Queue: Ken Rockot <rockot@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#554983}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 027d7fa1c191f60f754985b9c235597f8c9a2081
2018-05-01 03:10:06 +00:00