crrev.com/c/1713826 flipped slashes from / to \ so that clang-cl
commands could be copy/paste run on Windows. While investigating a
recent compiler bug I had the need to copy/paste run linker commands on
Windows and realized that I hadn't flipped those slashes. This change
finishes the job, for lib/link commands, tested with component and
non-component builds of base.
Change-Id: If5570ab3093b42908bebab9944cde82da31a055d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1894094
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#711887}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 8950e11c374a90a473de26b11dbe5b3a6187607b
This reverts commit c56d4c6c1be7e5a9f3c5c2a63f3925122b9ed560.
Reason for revert: I get the following 13 times per update:
C:/src/trunk/src/build/toolchain/win/setup_toolchain.py:284:
SyntaxWarning: assertion is always true, perhaps remove parentheses?
assert (vc_lib_atlmfc_path,
Original change's description:
> Added assertion message when ATL is not installed.
>
> The comment above assert did not match behavior
> of assert. This comment has been fixed and an
> explanatory assertion message was added.
>
> Bug: None
> Change-Id: If9ac26c578ac45fb9e6dd50b1605ecff13bf1323
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1881161
> Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
> Commit-Queue: Yura Yaroshevich <yura.yaroshevich@gmail.com>
> Cr-Commit-Position: refs/heads/master@{#710425}
TBR=brucedawson@chromium.org,yura.yaroshevich@gmail.com
Change-Id: I18f9431edb7d21435c029a0ce825bfd421f0cc27
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: None
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1888322
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#710514}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: a3d9cbba5245774dd416bb561a1466de2ed53e9c
The comment above assert did not match behavior
of assert. This comment has been fixed and an
explanatory assertion message was added.
Bug: None
Change-Id: If9ac26c578ac45fb9e6dd50b1605ecff13bf1323
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1881161
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Commit-Queue: Yura Yaroshevich <yura.yaroshevich@gmail.com>
Cr-Original-Commit-Position: refs/heads/master@{#710425}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: c56d4c6c1be7e5a9f3c5c2a63f3925122b9ed560
root output directory is actually located.
The existing fixed paths assumed the out dir is located in the chromium
src directory. Downstream projects may have their out directory located
elsewhere, for example in the chromium src dir's parent dir.
This CL calculates the relative path between the out directory and the
tool base directory, and uses that to generate the paths in the
dependency notes.
Change-Id: Ie584c3133baeaba1f2b18225a9a7e6501fce6dc1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1879457
Commit-Queue: Yngve Pettersen <yngve@vivaldi.com>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#709847}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 39afaf988c96ab2ed3e3c6c3edeccc23619e388f
Instead, use -imsvc and the hermetic toolchain for the preprocessor, and
don't look in system include dirs for resources.
This means we can't include resources from the system include dirs,
but we don't want to do that anyways.
For now, keep using tool_wrapper to set the env so that we can
find MS rc.exe on %PATH%.
Bug: none
Change-Id: I1065be2513659c6eb5b4de440299fa86cfb58736
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1863149
Reviewed-by: Hans Wennborg <hans@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#706916}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 82c2ac25ed0b2bcdcd45bd4e91089bef1f192cb1
Add Windows support into the wrapper and have the toolchain invoke it
when use_clang_coverage = true.
Also clean-up the code for the default exclusion list.
Bug: 989828
Change-Id: Ie4e40721e7b007831c299978b37315dad1c521c8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1863328
Commit-Queue: Sajjad Mirza <sajjadm@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Nodir Turakulov <nodir@chromium.org>
Reviewed-by: Yuke Liao <liaoyuke@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#706703}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 750bd0b90ea5bf7920e961655a9fe965341bc7a9
Microsoft rc.exe has its built-in preprocessor that has a limit of 32
characters for macro names.
We already use clang-cl's preprocessor for our own rc that we use in cross
builds. That works well, so feed the output from that into Microsoft
rc.exe too.
This allows removing some workarounds for BUILDFLAG() use in .rc files and
shouldn't change behavior.
Bug: 961769
Change-Id: I21ea2e62323a27c61f8c79c267814ed2f522eded
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1860097
Commit-Queue: Nico Weber <thakis@chromium.org>
Commit-Queue: Robert Sesek <rsesek@chromium.org>
Auto-Submit: Nico Weber <thakis@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#705630}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 19cb4031e3b0830a04bbde0f4818c9ae1e8c7c5c
* Use bytestrings for operations in cases where files are read in binary mode.
* Output from subprocess is a bytestring in Python 3. Need to decode it before using in normal string operations.
* Due to use of bytestrings need to encode UUID string.
* Had to use branching code for ord() due to string vs bytestring in Py2/3.
* array() typecode 'c' (char) has been removed in Python 3. Use 'B' (unsigned char) instead.
* Use '//' for division where necessary. Add 'from __future__ import division' to avoid this in the future.
* Import reduce() for Python 3.
* Fixed open(mode='U') DeprecationWarnings. Use io.open for universal newlines on both Py2/3.
The changes are backwards compatible with Python 2.
Formatting changes are a result of running "git cl format --python".
Errors fixed:
Traceback (most recent call last):
File "../../build/toolchain/win/midl.py", line 240, in <module>
sys.exit(main(*sys.argv[1:]))
File "../../build/toolchain/win/midl.py", line 205, in main
processing = set(os.path.basename(x)
File "../../build/toolchain/win/midl.py", line 206, in <genexpr>
for x in lines if x.startswith(prefixes))
TypeError: a bytes-like object is required, not 'str'
Traceback (most recent call last):
File "../../build/toolchain/win/midl.py", line 239, in <module>
sys.exit(main(*sys.argv[1:]))
File "../../build/toolchain/win/midl.py", line 213, in main
ZapTimestamp(os.path.join(tmp_dir, f))
File "../../build/toolchain/win/midl.py", line 71, in ZapTimestamp
contents = re.sub(
File "C:\Program Files\Python38\lib\re.py", line 208, in sub
return _compile(pattern, flags).sub(repl, string, count)
TypeError: cannot use a string pattern on a bytes-like object
Traceback (most recent call last):
File "../../build/toolchain/win/midl.py", line 241, in <module>
sys.exit(main(*sys.argv[1:]))
File "../../build/toolchain/win/midl.py", line 167, in main
overwrite_cls_guid(os.path.join(outdir, h),
File "../../build/toolchain/win/midl.py", line 152, in overwrite_cls_guid
overwrite_cls_guid_h(h_file, dynamic_guid)
File "../../build/toolchain/win/midl.py", line 99, in overwrite_cls_guid_h
br'class DECLSPEC_UUID("%s")' % str(dynamic_guid), contents)
TypeError: %b requires a bytes-like object, or an object that implements __bytes__, not 'str'
Traceback (most recent call last):
File "../../build/toolchain/win/midl.py", line 241, in <module>
sys.exit(main(*sys.argv[1:]))
File "../../build/toolchain/win/midl.py", line 167, in main
overwrite_cls_guid(os.path.join(outdir, h),
File "../../build/toolchain/win/midl.py", line 153, in overwrite_cls_guid
overwrite_cls_guid_iid(iid_file, dynamic_guid)
File "../../build/toolchain/win/midl.py", line 106, in overwrite_cls_guid_iid
hexuuid += ','.join('0x%02x' % ord(b) for b in dynamic_guid.bytes[8:])
File "../../build/toolchain/win/midl.py", line 106, in <genexpr>
hexuuid += ','.join('0x%02x' % ord(b) for b in dynamic_guid.bytes[8:])
TypeError: ord() expected string of length 1, but int found
Traceback (most recent call last):
File "../../build/toolchain/win/midl.py", line 241, in <module>
sys.exit(main(*sys.argv[1:]))
File "../../build/toolchain/win/midl.py", line 167, in main
overwrite_cls_guid(os.path.join(outdir, h),
File "../../build/toolchain/win/midl.py", line 154, in overwrite_cls_guid
overwrite_cls_guid_tlb(tlb_file, dynamic_guid)
File "../../build/toolchain/win/midl.py", line 120, in overwrite_cls_guid_tlb
assert ord(contents[type_off]) == 0x25, "expected coclass"
TypeError: ord() expected string of length 1, but int found
Traceback (most recent call last):
File "../../build/toolchain/win/midl.py", line 241, in <module>
sys.exit(main(*sys.argv[1:]))
File "../../build/toolchain/win/midl.py", line 167, in main
overwrite_cls_guid(os.path.join(outdir, h),
File "../../build/toolchain/win/midl.py", line 154, in overwrite_cls_guid
overwrite_cls_guid_tlb(tlb_file, dynamic_guid)
File "../../build/toolchain/win/midl.py", line 125, in overwrite_cls_guid_tlb
contents = array.array('c', contents)
ValueError: bad typecode (must be b, B, u, h, H, i, I, l, L, q, Q, f or d)
Traceback (most recent call last):
File "../../build/toolchain/win/midl.py", line 241, in <module>
sys.exit(main(*sys.argv[1:]))
File "../../build/toolchain/win/midl.py", line 167, in main
overwrite_cls_guid(os.path.join(outdir, h),
File "../../build/toolchain/win/midl.py", line 154, in overwrite_cls_guid
overwrite_cls_guid_tlb(tlb_file, dynamic_guid)
File "../../build/toolchain/win/midl.py", line 131, in overwrite_cls_guid_tlb
hashtab = [0xffffffff] * (0x80 / 4)
TypeError: can't multiply sequence by non-int of type 'float'
Traceback (most recent call last):
File "../../build/toolchain/win/midl.py", line 242, in <module>
sys.exit(main(*sys.argv[1:]))
File "../../build/toolchain/win/midl.py", line 168, in main
overwrite_cls_guid(os.path.join(outdir, h),
File "../../build/toolchain/win/midl.py", line 155, in overwrite_cls_guid
overwrite_cls_guid_tlb(tlb_file, dynamic_guid)
File "../../build/toolchain/win/midl.py", line 138, in overwrite_cls_guid_tlb
guidhash = reduce(operator.xor, [w for w in words]) % (0x80 // 4)
NameError: name 'reduce' is not defined
../../build/toolchain/win/midl.py:231: DeprecationWarning: 'U' mode is deprecated
open(fromfile, 'bU').readlines(),
../../build/toolchain/win/midl.py:232: DeprecationWarning: 'U' mode is deprecated
open(tofile, 'bU').readlines(), fromfile, tofile)))
Bug: 941669
Change-Id: I3e5985c732db114eff2209e428ec9ee3f209e3b6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1829205
Commit-Queue: Raul Tambre <raul@tambre.ee>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Auto-Submit: Raul Tambre <raul@tambre.ee>
Cr-Original-Commit-Position: refs/heads/master@{#705426}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 56415b772dd2e5acfae12a00ffd7d22f0009e098
We're removing support for MSVC on goma, so this combination of toggles
will be impossible soon. Assert it's unused, and remove a bit of code
I found that checked for this combination.
Bug: 1006238
Change-Id: Id00f887d37139262970d9d6a1a9c78fc18bb0bb5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1846674
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#704463}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 1f02214abce0065e78718378e03dcb6064d58012
Linux Chromium build uses headers and libraries in debian sysroot
instead of system's to provide hermetic build environment.
To compile simple chrome with Goma, builidng like this improve
cache hit ratio because we can expect compile happens in hermetic way.
Bug: 1003264
Change-Id: If7c5f80b5d732635f0b178efca0b9d4ca4a5c9e4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1846427
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Yoshisato Yanagisawa <yyanagisawa@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#703625}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 287391a16d3de28d1ca7758ec92cb2475c865d1e
This is a reland of 1a6930930154919a9f3e08e45b3d6b6571f0c3ea
The reland completely omits the non-clang toolchains in
cross builds.
Original change's description:
> win: Pass /libpath: on Windows too, and use /lldignoreenv to make lld ignore the %LIB% env var.
>
> See https://reviews.llvm.org/D67456
>
> Makes the build a bit more hermetic, and should have no behavior change.
>
> Bug: none
> Change-Id: I90080aa7f8ec814e6ec9b1a4fbcad464e12a450d
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1807154
> Auto-Submit: Nico Weber <thakis@chromium.org>
> Commit-Queue: Reid Kleckner <rnk@chromium.org>
> Reviewed-by: Reid Kleckner <rnk@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#697369}
Bug: none
Change-Id: I0de1b71b0f2bff753bcbe69da01ea9694e11edf1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1810061
Auto-Submit: Nico Weber <thakis@chromium.org>
Commit-Queue: Hans Wennborg <hans@chromium.org>
Reviewed-by: Hans Wennborg <hans@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#697556}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 33d42255fa25f7faac374edb02aa1a729e3086cb
See https://reviews.llvm.org/D67456
Makes the build a bit more hermetic, and should have no behavior change.
Bug: none
Change-Id: I90080aa7f8ec814e6ec9b1a4fbcad464e12a450d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1807154
Auto-Submit: Nico Weber <thakis@chromium.org>
Commit-Queue: Reid Kleckner <rnk@chromium.org>
Reviewed-by: Reid Kleckner <rnk@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#697369}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 1a6930930154919a9f3e08e45b3d6b6571f0c3ea
Like https://chromium-review.googlesource.com/c/chromium/src/+/1711087 but
for generate_breakpad_symbols.py
Also make sure hermetic otool is available at test execution time when
it's available at build time.
Bug: 984746,998873
Change-Id: I9646e48d3dae3f6f1076ed9e3ddbd91eb1e1cfd1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1803805
Reviewed-by: Mark Mentovai <mark@chromium.org>
Reviewed-by: Charlie Reis <creis@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Auto-Submit: Nico Weber <thakis@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#696596}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 51a61da45d1648328012f3d25876b9edaf2550c1
dSYMs are listed as outputs on the toolchain’s link rule,
so they do not need to be listed explicitly by targets.
Bug: 330301
Change-Id: I7eca7b8a6b1bcddffead9c2f55d6d16b8c975254
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1801324
Reviewed-by: David Benjamin <davidben@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Robert Sesek <rsesek@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#696076}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 9e68847f01883c73aa1d3b884305f1e6e13ae252
We were seeing out of memory errors on Windows ThinLTO bots. After
measuring memory consumption of linking chrome.dll and
chrome_child.dll, it became clear that the estimated memory usage of a
thin link was too low. Adjusting to a more realistic value.
R=dpranke,gbiv,thakis
BUG=967074
Change-Id: I7d43d38e28e351a2dc16d79abbf332972cf66e9c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1785680
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: George Burgess <gbiv@chromium.org>
Commit-Queue: Bob Haarman <inglorion@chromium.org>
Auto-Submit: Bob Haarman <inglorion@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#693844}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 9700d520dc9dae37347802a156e4af56b50a4f7f
This reverts commit 0e9a0b02176c9b338132c7e29414448285e72f77.
Reason for revert: Breaks Linux CFI bot, see https://crbug.com/997103
Original change's description:
> build: adjust ThinLTO's memory usage for non-Android
>
> In the linked bug, we discovered that clean Chrome links with ThinLTO
> enabled consume quite a bit of memory. In my measurements, Chrome OS x64
> links take around 49GB, and a standard Linux ThinLTO link takes around
> 46GB.
>
> Build command:
> $ /usr/bin/time -v ninja chrome
> [snip]
> Maximum resident set size (kbytes): 46337504
> [snip]
> $ cat args.gn
> target_os = "linux"
> target_cpu = "x64"
> use_goma = true
> is_official_build = true
> is_chrome_branded = true
> clang_use_default_sample_profile = true
> use_thin_lto = true
>
> (the last two args should be redundant in this case)
>
> Measured similarly, Android's build takes 8-9GB on ARM, so it gets to
> stay at 10GB.
>
> Bug: 988364
> Change-Id: Ia1bbf6b441dcb9219a37842060e72eebe7ec687e
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1755189
> Reviewed-by: Peter Collingbourne <pcc@chromium.org>
> Reviewed-by: Nico Weber <thakis@chromium.org>
> Commit-Queue: George Burgess <gbiv@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#689090}
TBR=thakis@chromium.org,pcc@chromium.org,gbiv@chromium.org,inglorion@chromium.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: 988364
Change-Id: Icfab0c6b2bd4d08b524d6c32a456026af15543bf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1768816
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#689904}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 82dbdb8561f9e8c2ad9f4ba460510783b2baa64b
Extra changes in this update:
- Update the released clang version to 10.0.0.
- Move -momit-leaf-frame-pointer next to -fno-omit-frame-pointer
since that's where it logically belongs. clang started warning
on momit without fno-omit after r365860, but it stopped doing this
again in r368728 so this change is no longer needed for the roll.
But it's still a nice cleanup.
- A file in the profile runtime with static init was renamed, do that in the
check
- Disable new -Wno-implicit-float-conversion warning
- Remove ifdefs for plugins using new ErrorOr API in clang
- Remove -Wno-error=return-stack-address flag for ToT builds.
- Replace llvm::make_unique with std::make_unique in clang plugins for
LLVM r369130, remove LLVM_FORCE_HEAD_REVISION ifdefs
TBR=dprake
Binary-Size: crbug.com/992372, compiler update adds 32KB, seems reasonabe
Bug: 983371
Change-Id: Icdcbd70adec2548a2bf8222df15560e70ce32d1d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1763261
Commit-Queue: Hans Wennborg <hans@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Reviewed-by: Hans Wennborg <hans@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#689588}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 18026ae8f2ca650128026720a9244e8cde5b9625
In the linked bug, we discovered that clean Chrome links with ThinLTO
enabled consume quite a bit of memory. In my measurements, Chrome OS x64
links take around 49GB, and a standard Linux ThinLTO link takes around
46GB.
Build command:
$ /usr/bin/time -v ninja chrome
[snip]
Maximum resident set size (kbytes): 46337504
[snip]
$ cat args.gn
target_os = "linux"
target_cpu = "x64"
use_goma = true
is_official_build = true
is_chrome_branded = true
clang_use_default_sample_profile = true
use_thin_lto = true
(the last two args should be redundant in this case)
Measured similarly, Android's build takes 8-9GB on ARM, so it gets to
stay at 10GB.
Bug: 988364
Change-Id: Ia1bbf6b441dcb9219a37842060e72eebe7ec687e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1755189
Reviewed-by: Peter Collingbourne <pcc@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: George Burgess <gbiv@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#689090}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 0e9a0b02176c9b338132c7e29414448285e72f77
Starting with r19, the NDK provides a unified sysroot. Unlike the
sysroot in $ndk/sysroot, this one includes libraries as well. Switch
to it as the sysroot to be used for both compiles and links (which
means that we no longer need the concept of a link sysroot), and
remove a bunch of logic for manually finding libraries inside the
pre-unified sysroot layout.
The Android support headers are installed inside the sysroot as well
(under usr/local/include), so we can stop explicitly adding them to
the header path.
Bug: 891999
Change-Id: I6947fe5cb18303ba7772e31ad08c51a4d82c3b1d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1756721
Reviewed-by: Ryan Hamilton <rch@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Commit-Queue: Peter Collingbourne <pcc@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#687722}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 35af63c5a7bbd735dec4edb3ae096bbfec2d80d5
This reverts commit 8b43f27599d3b490fc6bc936c4e0e1d3c0f38aeb.
Reason for revert: Causing crashes in ANGLE's dEQP tests. Likely
related to exception handling on Windows.
See issue for more details.
Bug: 994333
Original change's description:
> Roll clang 365097:368742.
>
> Extra changes in this update:
> - Update the released clang version to 10.0.0.
>
> - Move -momit-leaf-frame-pointer next to -fno-omit-frame-pointer
> since that's where it logically belongs. clang started warning
> on momit without fno-omit after r365860, but it stopped doing this
> again in r368728 so this change is no longer needed for the roll.
> But it's still a nice cleanup.
>
> - A file in the profile runtime with static init was renamed, do that in the
> check
>
> - Disable new -Wno-implicit-float-conversion warning
>
> - Remove ifdefs for plugins using new ErrorOr API in clang
>
> - Remove -Wno-error=return-stack-address flag for ToT builds.
>
> TBR=dpranke
>
> Binary-Size: crbug.com/992372, compiler update adds 32KB, seems reasonable
> Bug: 983371
> Change-Id: Id6e64948fe4966b486aa77615e19f4f7566f13ed
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1751203
> Commit-Queue: Hans Wennborg <hans@chromium.org>
> Reviewed-by: Nico Weber <thakis@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#686837}
TBR=thakis@chromium.org,hans@chromium.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: 983371
Change-Id: I3e577f9bb0e8c42e29b06b7580fadc80a0529f2c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1756767
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#687472}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 90cdc2584cd4f7e6c905d1f228084736ce9ee6e7
This requires a sufficiently new version of ld64. I confirmed that the one that
comes bundled with Xcode 10.12.1 is new enough. There's no harm in setting this
for older versions of ld64.
This is currently gated behind the gn arg mac_deterministic_build because lldb
has a bug that causes it to fail to load object files when the binary is built
deterministically.
Bug: 330262
Change-Id: I9802420a46f487888f4768c01168dae1b8d88359
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1711105
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Erik Chen <erikchen@chromium.org>
Auto-Submit: Erik Chen <erikchen@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#687360}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 7dc7c87cff652ab9a63f83029682c488e3ba515d
Extra changes in this update:
- Update the released clang version to 10.0.0.
- Move -momit-leaf-frame-pointer next to -fno-omit-frame-pointer
since that's where it logically belongs. clang started warning
on momit without fno-omit after r365860, but it stopped doing this
again in r368728 so this change is no longer needed for the roll.
But it's still a nice cleanup.
- A file in the profile runtime with static init was renamed, do that in the
check
- Disable new -Wno-implicit-float-conversion warning
- Remove ifdefs for plugins using new ErrorOr API in clang
- Remove -Wno-error=return-stack-address flag for ToT builds.
TBR=dpranke
Binary-Size: crbug.com/992372, compiler update adds 32KB, seems reasonable
Bug: 983371
Change-Id: Id6e64948fe4966b486aa77615e19f4f7566f13ed
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1751203
Commit-Queue: Hans Wennborg <hans@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#686837}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 8b43f27599d3b490fc6bc936c4e0e1d3c0f38aeb
This reverts commit b897e9bf67b6c0dc04269e9527e9e9064cd76af1.
Reason for revert: Bisecting pinpoints this CL as responsible for breaking WebKit Linux MSAN. See https://ci.chromium.org/p/chromium/builders/ci/WebKit%20Linux%20MSAN/1194 for the first failure caused by it. Please run the linux-webkit-msan-rel tryjob and ensure it passes before resubmitting.
Original change's description:
> Reland "Roll clang 365097:368354."
>
> This is a reland of 5c7654a48b01a46a7b26a5c37dcad2c17b12ee64
>
> I moved the -momit-leaf-pointer flag so that it is not redundant
> with -fomit-frame-pointer and the x86-only warning doesn't occur.
>
> Original change's description:
> > Roll clang 365097:368354.
> >
> > Update the released clang version to 10.0.0.
> >
> > Binary-Size: crbug.com/992372, compiler update adds 32KB, seems reasonable
> > Bug: 983371
> > Change-Id: I378b4e30ec045e9206ba11b77a95d81dc3008f1d
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1713302
> > Reviewed-by: Nico Weber <thakis@chromium.org>
> > Reviewed-by: Dirk Pranke <dpranke@chromium.org>
> > Commit-Queue: Reid Kleckner <rnk@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#685744}
>
> Bug: 983371
> Change-Id: Ia2d628b4710033de4b80700de7bd96bbe5d9d73f
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1747138
> Reviewed-by: Dirk Pranke <dpranke@chromium.org>
> Reviewed-by: Nico Weber <thakis@chromium.org>
> Commit-Queue: Reid Kleckner <rnk@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#685783}
TBR=thakis@chromium.org,hans@chromium.org,rnk@chromium.org,dpranke@chromium.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: 983371
Change-Id: I36911cf6042bd8fddbde923f83d68e221b5fc993
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1747491
Reviewed-by: Fergus Dall <sidereal@google.com>
Commit-Queue: Fergus Dall <sidereal@google.com>
Cr-Original-Commit-Position: refs/heads/master@{#685909}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e0e3d85599361c275320594e7fc8b27a2e7056bb
This is a reland of 5c7654a48b01a46a7b26a5c37dcad2c17b12ee64
I moved the -momit-leaf-pointer flag so that it is not redundant
with -fomit-frame-pointer and the x86-only warning doesn't occur.
Original change's description:
> Roll clang 365097:368354.
>
> Update the released clang version to 10.0.0.
>
> Binary-Size: crbug.com/992372, compiler update adds 32KB, seems reasonable
> Bug: 983371
> Change-Id: I378b4e30ec045e9206ba11b77a95d81dc3008f1d
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1713302
> Reviewed-by: Nico Weber <thakis@chromium.org>
> Reviewed-by: Dirk Pranke <dpranke@chromium.org>
> Commit-Queue: Reid Kleckner <rnk@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#685744}
Bug: 983371
Change-Id: Ia2d628b4710033de4b80700de7bd96bbe5d9d73f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1747138
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Reid Kleckner <rnk@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#685783}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: b897e9bf67b6c0dc04269e9527e9e9064cd76af1
We had a global define NO_TCMALLOC, and then build/build_config.h
set a define USE_TCMALLOC if that wasn't set.
Instead, use the buildflag system.
Also remove most allocator gn args from build/config/allocator.gni
to base/allocator/allocator.gni (the rest to move in a follow-up).
Also use a single, consistent mechanism for disabling allocator args
for nacl.
No behavior change.
Bug: 961767
Change-Id: Id2776cee1c77c00f401b73c414bb5e8d924ce4d1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1731613
Auto-Submit: Nico Weber <thakis@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#683347}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: b80b085bfabdbeccf5688a1c0291812c577b854a
This is CL is generated by a script. Data is pulled from
review conducted in Q2 2019. See https://tinyurl.com/yxau5sc4
for context.
Bug: 977050
Change-Id: Iba4526020982e0b8355c9b75637d1f78d4a94638
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1700903
Auto-Submit: Eric Foo <efoo@chromium.org>
Reviewed-by: Mike Pinkerton <pinkerton@chromium.org>
Reviewed-by: Wez <wez@chromium.org>
Reviewed-by: Bo <boliu@chromium.org>
Reviewed-by: Esmael Elmoslimany <aee@chromium.org>
Commit-Queue: Mike Pinkerton <pinkerton@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#682831}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 685e5f4b149b12708af839b3319f4d7a24017068
When manually running clang-cl it is common to use ninja -v to get the
command and then run it with alterations. However this doesn't work in
the command prompt if the path to the command uses slashes instead of
backslashes.
This change switches the slashes for backslashes so that the command
can be copied and pasted and successfully run.
This is being done in preparation for a probable Chrome on the Throne
tip.
Change-Id: I63aa3354a30ba1a7c487b805e0d1c7448d13f35f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1713826
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#681589}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 632f62ced7b66ab1a7c2550a53fda64f24b58800
This change fixes gn refusing to build when `generate_linker_map` is
true for android targets from a linux host.
Bug: 986842
Change-Id: Ieb5e4d236ca54c87cf5f09fe26ce82a9bfe3191f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1715024
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Nina Satragno <nsatragno@chromium.org>
Auto-Submit: Nina Satragno <nsatragno@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#681105}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: a2cb14b2badc836a161f16eda1ad72bf1d020887
It's only used in mac_sdk.gni and there's no need to expose it anymore. Callers
should directly reference binaries via $mac_bin_path.
Bug: 971452
Change-Id: I504224e192cae3811a3defcded00abd5616478fb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1648822
Commit-Queue: Erik Chen <erikchen@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#679324}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 65df11d96300137352e36e39af220345027015ac
Previously, Chromium used a hermetic toolchain. This was basically a full
install of Xcode, which has OS version dependencies. This CL keeps the hermetic
toolchain, since it's necessary for clang + code coverage.
Compilation of Chrome now uses a separate package of binaries from
Xcode. This consists of a whitelist of the OS-version agnostic binaries from
Xcode. These binaries do not have [relevant] OS version dependencies.
Change-Id: Ie6f30b4b6b3ccd4a7538feb73d6828cfa4a02891
Bug: 965663
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1673572
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Erik Chen <erikchen@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#678463}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: bc74094853d3b50325b4ace9de80225375648bfe
midl.py currently does some path munging that is better handled by midl.gni.
It has knowledge of 'third_party' and 'win_build_output' and these should be
an argument to the script provided by the build system instead of knowledge
intrinsic to midl.py.
This changes moves that logic to midl.gni. midl.gni produces the same default
path that midl.py previously generated (so net result is a no-op).
browser_switcher/bho is the only consumer that had custom logic that needed
to explicitly specify the output location. Additionally, this enables
other IDL producers to specify a non-standard place to persist the IDLs if
they so desire.
Details:
midl.py/gni facilitate IDL compilation. Nominally, one would run midl as part
of the build process and be done with it. However, to support cross-platform
compilation, IDL generation is done on Windows clients and persisted in the
source tree. This way platforms that can't run midl directly can still
produce a Windows build.
For a given IDL, in the source tree |somewhere|, the standard location for
the checked in midl outputs is third_party\win_build_output\midl\|somewhere|.
midl.py knew how to get from the IDL built outputs (in |gen|) to the standard
location. Now midl.gni has that knowledge, additionally some other location,
other than the standard location may be used, if necessary.
Bug: 976936
Change-Id: Ibd448c8d59cc59e19c26beb8235c6f581182061e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1666483
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Julian Pastarmov <pastarmovj@chromium.org>
Reviewed-by: Nicolas Ouellet-Payeur <nicolaso@chromium.org>
Commit-Queue: Scott Sheehan <ssheehan@microsoft.com>
Cr-Original-Commit-Position: refs/heads/master@{#672109}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 9716b532632dc772f68f62f258901c282e9888d4
This is a reland of this change, with a fix for symbol_level=0:
https://chromium-review.googlesource.com/c/chromium/src/+/1589457
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: Ie18544fb97ba3091bc8113932e634c539d6d7502
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1653660
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Commit-Queue: Nicolas Ouellet-Payeur <nicolaso@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#668482}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 6da29fec0f3a410df8d59a765d273d1c7093cd18
The argument is now unused. This CL should not have a behavior change.
Bug: 965663
Change-Id: Ibc69066c8a8883fa7e1c28ba5f3b76a395e60ac9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1652718
Commit-Queue: Nico Weber <thakis@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#668372}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 6cd46be7b83ad5d8592c9709a2e9df6ae60202c6
Makes link commands in Linux builds shorter and easier to work with.
No intended behavior change.
Bug: none
Change-Id: Ic12c1b2ca481f3dbd13a4c81449705ab347a3607
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1653528
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#668093}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 2cde7f21ab05082d1527a1b0d9d9e3f36ceefbeb