Summary:
Currently there is no option to configure the number of thin-backend
threads to use when performing thin-lto on the device, but we should
default to use all the threads rather than just one. In the future we
should use the same arguments that gold / lld use and parse it here.
lto::Config Conf;
lto::ThinBackend Backend;
// TODO: Handle index-only thin-LTO
- Backend = lto::createInProcessThinBackend(
- llvm::heavyweight_hardware_concurrency(1));
+ Backend =
+ lto::createInProcessThinBackend(llvm::heavyweight_hardware_concurrency());
Conf.UseDefaultPipeline = true;
Conf.CPU = Arch.str();