-
Notifications
You must be signed in to change notification settings - Fork 6k
Disable LTO in builds of CanvasKit to reduce binary size #40733
Disable LTO in builds of CanvasKit to reduce binary size #40733
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -15,6 +15,9 @@ wasm_toolchain("canvaskit") { | |||
skia_use_libjpeg_turbo_decode = true | |||
skia_use_libpng_decode = true | |||
skia_use_libwebp_decode = true | |||
|
|||
# Disable LTO. | |||
enable_lto = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is going to be the same for all CanvasKit builds, you can also add it to tools/gn
. But this is good too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding it to tools/gn
would conflict with skwasm, which must always be built with LTO enabled
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@jason-simmons – we're are super confident that
|
After disabling LTO I saw a 13% reduction in the size of I can wait a day before landing this PR in order to get more runs of the benchmarks on the Skia dashboard with |
Also, the builds of CanvasKit that we had previously obtained from Skia were not built with LTO. |
No description provided.