New issue
Advanced search Search tips

Issue 801780 link

Starred by 14 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: ----

Blocked on:
issue 803661
issue 810934
issue 813219

Blocking:
issue 840822



Sign in to add a comment

Switch to libc++ on Windows

Project Member Reported by p...@chromium.org, Jan 13 2018

Issue description

I prototyped up a set of changes that make it possible to compile Chromium for Windows with libc++. Here's the effect on binary size:

MSVC stdlib:

$ ls -l chrome_child.dll chrome.dll chrome.exe
-rwxr-x--- 1 pcc eng 93445120 Jan 11 22:12 chrome_child.dll
-rwxr-x--- 1 pcc eng 72242176 Jan 11 21:19 chrome.dll
-rw-r----- 1 pcc eng 11517952 Jan 11 22:14 chrome.exe

libc++:

$ ls -l chrome_child.dll chrome.dll chrome.exe
-rwxr-x--- 1 pcc eng 92691968 Jan 12 18:20 chrome_child.dll
-rwxr-x--- 1 pcc eng 72020480 Jan 12 17:25 chrome.dll
-rw-r----- 1 pcc eng 11158016 Jan 12 18:21 chrome.exe

And the resulting binary does appear to be able to start up and load web pages.

I'll try to publish my changes somewhere soon. I'm not sure if I'll have time to work on this further myself, but I think it would be great to see this happen not only for the binary size benefits but also to provide better CFI protection.
 

Comment 1 by thakis@chromium.org, Jan 13 2018

Cc: brucedaw...@chromium.org scottmg@chromium.org thomasanderson@chromium.org
Cool!

+a few people who might have an opinion on this.

Binary size win looks cool, using the same standard library everywhere generally sounds good too. I think the windows APIs are careful to not pass C++ objects around so we should have even less ABI concerns than elsewhere.

Since the STL is mostly headers-only, the CFI win isn't _that_ large, is that true?

Comment 2 by thakis@chromium.org, Jan 13 2018

One thing rnk always mentions is that libc++'s always_inline approach to abi stability might have negative implications for debuggability and crash stacks. Maybe we could change the inline macros to not always_inline if _LIBCPP_API_UNSTABLE is set ( bug 747676 ).

Comment 3 by thakis@chromium.org, Jan 14 2018

Cc: pkasting@chromium.org
+pkasting, iirc we talked about this at some point

Comment 4 by thakis@chromium.org, Jan 16 2018

This might possibly change build times. When I compared chrome/linux and chrome/win build times a while ago, codegen on Windows was more expensive because clang had to codegen many stl functions that were referenced but ultimately unused. With libc++, due to always_inline, those don't exist on linux.
Sorry if this is a dumb question, but would this work with both compilers?
Components: Build

Comment 7 by tikuta@chromium.org, Jan 17 2018

Cc: tikuta@chromium.org

Comment 8 by p...@chromium.org, Jan 17 2018

Re c#1: it's hard to say in general how much CFI coverage we'd gain, but it's not just a matter of the amount of code compiled with CFI. Without compiling the STL ourselves we cannot correctly CFI-check vcalls involving classes in std:: (which includes iostreams as well as possibly std::function depending on how it was implemented) because CFI needs to see the definition of every vtable that derives from the class used in the call, and even with headers-only it's possible that the linker will select (via COMDAT resolution) a vtable from one of the uninstrumented object files. Clang already has code to blacklist std:: from CFI checks on Windows (search for lto-visibility-public-std) which we'll be able to disable upon switching to libc++.

c#5: I looked at the libc++ headers and they appear to contain support for the MSVC compiler, but I haven't tried it.
Project Member

Comment 9 by bugdroid1@chromium.org, Jan 18 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/crashpad/crashpad.git/+/0c57aafb4e93ef7a565b96271751b5d5c3c31a73

commit 0c57aafb4e93ef7a565b96271751b5d5c3c31a73
Author: Peter Collingbourne <pcc@google.com>
Date: Thu Jan 18 00:36:53 2018

Add support for libc++ on Windows.

Use the "POSIX" implementation of ThrowBadAlloc() on Windows when libc++
is being used.

Bug: chromium:801780
Change-Id: I230a8df9040aa73e290bb0d002996e822958a94b
Reviewed-on: https://chromium-review.googlesource.com/872121
Reviewed-by: Scott Graham <scottmg@chromium.org>
Commit-Queue: Peter Collingbourne <pcc@chromium.org>

[modify] https://crrev.com/0c57aafb4e93ef7a565b96271751b5d5c3c31a73/util/stdlib/aligned_allocator.cc

Project Member

Comment 10 by bugdroid1@chromium.org, Jan 18 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/breakpad/breakpad/+/6d001e71595e256ba3ff8cb63d9130656b50e29e

commit 6d001e71595e256ba3ff8cb63d9130656b50e29e
Author: Peter Collingbourne <pcc@google.com>
Date: Thu Jan 18 14:55:11 2018

Do not use non-standard stdext::checked_array_iterator with libc++.

Bug: chromium:801780
Change-Id: Id1b0b2330d7d609bda62869bcda5bb2f6fde12bd
Reviewed-on: https://chromium-review.googlesource.com/872458
Reviewed-by: Mark Mentovai <mark@chromium.org>

[modify] https://crrev.com/6d001e71595e256ba3ff8cb63d9130656b50e29e/src/client/windows/crash_generation/minidump_generator.cc

Project Member

Comment 11 by bugdroid1@chromium.org, Jan 19 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/44e7ef57b3044ed4fb3f3360e23b3f9d8cdcead7

commit 44e7ef57b3044ed4fb3f3360e23b3f9d8cdcead7
Author: Peter Collingbourne <pcc@chromium.org>
Date: Fri Jan 19 05:37:50 2018

bluetooth: Add missing #include.

Found by compiling with libc++ on Windows.

Bug: 801780
Change-Id: I948e6d5baaf7008892a576bcc27943d96b911e62
Reviewed-on: https://chromium-review.googlesource.com/875372
Reviewed-by: Giovanni Ortuño Urquidi <ortuno@chromium.org>
Commit-Queue: Peter Collingbourne <pcc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#530430}
[modify] https://crrev.com/44e7ef57b3044ed4fb3f3360e23b3f9d8cdcead7/device/bluetooth/bluetooth_service_record_win.cc

Project Member

Comment 12 by bugdroid1@chromium.org, Jan 19 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/412840ae8224563c5ae3c5e97701608215f6407f

commit 412840ae8224563c5ae3c5e97701608215f6407f
Author: Peter Collingbourne <pcc@chromium.org>
Date: Fri Jan 19 09:15:13 2018

crash: Add missing #include.

