Discussion:
[chromium-dev] Windows component build become 1.3~1.4x faster
Takuto Ikuta
2018-11-12 04:35:07 UTC
Permalink
Hi chromium developers (especially on windows).

I just landed a CL
<https://chromium-review.googlesource.com/c/1317069> enabling
a new clang flag "/Zc:dllexportInlines-" (draft document
<https://reviews.llvm.org/D54319>) collaborating with chrome c++ toolchain
team (hans <***@chromium.org>, thakis <***@chromium.org> and rnk
<***@chromium.org>).
This flag makes windows component build 1.3~1.4x faster with goma
<https://docs.google.com/document/d/1_W-RsPe5LMz8LOm2Cz1hQ9OlmpTNARbBzARaM81RBYM/edit?usp=sharing>
and
1.1~1.3x faster without goma <https://reviews.llvm.org/D51340>.
I hope this give windows developer better experience of faster edit and
test cycles on windows.

But you may see linker error like

[97/1686] LINK net_unittests.exe
FAILED: net_unittests.exe
ninja -t msvc -e environment.x86 --
../../third_party/llvm-build/Release+Asserts/bin/lld-link.exe /nologo
/OUT:./net_unittests.exe /PDB:./net_unittests.exe.pdb
@./net_unittests.exe.rsp
lld-link: error: undefined symbol: "bool __thiscall
net::internal::ClientSocketPoolBaseHelper::Group::RequestWithHandleHasJobForTesting(class
net::ClientSocketHandle const *) const"
@***@internal@net@@***@4@@Z)
referenced by
obj/net/net_unittests/client_socket_pool_base_unittest.obj:("bool
__thiscall
net::internal::ClientSocketPoolBaseHelper::RequestInGroupWithHandleHasJobForTesting(class
std::basic_string<char, struct std::char_traits<char>, class
std::allocator<char>> const &, class net::ClientSocketHandle const *)
@***@net@@QBE_NABV?$***@DU?$***@D@std@
@V?$***@D@2@@std@@***@3@@Z))
If you see this kind of error, please add export attribute to the class
<https://chromium-review.googlesource.com/c/chromium/src/+/1322333> (this
is recommended, but not always work) or function
<https://chromium-review.googlesource.com/c/chromium/src/+/1322331/2/third_party/blink/renderer/core/paint/ng/ng_paint_fragment.h>
where the undefined symbol is defined.

Also if you see other strange behavior, please let me know.

