[libcxx-commits] [PATCH] D70343: Add a `_LIBCPP_HARDEN` define
Chris Palmer via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed May 13 11:25:15 PDT 2020
palmer added a comment.
Here are some binary size numbers, from a Chromium release build. Here is the build configuration (likely meaningful only to Chromium people; but this basically means "fully optimized except for the final PGO phase"):
~/chromium/src $ cat out/Release/args.gn
is_debug = false
is_official_build = true
is_asan = false
use_goma = true
enable_nacl = false
is_component_build = false
origin/master:
-rwxr-xr-x 1 palmer primarygroup 162973344 May 12 17:30 out/Release/chrome
With libcxx-debug-level-0:
-rwxr-xr-x 1 palmer primarygroup 169825792 May 12 18:20 out/Release/chrome
Cost: 6,852,448 (4.2% of 162,973,344)
With libcxx-debug-level-0 with __builtin_trap instead of printing:
-rwxr-xr-x 1 palmer primarygroup 167307088 May 13 10:08 out/Release/chrome
Cost: 4,333,744 (2.6% of 162,973,344)
So the cost is still high, but significantly less with __builtin_trap. So I think this mode is valuable.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70343/new/
https://reviews.llvm.org/D70343
More information about the libcxx-commits
mailing list