Found by compiling with libc++ on Windows.

Bug: 801780
Change-Id: I3fe12643ed23c8757f1620b3c33253257999dd17
Reviewed-on: https://chromium-review.googlesource.com/874522
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Peter Collingbourne <pcc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#530456}
[modify] https://crrev.com/412840ae8224563c5ae3c5e97701608215f6407f/components/crash/content/app/breakpad_win.cc

Project Member

Comment 13 by bugdroid1@chromium.org, Jan 19 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b27af39c0619901fea1947c7b89da0eeaa0227c8

commit b27af39c0619901fea1947c7b89da0eeaa0227c8
Author: Peter Collingbourne <pcc@chromium.org>
Date: Fri Jan 19 18:48:26 2018

remoting: Add missing #include.

Found by compiling with libc++ on Windows.

Bug: 801780
Change-Id: I7e4fe3e00570a16669be87120a6973912d120f58
Reviewed-on: https://chromium-review.googlesource.com/875373
Reviewed-by: Zijie He <zijiehe@chromium.org>
Commit-Queue: Peter Collingbourne <pcc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#530576}
[modify] https://crrev.com/b27af39c0619901fea1947c7b89da0eeaa0227c8/remoting/base/breakpad_win.cc

Project Member

Comment 14 by bugdroid1@chromium.org, Jan 22 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/864aee2cc80de37108a66cf43026c4585f27a393

commit 864aee2cc80de37108a66cf43026c4585f27a393
Author: Peter Collingbourne <pcc@chromium.org>
Date: Mon Jan 22 20:28:35 2018

chrome_elf: Add missing #includes.

Found by compiling with libc++ on Windows.

Bug: 801780
Change-Id: I418878d9df83df1022400c0f6b7f18495b468cd5
Reviewed-on: https://chromium-review.googlesource.com/874519
Reviewed-by: Penny MacNeil <pennymac@chromium.org>
Commit-Queue: Peter Collingbourne <pcc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#530973}
[modify] https://crrev.com/864aee2cc80de37108a66cf43026c4585f27a393/chrome_elf/nt_registry/nt_registry.cc
[modify] https://crrev.com/864aee2cc80de37108a66cf43026c4585f27a393/chrome_elf/whitelist/whitelist_ime.cc

Comment 15 by p...@chromium.org, Jan 24 2018

Blockedon: 803661
Project Member

Comment 16 by bugdroid1@chromium.org, Jan 25 2018

The following revision refers to this bug:
  https://webrtc.googlesource.com/src.git/+/2752528e4f9990fe76ee9067bd163c5b93bc6401

commit 2752528e4f9990fe76ee9067bd163c5b93bc6401
Author: Peter Collingbourne <pcc@google.com>
Date: Thu Jan 25 19:12:14 2018

Stop undefining EACCES.

Other headers, such as the libc++ headers, may depend on the
definition.