Thanks, Takuto
--
--
Chromium Developers mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+***@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CALNjmMrAV0LmVe%2BrTAb%2BA4cyrFTzmcHZ7AEkM4M%2B3JLC6f7ncA%40mail.gmail.com.
Hans Wennborg
2018-11-12 08:53:46 UTC
Permalink
Post by Takuto Ikuta
Hi chromium developers (especially on windows).
I just landed a CL enabling a new clang flag "/Zc:dllexportInlines-" (draft
document) collaborating with chrome c++ toolchain team (hans, thakis and
rnk).
This flag makes windows component build 1.3~1.4x faster with goma and
1.1~1.3x faster without goma.
I hope this give windows developer better experience of faster edit and test
cycles on windows.
But you may see linker error like
Post by Takuto Ikuta
[97/1686] LINK net_unittests.exe
FAILED: net_unittests.exe
ninja -t msvc -e environment.x86 --
../../third_party/llvm-build/Release+Asserts/bin/lld-link.exe /nologo
/OUT:./net_unittests.exe /PDB:./net_unittests.exe.pdb
@./net_unittests.exe.rsp
lld-link: error: undefined symbol: "bool __thiscall
net::internal::ClientSocketPoolBaseHelper::Group::RequestWithHandleHasJobForTesting(class
net::ClientSocketHandle const *) const"
referenced by
obj/net/net_unittests/client_socket_pool_base_unittest.obj:("bool __thiscall
net::internal::ClientSocketPoolBaseHelper::RequestInGroupWithHandleHasJobForTesting(class
std::basic_string<char, struct std::char_traits<char>, class
std::allocator<char>> const &, class net::ClientSocketHandle const *) const"
If you see this kind of error, please add export attribute to the class
(this is recommended, but not always work) or function where the undefined
symbol is defined.
The Clang User's Manual
https://clang.llvm.org/docs/UsersManual.html#the-zc-dllexportinlines-option
has some info on how this flag works and why it can create new link
errors.
--
--
Chromium Developers mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+***@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAB8jPhdaEg2AiRi10Sf2WDdnzJzKdPtjcFB%3D67ygbeh6KO6f-g%40mail.gmail.com.
b***@chromium.org
2018-11-13 18:10:57 UTC
Permalink
Another (related) benefit of this change is that .obj files get *much* smaller
in component builds. In one test of this change the total size of my .obj
files dropped from 30.7 GB to 18.5 GB. This has obvious implications for
disk cache effectiveness, the ability to have multiple output directories
on a small disk, and on link times (especially on slow disks or after the
files have aged out of the disk cache).

Excellent work.
Post by Takuto Ikuta
Post by Takuto Ikuta
Hi chromium developers (especially on windows).
I just landed a CL enabling a new clang flag "/Zc:dllexportInlines-"
(draft
Post by Takuto Ikuta
document) collaborating with chrome c++ toolchain team (hans, thakis and
rnk).
This flag makes windows component build 1.3~1.4x faster with goma and
1.1~1.3x faster without goma.
I hope this give windows developer better experience of faster edit and
test
Post by Takuto Ikuta
cycles on windows.
But you may see linker error like
Post by Takuto Ikuta
[97/1686] LINK net_unittests.exe
FAILED: net_unittests.exe
ninja -t msvc -e environment.x86 --
../../third_party/llvm-build/Release+Asserts/bin/lld-link.exe /nologo
/OUT:./net_unittests.exe /PDB:./net_unittests.exe.pdb
@./net_unittests.exe.rsp
lld-link: error: undefined symbol: "bool __thiscall
net::internal::ClientSocketPoolBaseHelper::Group::RequestWithHandleHasJobForTesting(class
Post by Takuto Ikuta
Post by Takuto Ikuta
net::ClientSocketHandle const *) const"
referenced by
obj/net/net_unittests/client_socket_pool_base_unittest.obj:("bool
__thiscall
net::internal::ClientSocketPoolBaseHelper::RequestInGroupWithHandleHasJobForTesting(class
Post by Takuto Ikuta
Post by Takuto Ikuta
std::basic_string<char, struct std::char_traits<char>, class
std::allocator<char>> const &, class net::ClientSocketHandle const
*) const"
Post by Takuto Ikuta
If you see this kind of error, please add export attribute to the class
(this is recommended, but not always work) or function where the
undefined
Post by Takuto Ikuta
symbol is defined.
The Clang User's Manual
https://clang.llvm.org/docs/UsersManual.html#the-zc-dllexportinlines-option
has some info on how this flag works and why it can create new link
errors.
--
--
Chromium Developers mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+***@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/6eba8108-6f48-49b9-aba6-c28cf0193533%40chromium.org.
Nico Weber
2018-11-14 23:34:49 UTC
Permalink
There's a longer write-up of what this change does at
http://blog.llvm.org/2018/11/30-faster-windows-builds-with-clang-cl_14.html
for people who are curious.
Post by Takuto Ikuta
Hi chromium developers (especially on windows).
I just landed a CL <https://chromium-review.googlesource.com/c/1317069> enabling
a new clang flag "/Zc:dllexportInlines-" (draft document
<https://reviews.llvm.org/D54319>) collaborating with chrome c++
This flag makes windows component build 1.3~1.4x faster with goma
<https://docs.google.com/document/d/1_W-RsPe5LMz8LOm2Cz1hQ9OlmpTNARbBzARaM81RBYM/edit?usp=sharing> and
1.1~1.3x faster without goma <https://reviews.llvm.org/D51340>.
I hope this give windows developer better experience of faster edit and
test cycles on windows.
But you may see linker error like
[97/1686] LINK net_unittests.exe
FAILED: net_unittests.exe
ninja -t msvc -e environment.x86 --
../../third_party/llvm-build/Release+Asserts/bin/lld-link.exe /nologo
/OUT:./net_unittests.exe /PDB:./net_unittests.exe.pdb
@./net_unittests.exe.rsp
lld-link: error: undefined symbol: "bool __thiscall
net::internal::ClientSocketPoolBaseHelper::Group::RequestWithHandleHasJobForTesting(class
net::ClientSocketHandle const *) const"
@***@internal@net@@***@4
@@Z)
referenced by
obj/net/net_unittests/client_socket_pool_base_unittest.obj:("bool
__thiscall
net::internal::ClientSocketPoolBaseHelper::RequestInGroupWithHandleHasJobForTesting(class
std::basic_string<char, struct std::char_traits<char>, class
std::allocator<char>> const &, class net::ClientSocketHandle const *)
@***@net@@QBE_NABV?$***@DU?$***@D@std@
@V?$***@D@2@@std@@***@3@@Z))
If you see this kind of error, please add export attribute to the class
<https://chromium-review.googlesource.com/c/chromium/src/+/1322333> (this
is recommended, but not always work) or function
<https://chromium-review.googlesource.com/c/chromium/src/+/1322331/2/third_party/blink/renderer/core/paint/ng/ng_paint_fragment.h>
where the undefined symbol is defined.
Also if you see other strange behavior, please let me know.
Thanks, Takuto
--
--
Chromium Developers mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+***@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAMGbLiGkq8iAr1FZpX%2BdXnLCfmD8YgYq_3h8xVRB7LrS%3Dz_Uhw%40mail.gmail.com.
Loading...