Bug 235477

Summary: What's going on with LTO_MODE?
Product: WebKit Reporter: Michael Catanzaro <mcatanzaro>
Component: CMakeAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: bugs-noreply, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: PC   
OS: Linux   

Michael Catanzaro
Reported 2022-01-22 06:37:09 PST
I notice there is an LTO_MODE CMake variable that causes ld.lld to be selected in OptionsCommon.cmake, but this makes me nervous because I don't think anything ever sets LTO_MODE. It's not a public variable, either. How is it supposed to be used? It adds its own manual -flto=${LTO_MODE} flags that would surely be redundant with the -flto=auto flags that are already used by distros that enable LTO. We might want to think about how this is supposed to work. I suppose it's OK so long as (a) nothing sets it except the end user, and (b) nothing assumes that it can be used to determine whether LTO is actually enabled. But assuming that LTO_MODE=OFF means no LTO seems very tempting. Maybe we could rename it to something like ADD_WEBKIT_LTO_FLAGS to be more clear that it's not the only way that LTO gets enabled?
Attachments
Radar WebKit Bug Importer
Comment 1 2022-01-29 06:38:16 PST
Note You need to log in before you can comment on or make changes to this bug.