Bug: chromium:801780
Change-Id: I81e00708e08ab21b9456a8ed46ca7a1c1d4f7e50
Reviewed-on: https://webrtc-review.googlesource.com/43501
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Peter Collingbourne <pcc@google.com>
Cr-Commit-Position: refs/heads/master@{#21768}
[modify] https://crrev.com/2752528e4f9990fe76ee9067bd163c5b93bc6401/rtc_base/socket.h

Project Member

Comment 17 by bugdroid1@chromium.org, Jan 25 2018

The following revision refers to this bug:
  https://swiftshader.googlesource.com/SwiftShader.git/+/8e67eb9de339f65d4b17f38de0dbd4deef5582cf

commit 8e67eb9de339f65d4b17f38de0dbd4deef5582cf
Author: Peter Collingbourne <pcc@google.com>
Date: Thu Jan 25 20:26:34 2018

Don't define _HAS_EXCEPTIONS to 0 with libc++.

libc++ uses a predefined macro to control whether to use exceptions, so
defining this macro is unnecessary. Defining _HAS_EXCEPTIONS to 0 also
breaks libc++ because it depends on MSVC headers that only provide
certain declarations if _HAS_EXCEPTIONS is 1.

Bug: chromium:801780
Change-Id: I0d0c04e55e1e91c3ce7fe90d15b55de0cd7a21ac
Reviewed-on: https://swiftshader-review.googlesource.com/16688
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Tested-by: Peter Collingbourne <pcc@google.com>

[modify] https://crrev.com/8e67eb9de339f65d4b17f38de0dbd4deef5582cf/BUILD.gn

Project Member

Comment 18 by bugdroid1@chromium.org, Jan 25 2018

The following revision refers to this bug:
  https://swiftshader.googlesource.com/SwiftShader.git/+/c715a8ec724b8f4f437b1dfc2d7ae068cecbed89

commit c715a8ec724b8f4f437b1dfc2d7ae068cecbed89
Author: Peter Collingbourne <pcc@google.com>
Date: Thu Jan 25 23:18:49 2018

Cherry-pick r322885 from LLVM.

This fixes a build issue when building with libc++ on Windows.

Bug: chromium:801780
Change-Id: I8fa84cefa272c2f3b096b2aada793192a47cc0e3
Reviewed-on: https://swiftshader-review.googlesource.com/16468
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Tested-by: Peter Collingbourne <pcc@google.com>

[modify] https://crrev.com/c715a8ec724b8f4f437b1dfc2d7ae068cecbed89/third_party/llvm-subzero/lib/Support/NativeFormatting.cpp

Project Member

Comment 19 by bugdroid1@chromium.org, Feb 1 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a0a05a85c54596ce0e181586ef5890c04b94cc28

commit a0a05a85c54596ce0e181586ef5890c04b94cc28
Author: Nico Weber <thakis@chromium.org>
Date: Thu Feb 01 01:29:01 2018

Roll src/third_party/breakpad/breakpad/ 4a02ec030..ac4a549e2 (6 commits)

https://chromium.googlesource.com/breakpad/breakpad.git/+log/4a02ec03038d..ac4a549e29fb

$ git log 4a02ec030..ac4a549e2 --date=short --no-merges --format='%ad %ae %s'
2018-01-31 lv Extend ifdef to include helper functions
2018-01-31 lv Remove barrier to fix Android build.
2018-01-31 thakis Make breakpad build with -Wimplicit-fallthrough (on linux)
2018-01-17 pcc Do not use non-standard stdext::checked_array_iterator with libc++.
2018-01-08 lv Only restore the signal handler if sigaction has not changed
2017-12-22 nisarul Fixed file extention for minidump_upload in tools_linux.gypi

Created with:
  roll-dep src/third_party/breakpad/breakpad

Bug: 801780, 177475 
Change-Id: Ibab0e22bf2ca8c4f490b48203e182f90c3fba5aa
Reviewed-on: https://chromium-review.googlesource.com/895822
Reviewed-by: Mark Mentovai <mark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#533513}
[modify] https://crrev.com/a0a05a85c54596ce0e181586ef5890c04b94cc28/DEPS

Comment 20 by p...@chromium.org, Feb 9 2018

Blockedon: 810934
Project Member

Comment 21 by bugdroid1@chromium.org, Feb 12 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/buildtools/+/053f96910491ee7094f6dcc7edfed8744845d9df

commit 053f96910491ee7094f6dcc7edfed8744845d9df
Author: Peter Collingbourne <pcc@google.com>
Date: Mon Feb 12 21:22:16 2018

Add Windows support to libc++ target.

The main way in which Windows differs from other platforms is that
we use MSVC's ABI support libraries instead of libc++abi.

Bug: 801780
Change-Id: Iad8b6f09498efa0a18070f57012d3745998c06d4

[modify] https://crrev.com/053f96910491ee7094f6dcc7edfed8744845d9df/third_party/libc++/BUILD.gn

Project Member

Comment 22 by bugdroid1@chromium.org, Feb 12 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f88fc7903cb56ba9858a53d0079bc8c5aa41a62c

commit f88fc7903cb56ba9858a53d0079bc8c5aa41a62c
Author: Peter Collingbourne <pcc@chromium.org>
Date: Mon Feb 12 22:11:45 2018

build: Don't define _HAS_EXCEPTIONS to 0 with libc++.

libc++ uses the __has_feature macro to control whether to use exceptions,
so defining this macro is unnecessary. Defining _HAS_EXCEPTIONS to 0 also
breaks libc++ because it depends on MSVC headers that only provide certain
declarations if _HAS_EXCEPTIONS is 1. Those MSVC headers do not use
exceptions, despite being conditional on _HAS_EXCEPTIONS.

Bug: 801780
Change-Id: Icc90ffeea55fe7298a0780ea99a4c33a493ac533
Reviewed-on: https://chromium-review.googlesource.com/885503
Commit-Queue: Peter Collingbourne <pcc@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#536209}
[modify] https://crrev.com/f88fc7903cb56ba9858a53d0079bc8c5aa41a62c/build/config/compiler/BUILD.gn

Project Member

Comment 23 by bugdroid1@chromium.org, Feb 12 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2aee9ad40f3e994e350c5958ca41c8371510fddd

commit 2aee9ad40f3e994e350c5958ca41c8371510fddd
Author: Peter Collingbourne <pcc@chromium.org>
Date: Mon Feb 12 23:06:01 2018

Support use_custom_libcxx=true on Windows.

This change is interdependent with
https://chromium-review.googlesource.com/c/chromium/buildtools/+/879782
and includes a buildtools roll past that revision.

Bug: 801780
Change-Id: Id3f6a705bcf245df74d42474d4c00e1346fd2ea3
Reviewed-on: https://chromium-review.googlesource.com/879784
Commit-Queue: Peter Collingbourne <pcc@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#536231}
[modify] https://crrev.com/2aee9ad40f3e994e350c5958ca41c8371510fddd/DEPS
[modify] https://crrev.com/2aee9ad40f3e994e350c5958ca41c8371510fddd/build/config/c++/c++.gni
[modify] https://crrev.com/2aee9ad40f3e994e350c5958ca41c8371510fddd/build/config/win/BUILD.gn

Project Member

Comment 24 by bugdroid1@chromium.org, Feb 13 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7edeb73cadc922fcd476f2c7eb0f172649d46d09

commit 7edeb73cadc922fcd476f2c7eb0f172649d46d09
Author: Peter Collingbourne <pcc@chromium.org>
Date: Tue Feb 13 19:14:11 2018

allocator: Use _CPPUNWIND instead of _HAS_EXCEPTIONS on Windows.

_HAS_EXCEPTIONS is specific to the MSVC STL and defining it to 0
causes problems with libc++, so I'm planning to leave it undefined
with libc++.

_CPPUNWIND is a builtin macro provided by the compiler so it should
work with both STLs.

Bug: 801780
Change-Id: I9885a58e75804096f23e73fc0adf7afad140e645
Reviewed-on: https://chromium-review.googlesource.com/885063
Reviewed-by: Will Harris <wfh@chromium.org>
Commit-Queue: Peter Collingbourne <pcc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#536414}
[modify] https://crrev.com/7edeb73cadc922fcd476f2c7eb0f172649d46d09/base/allocator/allocator_shim.cc
[modify] https://crrev.com/7edeb73cadc922fcd476f2c7eb0f172649d46d09/base/allocator/winheap_stubs_win.cc

Project Member

Comment 25 by bugdroid1@chromium.org, Feb 13 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/356d0d4332005691f2c52fbcedee785eacc732b3

commit 356d0d4332005691f2c52fbcedee785eacc732b3
Author: Peter Collingbourne <pcc@chromium.org>
Date: Tue Feb 13 19:16:45 2018

sandbox: Fix compatibility issues with libc++.

Fix two problems with this code:
- Use of the non-standard "_Copy_s" member function on std::string.
  In all cases the use of this extension provided no security benefits
  because the second and third arguments are the same. Fixed by
  switching to "copy".
- The use of std::transform with std::tolower is non-portable because
  the standard library may provide a templated implementation of
  tolower [1] which makes the transform call ambiguous. Fix by using
  a straightforward loop instead.

[1] http://www.cplusplus.com/reference/locale/tolower/

Bug: 801780
Change-Id: I7b3d87a1ce4c7e5f22281161a9408278064cab6b
Reviewed-on: https://chromium-review.googlesource.com/875417
Reviewed-by: Penny MacNeil <pennymac@chromium.org>
Commit-Queue: Peter Collingbourne <pcc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#536415}
[modify] https://crrev.com/356d0d4332005691f2c52fbcedee785eacc732b3/sandbox/win/src/file_policy_test.cc
[modify] https://crrev.com/356d0d4332005691f2c52fbcedee785eacc732b3/sandbox/win/src/handle_closer.cc
[modify] https://crrev.com/356d0d4332005691f2c52fbcedee785eacc732b3/sandbox/win/src/interception.cc

Comment 26 by p...@chromium.org, Feb 14 2018

Remaining tasks before base_unittests and chrome build on trunk:
- land https://github.com/google/googletest/pull/1423
- roll googletest for that change and https://github.com/google/googletest/pull/1410
- land https://github.com/google/protobuf/pull/4183 and cherry-pick into our tree
- roll libaddressinput for https://github.com/googlei18n/libaddressinput/pull/153
Project Member

Comment 27 by bugdroid1@chromium.org, Feb 15 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/tools/build/+/12aef4d122e2319e903a2d0309f5d0d8de6d5e3a

commit 12aef4d122e2319e903a2d0309f5d0d8de6d5e3a
Author: Peter Collingbourne <pcc@google.com>
Date: Thu Feb 15 01:18:52 2018

Add ToTWinLibcxx64 bot (build).

This bot is for testing that we can build with the libc++ standard
library on Windows.

Bug: 801780
Change-Id: I6cf7b8e7d031c00d49bfe1e92ca8014617d71373
Reviewed-on: https://chromium-review.googlesource.com/920684
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Peter Collingbourne <pcc@chromium.org>

[modify] https://crrev.com/12aef4d122e2319e903a2d0309f5d0d8de6d5e3a/scripts/slave/recipe_modules/chromium_tests/chromium_clang.py
[modify] https://crrev.com/12aef4d122e2319e903a2d0309f5d0d8de6d5e3a/masters/master.chromium.clang/builders.pyl

Project Member

Comment 28 by bugdroid1@chromium.org, Feb 15 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9f24f06746736b03e8be0597069d16129e4fdf62

commit 9f24f06746736b03e8be0597069d16129e4fdf62
Author: Peter Collingbourne <pcc@chromium.org>
Date: Thu Feb 15 02:25:27 2018

Add ToTWinLibcxx64 bot (src).

This bot is for testing that we can build with the libc++ standard
library on Windows.

Bug: 801780
Change-Id: Ifeb58bf7dfeec79afcdb30308b436d86d5769d36
Reviewed-on: https://chromium-review.googlesource.com/920741
Commit-Queue: Peter Collingbourne <pcc@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#536930}
[modify] https://crrev.com/9f24f06746736b03e8be0597069d16129e4fdf62/testing/buildbot/chromium.clang.json
[modify] https://crrev.com/9f24f06746736b03e8be0597069d16129e4fdf62/testing/buildbot/waterfalls.pyl
[modify] https://crrev.com/9f24f06746736b03e8be0597069d16129e4fdf62/tools/mb/mb_config.pyl

Project Member

Comment 29 by bugdroid1@chromium.org, Feb 21 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/54a5cde1d88a0308ca06044a443e72c9d6400f30

commit 54a5cde1d88a0308ca06044a443e72c9d6400f30
Author: Peter Collingbourne <pcc@chromium.org>
Date: Wed Feb 21 02:56:49 2018

Don't try to do a branded build on ToTWinLibcxx64.

This won't work on bots that don't check out src-internal.

Bug: 801780
Change-Id: Iae866794b8944682da6b805297c2f90d5c677a85
Reviewed-on: https://chromium-review.googlesource.com/927814
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Peter Collingbourne <pcc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#538008}
[modify] https://crrev.com/54a5cde1d88a0308ca06044a443e72c9d6400f30/tools/mb/mb_config.pyl

Comment 30 by p...@chromium.org, Feb 27 2018

Blockedon: 813219
Cc: pwnall@chromium.org
Project Member

Comment 32 by bugdroid1@chromium.org, Feb 28 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c85bc32228727fbbc7e5516abcad8761c22cbe04

commit c85bc32228727fbbc7e5516abcad8761c22cbe04
Author: Peter Collingbourne <pcc@chromium.org>
Date: Wed Feb 28 02:22:15 2018

Roll src/third_party/libaddressinput/src/ a575c63de..d955c63ec (1 commit)

https://chromium.googlesource.com/external/libaddressinput.git/+log/a575c63de328..d955c63ec704

$ git log a575c63de..d955c63ec --date=short --no-merges --format='%ad %ae %s'
2018-01-17 peter Make size.h compatible with libc++ on Windows. (#153)

Created with:
  roll-dep src/third_party/libaddressinput/src

Bug: 801780
Change-Id: I856bb1e9fedb0c2aa1f9cacc8db3a81c055342cb
Reviewed-on: https://chromium-review.googlesource.com/939877
Reviewed-by: Rouslan Solomakhin <rouslan@chromium.org>
Commit-Queue: Peter Collingbourne <pcc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#539663}
[modify] https://crrev.com/c85bc32228727fbbc7e5516abcad8761c22cbe04/DEPS

Project Member

Comment 34 by bugdroid1@chromium.org, Feb 28 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/aab3f052362a1a7368d54ead6c66aec9a6b1be60

commit aab3f052362a1a7368d54ead6c66aec9a6b1be60
Author: Victor Costan <pwnall@chromium.org>
Date: Wed Feb 28 16:45:03 2018

Roll src/third_party/googletest/src/ 7d15497f7..fe1144246 (5 commits)

https://chromium.googlesource.com/external/github.com/google/googletest.git/+log/7d15497f7538..fe1144246e7e

$ git log 7d15497f7..fe1144246 --date=short --no-merges --format='%ad %ae %s'
2018-02-27 zhangxy988 Add documentation for VariantWith.
2018-02-27 misterg gmock merging -2
2018-02-27 zhangxy988 Add matcher for std::variant.
2018-01-24 pcc Use _CPPUNWIND instead of _HAS_EXCEPTIONS with MSVC.
2018-01-25 pcc Pass -EHs-c- to disable exceptions with MSVC.

Created with:
  roll-dep src/third_party/googletest/src

Bug:  813219 , 801780
Change-Id: I50f91ea85c1f118b18820450fbff18716d63b61a
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel;master.tryserver.chromium.win:win_chrome_official
Reviewed-on: https://chromium-review.googlesource.com/941061
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#539850}
[modify] https://crrev.com/aab3f052362a1a7368d54ead6c66aec9a6b1be60/DEPS

Project Member

Comment 35 by bugdroid1@chromium.org, Mar 1 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/00cd8d321b9aa7459fedb7cb7e62c1e5cc185005

commit 00cd8d321b9aa7459fedb7cb7e62c1e5cc185005
Author: Peter Collingbourne <pcc@chromium.org>
Date: Thu Mar 01 04:34:32 2018

Add missing exe_and_shlib_deps dependency to dump_syms target.

Required for libc++ on Windows.

Bug: 801780
Change-Id: I06d9ca131cb7ce09475ae3a302210ad9fcbae711
Reviewed-on: https://chromium-review.googlesource.com/941990
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Peter Collingbourne <pcc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#540051}
[modify] https://crrev.com/00cd8d321b9aa7459fedb7cb7e62c1e5cc185005/third_party/breakpad/BUILD.gn

Project Member

Comment 36 by bugdroid1@chromium.org, Mar 7 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/932bda52328d04e32aa2abdf2cd6cb726cf3fa67

commit 932bda52328d04e32aa2abdf2cd6cb726cf3fa67
Author: Ryan Tseng <hinoka@google.com>
Date: Wed Mar 07 03:52:24 2018

[milo] Update consoles

As per: https://ci.chromium.org/p/infra/builders/luci.infra.ci/luci-check/90

BUG:  810907 , 801780,  815295 , 814935, 746816
Change-Id: I6a47d472ff304b2265971bdbf4431ed31af73d61
Reviewed-on: https://chromium-review.googlesource.com/952366
Commit-Queue: Ryan Tseng <hinoka@chromium.org>
Reviewed-by: John Budorick <jbudorick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#541314}
[modify] https://crrev.com/932bda52328d04e32aa2abdf2cd6cb726cf3fa67/infra/config/global/luci-milo.cfg

Project Member

Comment 37 by bugdroid1@chromium.org, Mar 7 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ffdfde4c3433524cd69bd703802984e654c17dcc

commit ffdfde4c3433524cd69bd703802984e654c17dcc
Author: Peter Collingbourne <pcc@chromium.org>
Date: Wed Mar 07 21:07:47 2018

mini_installer: Don't depend on exe_and_shlib_deps unless asan is enabled.

mini_installer is a "special" target that avoids linking against
vcruntime by defining a custom entry point. In normal Windows builds,
exe_and_shlib_deps will be empty, so depending on it has no effect. But
when building with use_custom_libcxx=true, exe_and_shlib_deps depends
on libc++, which in turn depends on vcruntime, leading to undefined
symbol errors at link time when the custom entry point is used.

This change avoids the dependency on exe_and_shlib_deps unless the
custom entry point is disabled, i.e. when we are linking with asan.

Bug: 801780
Change-Id: Ieff8004ef14c9fda20ff23234cab364ae949afbe
Reviewed-on: https://chromium-review.googlesource.com/952068
Commit-Queue: Peter Collingbourne <pcc@chromium.org>
Reviewed-by: Greg Thompson <grt@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#541580}
[modify] https://crrev.com/ffdfde4c3433524cd69bd703802984e654c17dcc/chrome/installer/mini_installer/BUILD.gn

Project Member

Comment 38 by bugdroid1@chromium.org, Mar 9 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3668a726051817051d376caf7a35b20f6c665ccf

commit 3668a726051817051d376caf7a35b20f6c665ccf
Author: Nico Weber <thakis@chromium.org>
Date: Fri Mar 09 14:21:00 2018

Don't run ChromePluginTest.InstalledPlugins in is_official_build=true is_chrome_branded=false builds.

ToTWinLibcxx64 sets is_official_build=true but doesn't have src-internal
checked out.  The test currently fails there because it needs files from
src-internal.  The fix is to run the test if is_chrome_branded is set (which
requires a src-internal checkout), instead of when is_official_build is set.

Bug: 801780
Change-Id: Icbfaf8c978ac7618d67b1d7e0cd1f48be45a8232
Reviewed-on: https://chromium-review.googlesource.com/957123
Reviewed-by: Hans Wennborg <hans@chromium.org>
Cr-Commit-Position: refs/heads/master@{#542098}
[modify] https://crrev.com/3668a726051817051d376caf7a35b20f6c665ccf/chrome/browser/chrome_plugin_browsertest.cc

Project Member

Comment 39 by bugdroid1@chromium.org, Mar 9 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/06ba28c97323401428c47c7daada5b2d86653ac5

commit 06ba28c97323401428c47c7daada5b2d86653ac5
Author: Nico Weber <thakis@chromium.org>
Date: Fri Mar 09 21:12:59 2018

Attempt to get SharedSamplerTest.PhysicalMemory passing with libc++.

Currently fails on the libc++ bot with

../../chrome/browser/task_manager/sampling/shared_sampler_win_unittest.cc(144):
    error: Expected: (physical_bytes()) >= (initial_value + allocated_size),
             actual: 15224832 vs 19419136

The reason seems to be that memory use is only counted if the memory is
referenced, and with libc++ the compiler is apparently able to optimize away
the memory's initialization.  Add some reading code to make sure the
memory references remain.

Bug: 801780
Change-Id: I8edef2eda4be8b4344ebc934768ecd58ee39496b
Reviewed-on: https://chromium-review.googlesource.com/956571
Commit-Queue: Nico Weber <thakis@chromium.org>
Reviewed-by: Hans Wennborg <hans@chromium.org>
Cr-Commit-Position: refs/heads/master@{#542225}
[modify] https://crrev.com/06ba28c97323401428c47c7daada5b2d86653ac5/chrome/browser/task_manager/sampling/shared_sampler_win_unittest.cc

After the 3 fixes, https://ci.chromium.org/buildbot/chromium.clang/ToTWinLibcxx64/ now has green tests -- most of the work was getting it to build; getting tests to pass was surprisingly easy.
(3rd fix was on  issue 813553 )
Looks like the libc++ bot takes 10%ish longer to compile than the corresponding non-libc++ bot (https://ci.chromium.org/buildbot/chromium.clang/ToTWin64/1072), assuming the slaves have comparable hardware :-/

Comment 43 by ebra...@gnu.org, Mar 15 2018

Cc: ebra...@gnu.org
Break in V8 with libc++. Confirmed both locally and by the ToTWinLibcxx bot.

Started here:

https://ci.chromium.org/buildbot/chromium.clang/ToTWinLibcxx64/305

[27544/59729] CXX obj/v8/v8_libbase/platform-win32.obj
FAILED: obj/v8/v8_libbase/platform-win32.obj
../../third_party/llvm-build/Release+Asserts/bin/clang-cl.exe /nologo /showIncludes  "-imsvcc:\b\c\win_toolchain\vs_files\1180cb75833ea365097e279efb2d5d7a42dee4b0\win_sdk\bin\..\..\win_sdk\include\10.0.15063.0\um" "-imsvcc:\b\c\win_toolchain\vs_files\1180cb75833ea365097e279efb2d5d7a42dee4b0\win_sdk\bin\..\..\win_sdk\include\10.0.15063.0\shared" "-imsvcc:\b\c\win_toolchain\vs_files\1180cb75833ea365097e279efb2d5d7a42dee4b0\win_sdk\bin\..\..\win_sdk\include\10.0.15063.0\winrt" "-imsvcc:\b\c\win_toolchain\vs_files\1180cb75833ea365097e279efb2d5d7a42dee4b0\win_sdk\bin\..\..\win_sdk\include\10.0.15063.0\ucrt" "-imsvcc:\b\c\win_toolchain\vs_files\1180cb75833ea365097e279efb2d5d7a42dee4b0\win_sdk\bin\..\..\vc\tools\msvc\14.11.25503\include" "-imsvcc:\b\c\win_toolchain\vs_files\1180cb75833ea365097e279efb2d5d7a42dee4b0\win_sdk\bin\..\..\vc\tools\msvc\14.11.25503\atlmfc\include" -D_CRT_RAND_S -DV8_DEPRECATION_WARNINGS -DUSE_AURA=1 -DNO_TCMALLOC -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DOFFICIAL_BUILD -DCHROMIUM_BUILD -DFIELDTRIAL_TESTING_ENABLED -D"CR_CLANG_REVISION=\"328443\"" -D__STD_C -D_CRT_RAND_S -D_CRT_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_DEPRECATE -DDEPRECATEDENUMERATOR(x)=[[deprecated(x)]] -D_ATL_NO_OPENGL -D_WINDOWS -DCERT_CHAIN_PARA_HAS_EXTRA_FIELDS -DPSAPI_VERSION=1 -DWIN32 -D_SECURE_ATL -D_USING_V110_SDK71_ -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCPP_NO_AUTO_LINK -DWIN32_LEAN_AND_MEAN -DNOMINMAX -D_UNICODE -DUNICODE -DNTDDI_VERSION=0x0A000002 -D_WIN32_WINNT=0x0A00 -DWINVER=0x0A00 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DV8_TYPED_ARRAY_MAX_SIZE_IN_HEAP=64 -DV8_INTL_SUPPORT -DENABLE_HANDLE_ZAPPING -DV8_USE_SNAPSHOT -DV8_USE_EXTERNAL_STARTUP_DATA -DV8_CONCURRENT_MARKING -DV8_EMBEDDED_BUILTINS -DV8_TARGET_ARCH_X64 -I../.. -Igen -I../../v8 -fcolor-diagnostics -Xclang -mllvm -Xclang -instcombine-lower-dbg-declare=0 /Gy /FS /bigobj /d2FastFail /Zc:sizedDealloc- -fmsc-version=1911 -m64 /W4 -Wimplicit-fallthrough -Wthread-safety /WX /utf-8 /wd4091 /wd4127 /wd4251 /wd4275 /wd4312 /wd4324 /wd4351 /wd4355 /wd4503 /wd4589 /wd4611 /wd4100 /wd4121 /wd4244 /wd4505 /wd4510 /wd4512 /wd4610 /wd4838 /wd4995 /wd4996 /wd4456 /wd4457 /wd4458 /wd4459 -Wno-unknown-pragmas -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override -Wno-undefined-var-template -Wno-nonportable-include-path -Wno-address-of-packed-member -Wno-unused-lambda-capture -Wno-user-defined-warnings -Wno-enum-compare-switch -Wno-null-pointer-arithmetic -Wno-ignored-pragma-optimize /MT -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wmissing-field-initializers -Winconsistent-missing-override -Wunreachable-code -Wshorten-64-to-32 /wd4245 /wd4267 /wd4324 /wd4701 /wd4702 /wd4703 /wd4709 /wd4714 /wd4718 /wd4800 /O2 /Ob2 /Oy- /Zc:inline /Gw /TP /wd4577 /GR- -I../../buildtools/third_party/libc++/trunk/include /c ../../v8/src/base/platform/platform-win32.cc /Foobj/v8/v8_libbase/platform-win32.obj /Fd"obj/v8/v8_libbase_cc.pdb"
../../v8/src/base/platform/platform-win32.cc(1256,21):  error: use of undeclared identifier '_CRT_WARN'
_CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_DEBUG | _CRTDBG_MODE_FILE);
^
../../v8/src/base/platform/platform-win32.cc(1256,32):  error: use of undeclared identifier '_CRTDBG_MODE_DEBUG'
_CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_DEBUG | _CRTDBG_MODE_FILE);
^
../../v8/src/base/platform/platform-win32.cc(1256,53):  error: use of undeclared identifier '_CRTDBG_MODE_FILE'
_CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_DEBUG | _CRTDBG_MODE_FILE);
^
../../v8/src/base/platform/platform-win32.cc(1257,21):  error: use of undeclared identifier '_CRT_WARN'
_CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDERR);
^
../../v8/src/base/platform/platform-win32.cc(1257,32):  error: use of undeclared identifier '_CRTDBG_FILE_STDERR'
_CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDERR);
^
../../v8/src/base/platform/platform-win32.cc(1258,21):  error: use of undeclared identifier '_CRT_ASSERT'
_CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_DEBUG | _CRTDBG_MODE_FILE);
^
../../v8/src/base/platform/platform-win32.cc(1258,34):  error: use of undeclared identifier '_CRTDBG_MODE_DEBUG'
_CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_DEBUG | _CRTDBG_MODE_FILE);
^
../../v8/src/base/platform/platform-win32.cc(1258,55):  error: use of undeclared identifier '_CRTDBG_MODE_FILE'
_CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_DEBUG | _CRTDBG_MODE_FILE);
^
../../v8/src/base/platform/platform-win32.cc(1259,21):  error: use of undeclared identifier '_CRT_ASSERT'
_CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);
^
../../v8/src/base/platform/platform-win32.cc(1259,34):  error: use of undeclared identifier '_CRTDBG_FILE_STDERR'
_CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);
^
../../v8/src/base/platform/platform-win32.cc(1260,21):  error: use of undeclared identifier '_CRT_ERROR'
_CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_DEBUG | _CRTDBG_MODE_FILE);
^
../../v8/src/base/platform/platform-win32.cc(1260,33):  error: use of undeclared identifier '_CRTDBG_MODE_DEBUG'
_CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_DEBUG | _CRTDBG_MODE_FILE);
^
../../v8/src/base/platform/platform-win32.cc(1260,54):  error: use of undeclared identifier '_CRTDBG_MODE_FILE'
_CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_DEBUG | _CRTDBG_MODE_FILE);
^
../../v8/src/base/platform/platform-win32.cc(1261,21):  error: use of undeclared identifier '_CRT_ERROR'
_CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDERR);
^
../../v8/src/base/platform/platform-win32.cc(1261,33):  error: use of undeclared identifier '_CRTDBG_FILE_STDERR'
_CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDERR);
^
15 errors generated.
Locally verified the patch works with a winlibc++ build. Thanks!
Project Member

