4 ms·
You’ll need to also add -flto to your LDFLAGS.
by InfamousRece 3y ago
You’ll need to also add -flto to your LDFLAGS.
- synergy20 3y agoThanks. confirmed with chatgpt, and, if you're doing debug build, you probably do not want to use -flto, otherwise it's great for release build.
- mgaunard 3y agoLTO is required to detect ODR errors and to do a bunch of other checks. It does more than optimize.
- mgaunard 3y agoI don't think that's required. The linker driver will use LTO automatically if the object files it's given contain LTO IR. If anything you might want to explicitly do -fno-lto to not use LTO when you have fat objects.