Open nekopsykose opened 6 months ago
i'm still thinking about what would be a good way to implement this
one way would be to add a modifier to the Template class that would temporarily alter the options, which would result in the Profile class skipping the lto flags, but that itself has caveats
particularly, CFI will break because 1) cbuild checks elsewhere that the whole combo is enabled and 2) if you compile conftests with CFI but not LTO, they will fail (clang will error) which will subsequently fail the whole build
so i'm not quite sure how to do this satisfactorily :/
particularly, CFI will break because 1) cbuild checks elsewhere that the whole combo is enabled and 2) if you compile conftests with CFI but not LTO, they will fail (clang will error) which will subsequently fail the whole build
hm, seems like there's no way to both have that and this at the same time then
for
removing flto from this list when lto is enabled and leaving -Db_lto= allows projects that selectively disable b_lto per-module where known broken (like scipy in some modules) to control that (rather than us just doing !lto), and for some configure tests to not break (like the patch in dav1d that only breaks because of the c_args passed here with flto in them) since lto will only be used for the actual build