Comment 48 by bugdroid1@chromium.org, Mar 30 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/e1e870a38c10fc61fb28e44735ee577e25eba9e7

commit e1e870a38c10fc61fb28e44735ee577e25eba9e7
Author: Reid Kleckner <rnk@google.com>
Date: Fri Mar 30 18:37:45 2018

Move include of <crtdbg.h> from d8.cc to platform-win32.cc

crtdbg.h provides the declarations for _CrtSetReportMode and the _CRT_*
constants. It should have moved in
https://chromium-review.googlesource.com/968244, but the MSVC C++
headers appear to include crtdbg.h transitively, so we only noticed this
on the libc++ Windows buildbot.

Tbr: mlippautz@chromium.org
Bug: chromium:801780
Change-Id: Ia07f6136e4b8d1f25014e00b0b9f662029ab5a2b
Reviewed-on: https://chromium-review.googlesource.com/981399
Commit-Queue: Adam Klein <adamk@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52309}
[modify] https://crrev.com/e1e870a38c10fc61fb28e44735ee577e25eba9e7/src/base/platform/platform-win32.cc
[modify] https://crrev.com/e1e870a38c10fc61fb28e44735ee577e25eba9e7/src/d8.cc

Comment 49 by p...@chromium.org, Apr 4 2018

