llvm-project/llvm/utils/gn/build
Nico Weber 7e33fd9ce2 [gn build] Link with -Wl,--gdb-index when linking with LLD
For full-debug-info (is_debug=true / symbol_level=2 builds), this makes
linking 15% slower, but gdb startup 1500% faster (for lld: link time
3.9s->4.4s, gdb load time >30s->2s).

For link time, I ran

    bench.py -o {noindex,index}.txt \
        sh -c 'rm out/gn/bin/lld && ninja -C out/gn lld'

and then `ministat noindex.txt index.txt`:

```
x noindex.txt
+ index.txt
    N           Min           Max        Median           Avg        Stddev
x   5      3.784461     4.0200169     3.8452811     3.8754988   0.089902595
+   5       4.32496     4.6058481     4.3361208     4.4141198    0.12288267
Difference at 95.0% confidence
	0.538621 +/- 0.15702
	13.8981% +/- 4.05161%
	(Student's t, pooled s = 0.107663)
```

For gdb load time I loaded the crash in PR48392 with

    gdb -ex r --args ../out/gn/bin/ld64.lld.darwinnew @response.txt

and just stopped the time until the crash got displayed with a stopwatch
a few times. So the speedup there is less precise, but it's so
pronounced that that's ok (loads ~instantly with the patch, takes a very
long time without it).

Only doing this for LLD because I haven't tried it with other linkers.

Differential Revision: https://reviews.llvm.org/D92844
2020-12-17 15:39:00 -05:00
..
libs [HWASan] Add sizeof(global) in report even if symbols missing. 2020-06-09 13:02:13 -07:00
toolchain [gn build] Use forward slashes for goma directory 2020-11-17 17:10:36 -08:00
BUILD.gn [gn build] Link with -Wl,--gdb-index when linking with LLD 2020-12-17 15:39:00 -05:00
BUILDCONFIG.gn
buildflags.gni [gn build] Add symbol_level to adjust debug info level 2020-12-17 09:20:53 -08:00
fuzzer.gni
mac_sdk.gni [gn build] Add libclang_rt.ios.a, libclang_rt.iossim.a to the build 2020-10-12 16:21:04 -04:00
run_tablegen.py
symlink_or_copy.gni [gn build] re-run "gn format" with trunk gn 2020-01-15 13:37:38 -05:00
symlink_or_copy.py
sync_source_lists_from_cmake.py [gn build] sync script: try to make sync script even clearer 2020-12-01 14:35:27 -05:00
write_cmake_config.gni [gn build] re-run "gn format" with trunk gn 2020-01-15 13:37:38 -05:00
write_cmake_config.py fix a comment grammar-o 2020-03-30 14:40:15 -04:00
write_library_dependencies.py [gn build] modify hotfix in 17df195f70 to work with all enabled targets 2020-11-23 21:28:54 -05:00
write_vcsrevision.gni [gn build] replace llvm_allow_tardy_revision with llvm_append_vc_rev 2020-01-16 19:05:07 -05:00
write_vcsrevision.py [gn build] replace llvm_allow_tardy_revision with llvm_append_vc_rev 2020-01-16 19:05:07 -05:00