diff options
author | Jade Lovelace <lix@jade.fyi> | 2024-03-18 23:03:48 -0700 |
---|---|---|
committer | jade <lix@jade.fyi> | 2024-03-27 03:52:57 +0000 |
commit | 412a9c9f6719a6c62e8f5b6265714428d2ad4013 (patch) | |
tree | 411ebdeaa53cbf0129f7cfcdf2ebecdd6141178f /meson.build | |
parent | 50c6feeb7747f8fd36aad801b7225552b0481dab (diff) |
Enable clang build timing analysis
I didn't enable this by default for clang due to making the build time
10% worse or so. Unfortunate, but tbh devs for whom 10% of build time is
not *that* bad should probably simply enable this.
Change-Id: I8d1e5b6f3f76c649a4e2f115f534f7f97cee46e6
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/meson.build b/meson.build index 66a30f716..0a6a6b4b1 100644 --- a/meson.build +++ b/meson.build @@ -307,6 +307,14 @@ if cxx.get_linker_id() in ['ld.bfd', 'ld.gold'] add_project_link_arguments('-Wl,--no-copy-dt-needed-entries', language : 'cpp') endif +# Generate Chromium tracing files for each compiled file, which enables +# maintainers/buildtime_report.sh BUILD-DIR to simply work in clang builds. +# +# They can also be manually viewed at https://ui.perfetto.dev +if get_option('profile-build').require(meson.get_compiler('cpp').get_id() == 'clang').enabled() + add_project_arguments('-ftime-trace', language: 'cpp') +endif + subdir('src') if enable_tests subdir('tests/unit') |