Re c#5: Someone on #llvm mentioned that libc++ won't work with MSVC right now, primarily due to its use of #include_next.
marshall@ mentioned that CEF is interested in keeping the MS STL build going (with clang), since CEF users usually link against that. So we'll probably have to support both stdlibs.
[26/57155] CXX obj/buildtools/third_party/libc++/libc++/new.obj
FAILED: obj/buildtools/third_party/libc++/libc++/new.obj 
../../third_party/llvm-build/Release+Asserts/bin/clang-cl.exe /nologo /showIncludes  "-imsvcC:\b\c\win_toolchain\vs_files\1180cb75833ea365097e279efb2d5d7a42dee4b0\win_sdk\bin\..\..\win_sdk\Include\10.0.15063.0\um" "-imsvcC:\b\c\win_toolchain\vs_files\1180cb75833ea365097e279efb2d5d7a42dee4b0\win_sdk\bin\..\..\win_sdk\Include\10.0.15063.0\shared" "-imsvcC:\b\c\win_toolchain\vs_files\1180cb75833ea365097e279efb2d5d7a42dee4b0\win_sdk\bin\..\..\win_sdk\Include\10.0.15063.0\winrt" "-imsvcC:\b\c\win_toolchain\vs_files\1180cb75833ea365097e279efb2d5d7a42dee4b0\win_sdk\bin\..\..\win_sdk\Include\10.0.15063.0\ucrt" "-imsvcC:\b\c\win_toolchain\vs_files\1180cb75833ea365097e279efb2d5d7a42dee4b0\win_sdk\bin\..\..\VC\Tools\MSVC\14.11.25503\include" "-imsvcC:\b\c\win_toolchain\vs_files\1180cb75833ea365097e279efb2d5d7a42dee4b0\win_sdk\bin\..\..\VC\Tools\MSVC\14.11.25503\atlmfc\include" -D_LIBCPP_BUILDING_LIBRARY -D"_LIBCPP_OVERRIDABLE_FUNC_VIS=__attribute__((__visibility__(\"default\")))" -DV8_DEPRECATION_WARNINGS -DUSE_AURA=1 -DNO_TCMALLOC -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DOFFICIAL_BUILD -DCHROMIUM_BUILD -DFIELDTRIAL_TESTING_ENABLED -D"CR_CLANG_REVISION=\"329768\"" -D__STD_C -D_CRT_RAND_S -D_CRT_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_DEPRECATE -DDEPRECATEDENUMERATOR(x)=[[deprecated(x)]] -D_ATL_NO_OPENGL -D_WINDOWS -DCERT_CHAIN_PARA_HAS_EXTRA_FIELDS -DPSAPI_VERSION=1 -DWIN32 -D_SECURE_ATL -D_USING_V110_SDK71_ -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCPP_NO_AUTO_LINK -DWINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP -DWIN32_LEAN_AND_MEAN -DNOMINMAX -D_UNICODE -DUNICODE -DNTDDI_VERSION=0x0A000002 -D_WIN32_WINNT=0x0A00 -DWINVER=0x0A00 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE -I../.. -Igen /utf-8 /X -fcolor-diagnostics -Xclang -mllvm -Xclang -instcombine-lower-dbg-declare=0 /Gy /FS /bigobj /d2FastFail /Zc:sizedDealloc- -fmsc-version=1911 -m64 /O1 /Ob2 /Oy- /Zc:inline /Gw /Oi /MT -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -fstrict-aliasing -Wno-macro-redefined /W3 /wd4800 /wd4267 /wd4996 -Wno-unused-variable /WX /wd4091 /wd4127 /wd4251 /wd4275 /wd4312 /wd4324 /wd4351 /wd4355 /wd4503 /wd4589 /wd4611 /wd4100 /wd4121 /wd4244 /wd4505 /wd4510 /wd4512 /wd4610 /wd4838 /wd4995 /wd4996 /wd4456 /wd4457 /wd4458 /wd4459 -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override -Wno-undefined-var-template -Wno-nonportable-include-path -Wno-address-of-packed-member -Wno-unused-lambda-capture -Wno-user-defined-warnings -Wno-enum-compare-switch -Wno-null-pointer-arithmetic -Wno-ignored-pragma-optimize /TP -I../../buildtools/third_party/libc++/trunk/include /wd4577 /EHsc /GR /c ../../buildtools/third_party/libc++/trunk/src/new.cpp /Foobj/buildtools/third_party/libc++/libc++/new.obj /Fd"obj/buildtools/third_party/libc++/libc++_cc.pdb"
In file included from ../../buildtools/third_party/libc++/trunk/src/new.cpp:14:
../../buildtools/third_party/libc++/trunk/include\new(246,11):  error: unknown type name 'align_val_t'
    const align_val_t __align_val = static_cast<align_val_t>(__align);
          ^
