Implement user experience for LIPO / ThinLTO users.

Add flag --convert_lipo_to_thinlto, which allows builds with LLVM to use
ThinLTO when the user specifies LIPO + FDO flags; if that flag is not set, and
the user requests a build with LLVM, the compile will now fail.

Add an attribute supports_lipo to the DefaultCpuToolchain crosstool proto and
skip default toolchains that do not support LIPO when the user has specified
LIPO flags in the toolchain selection; this enables CROSSTOOL files to cause
an implicit fallback to a hybrid / LIPO toolchain when using an LLVM toolchain
as the default.

Add a CrosstoolBuilder to MockCcSupport and add a new method
setupCrosstoolFromScratch that allows unit tests to fully control the setup.
The other methods available in MockCcSupport will always load in a default
CROSSTOOL file and may show different unit test results depending on the
content of that file.

RELNOTES: None.
PiperOrigin-RevId: 163819246
This commit is contained in:
klimek 2017-08-01 14:56:53 +02:00 committed by Marcel Hlopko
parent 1fbdf51208
commit 503f0a9868
1 changed files with 1 additions and 0 deletions

View File

@ -517,6 +517,7 @@ message MakeVariable {
message DefaultCpuToolchain {
required string cpu = 1;
required string toolchain_identifier = 2;
optional bool supports_lipo = 3 [default = true];
}
// An entire crosstool release, containing the version number, a default target