Merge "Turn off Global ThinLTO for LP32 again" into main am: 8eff85680c
am: 32b9a99eb7
am: b08df6f54f
am: 702837cb8e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2658818 Change-Id: Idaa28b2cf696f9348a46249f50484db1da7bc7db Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -4979,7 +4979,6 @@ func TestIncludeDirectoryOrdering(t *testing.T) {
|
|||||||
|
|
||||||
conly := []string{"-fPIC", "${config.CommonGlobalConlyflags}"}
|
conly := []string{"-fPIC", "${config.CommonGlobalConlyflags}"}
|
||||||
cppOnly := []string{"-fPIC", "${config.CommonGlobalCppflags}", "${config.DeviceGlobalCppflags}", "${config.ArmCppflags}"}
|
cppOnly := []string{"-fPIC", "${config.CommonGlobalCppflags}", "${config.DeviceGlobalCppflags}", "${config.ArmCppflags}"}
|
||||||
ltoFlags := []string{"-flto=thin", "-fsplit-lto-unit"}
|
|
||||||
|
|
||||||
cflags := []string{"-Werror", "-std=candcpp"}
|
cflags := []string{"-Werror", "-std=candcpp"}
|
||||||
cstd := []string{"-std=gnu17", "-std=conly"}
|
cstd := []string{"-std=gnu17", "-std=conly"}
|
||||||
@@ -5006,17 +5005,17 @@ func TestIncludeDirectoryOrdering(t *testing.T) {
|
|||||||
{
|
{
|
||||||
name: "c",
|
name: "c",
|
||||||
src: "foo.c",
|
src: "foo.c",
|
||||||
expected: combineSlices(baseExpectedFlags, conly, expectedIncludes, cflags, ltoFlags, cstd, lastIncludes, []string{"${config.NoOverrideGlobalCflags}", "${config.NoOverrideExternalGlobalCflags}"}),
|
expected: combineSlices(baseExpectedFlags, conly, expectedIncludes, cflags, cstd, lastIncludes, []string{"${config.NoOverrideGlobalCflags}", "${config.NoOverrideExternalGlobalCflags}"}),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "cc",
|
name: "cc",
|
||||||
src: "foo.cc",
|
src: "foo.cc",
|
||||||
expected: combineSlices(baseExpectedFlags, cppOnly, expectedIncludes, cflags, ltoFlags, cppstd, lastIncludes, []string{"${config.NoOverrideGlobalCflags}", "${config.NoOverrideExternalGlobalCflags}"}),
|
expected: combineSlices(baseExpectedFlags, cppOnly, expectedIncludes, cflags, cppstd, lastIncludes, []string{"${config.NoOverrideGlobalCflags}", "${config.NoOverrideExternalGlobalCflags}"}),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "assemble",
|
name: "assemble",
|
||||||
src: "foo.s",
|
src: "foo.s",
|
||||||
expected: combineSlices(baseExpectedFlags, []string{"${config.CommonGlobalAsflags}"}, expectedIncludes, ltoFlags, lastIncludes),
|
expected: combineSlices(baseExpectedFlags, []string{"${config.CommonGlobalAsflags}"}, expectedIncludes, lastIncludes),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -74,6 +74,9 @@ func (lto *lto) begin(ctx BaseModuleContext) {
|
|||||||
} else if ctx.Host() {
|
} else if ctx.Host() {
|
||||||
// Performance and binary size are less important for host binaries.
|
// Performance and binary size are less important for host binaries.
|
||||||
ltoDefault = false
|
ltoDefault = false
|
||||||
|
} else if ctx.Arch().ArchType.Multilib == "lib32" {
|
||||||
|
// LP32 has many subtle issues and less test coverage.
|
||||||
|
ltoDefault = false
|
||||||
}
|
}
|
||||||
|
|
||||||
// Then, determine the actual LTO mode to use. If different from `ltoDefault`, a variant needs
|
// Then, determine the actual LTO mode to use. If different from `ltoDefault`, a variant needs
|
||||||
|
Reference in New Issue
Block a user