[gn build] Build with Fission on non-mac non-win when using lld
authorNico Weber <thakis@chromium.org>
Fri, 3 Dec 2021 14:59:16 +0000 (09:59 -0500)
committerNico Weber <thakis@chromium.org>
Fri, 3 Dec 2021 16:07:52 +0000 (11:07 -0500)
commit1217b4b46fce698cfbc869ec0f43b074f3f5f874
treed3e58d0026c3042c4cbe88fd8dbdc44cb9c5c1a6
parentead3979a92fc33add4710c4510d6906260dcb4ad
[gn build] Build with Fission on non-mac non-win when using lld

In release+sym builds (-O2 -g), reduces time to link `clang`
from 2.3s to 1.3s (-42%).

In debug builds (-g), reduces time to link `clang`
from 5.4s to 4.5s (-17.4%).

See the phab review for full `ministat` numbers.

In the CMake build this is opt-in via LLVM_USE_SPLIT_DWARF.
Since the GN build is targeted at developers, enabling it by default
seems like a better default setting here. (If it turns out to cause
problems, we can add an opt-out.)

Time to load the binary into gdb and to set a breakpoint is unchanged.
Time from `run` to hitting a breakpoint in `main` feel a bit faster
(~4s -> ~2s), but I dind't do a careful statistical anlysis for this.

Differential Revision: https://reviews.llvm.org/D115040
llvm/utils/gn/build/BUILD.gn