../../buildtools/third_party/libc++/trunk/include\new(246,49):  error: unknown type name 'align_val_t'
    const align_val_t __align_val = static_cast<align_val_t>(__align);
                                                ^
../../buildtools/third_party/libc++/trunk/include\new(266,11):  error: unknown type name 'align_val_t'
    const align_val_t __align_val = static_cast<align_val_t>(__align);
          ^
../../buildtools/third_party/libc++/trunk/include\new(266,49):  error: unknown type name 'align_val_t'
    const align_val_t __align_val = static_cast<align_val_t>(__align);
                                                ^
4 errors generated.

----------------

Confirmed locally and by the ToTWinLibcxx64 buildbot:

https://ci.chromium.org/buildbot/chromium.clang/ToTWinLibcxx64/476

Appears to have started:

https://ci.chromium.org/buildbot/chromium.clang/ToTWinLibcxx64/460

Comment 52 by r...@chromium.org, Apr 19 2018

This was caused by an upstream change: https://reviews.llvm.org/rL328180#inline-1936
Blocking: 840822
Project Member

Comment 54 by bugdroid1@chromium.org, Aug 22

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/db518e6aa7561efe66b86e288e3f0158aa8dc9aa

commit db518e6aa7561efe66b86e288e3f0158aa8dc9aa
Author: Nico Weber <thakis@chromium.org>
Date: Wed Aug 22 16:51:25 2018

Simplify test by calling strlen() instead of std::move().

(The motivation here is to fix a compile error on the libc++ bot -- looks like
std::size() is a C++17 thing, and libc++ only enables these functions with
/std:c++17 while the MSVC STL allows it even in C++14 language mode. But using
strlen() is simpler too.)

Bug: 801780
Change-Id: Ic955935253e61d3a3947a314a2bdc3e0a9354016
Reviewed-on: https://chromium-review.googlesource.com/1182081
Reviewed-by: Greg Thompson <grt@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#585089}
[modify] https://crrev.com/db518e6aa7561efe66b86e288e3f0158aa8dc9aa/base/win/pe_image_unittest.cc

Building 71.0.3544.0....

is_clang = true
is_component_build = false
is_debug = false
target_cpu = "x64"
use_lld = true
use_custom_libcxx = true

C:\depot_tools\chromium\src>ninja -C out/testing chrome.exe
ninja: Entering directory `out/testing'
[427/36415] CXX obj/buildtools/third_party/libc++/libc++/new.obj
FAILED: obj/buildtools/third_party/libc++/libc++/new.obj
../../third_party/llvm-build/Release+Asserts/bin/clang-cl.exe /nologo /showIncludes  "-imsvc..\..\..\..\..\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\ATLMFC\include" "-imsvc..\..\..\..\..\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\include" "-imsvc..\..\..\..\..\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" "-imsvc..\..\..\..\..\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" "-imsvc..\..\..\..\..\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um" "-imsvc..\..\..\..\..\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" "-imsvc..\..\..\..\..\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\cppwinrt" "-imsvc..\..\..\..\..\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\ATLMFC\include" "-imsvc..\..\..\..\..\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\include" "-imsvc..\..\..\..\..\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" "-imsvc..\..\..\..\..\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" "-imsvc..\..\..\..\..\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um" "-imsvc..\..\..\..\..\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" "-imsvc..\..\..\..\..\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\cppwinrt" -D_LIBCPP_BUILDING_LIBRARY "-D_LIBCPP_OVERRIDABLE_FUNC_VIS=__attribute__((__visibility__(\"default\")))" -DV8_DEPRECATION_WARNINGS -DUSE_AURA=1 -DNO_TCMALLOC -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -DFIELDTRIAL_TESTING_ENABLED "-DCR_CLANG_REVISION=\"340925-1\"" -D__STD_C -D_CRT_RAND_S -D_CRT_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_DEPRECATE -D_ATL_NO_OPENGL -D_WINDOWS -DCERT_CHAIN_PARA_HAS_EXTRA_FIELDS -DPSAPI_VERSION=1 -DWIN32 -D_SECURE_ATL -D_USING_V110_SDK71_ -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCPP_NO_AUTO_LINK -DWINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP -DWIN32_LEAN_AND_MEAN -DNOMINMAX -D_UNICODE -DUNICODE -DNTDDI_VERSION=0x0A000002 -D_WIN32_WINNT=0x0A00 -DWINVER=0x0A00 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE -I../.. -Igen /utf-8 /X -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -fcolor-diagnostics -fmerge-all-constants -Xclang -mllvm -Xclang -instcombine-lower-dbg-declare=0 -no-canonical-prefixes -fcomplete-member-pointers /Gy /FS /bigobj /d2FastFail /Zc:sizedDealloc- -fmsc-version=1911 -m64 /Brepro /O1 /Ob2 /Oy- /Zc:inline /Gw /Oi /Z7 -fno-standalone-debug /MT -Xclang -add-plugin -Xclang find-bad-constructs -Xclang -plugin-arg-find-bad-constructs -Xclang enforce-in-thirdparty-webkit -Xclang -plugin-arg-find-bad-constructs -Xclang check-enum-max-value -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -fstrict-aliasing -Wno-macro-redefined /W3 /wd4800 /wd4267 /wd4996 -Wno-unused-variable /WX /wd4091 /wd4127 /wd4251 /wd4275 /wd4312 /wd4324 /wd4351 /wd4355 /wd4503 /wd4589 /wd4611 /wd4100 /wd4121 /wd4244 /wd4505 /wd4510 /wd4512 /wd4610 /wd4838 /wd4995 /wd4996 /wd4456 /wd4457 /wd4458 /wd4459 /wd4200 /wd4201 /wd4204 /wd4221 /wd4245 /wd4267 /wd4305 /wd4389 /wd4702 /wd4701 /wd4703 /wd4661 /wd4706 /wd4715 /wd4702 -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-unneeded-internal-declaration -Wno-undefined-var-template -Wno-nonportable-include-path -Wno-user-defined-warnings -Wno-unused-lambda-capture -Wno-null-pointer-arithmetic -Wno-enum-compare-switch -Wno-ignored-pragma-optimize /TP -I../../buildtools/third_party/libc++/trunk/include /wd4577 /EHsc /GR /c ../../buildtools/third_party/libc++/trunk/src/new.cpp /Foobj/buildtools/third_party/libc++/libc++/new.obj /Fd"obj/buildtools/third_party/libc++/libc++_cc.pdb"
../../buildtools/third_party/libc++/trunk/src/new.cpp(40,17):  error: chosen constructor is explicit in copy-initialization
const nothrow_t nothrow = {};
                ^         ~~
..\..\..\..\..\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\include\vcruntime_new.h(53,22):  note: explicit constructor declared here
            explicit nothrow_t() = default;
                     ^
1 error generated.
[432/36415] CXX obj/buildtools/third_party/libc++/libc++/algorithm.obj
ninja: build stopped: subcommand failed.
Removed "explicit" on line 53 in vcruntime_new.h under MSVC 14.15.26726.

Grabbed fresh LLVM. Disabled duplicate symbol reporting in SymbolTable.cpp for LLD. Built LLVM.

Added cflags_cc += [ "-Xclang", "-std=c++17" ] to the Chromium Windows build config.

Set "use_custom_libcxx = true" and "treat_warnings_as_errors = false".

Built a working binary of Chromium 64-bit (r592993) for Windows using libc++.

Using the build to post this comment.
Looks like /std:std=c++17 would have worked for clang-cl as well. Anyway.
libc++ is no longer using always_inline as of r345516, so c#2 is no longer a code size concern for switching on Windows.
Labels: Pri-2
Setting defect without priority to Pri-2.
Setting defect without priority to Pri-2.

Sign in to add a comment