Hello, I didn’t mean LTO doesn't work. For the NOOPT build target, we did not enable LTO or any optimization flag: DEBUG_GCC5_IA32_DLINK_FLAGS = DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Os -Wl,-m,elf_i386,--oformat=elf32-i386 NOOPT_GCC5_IA32_DLINK_FLAGS = DEF(GCC5_IA32_X64_DLINK_FLAGS) -Wl,-m,elf_i386,--oformat=elf32-i386 -O0
Adding more flags to NOOPT may affect other builds and unittest debug. So I tend to skip this build target. Regards, Yi From: [email protected] <[email protected]> On Behalf Of Pedro Falcato Sent: Wednesday, June 21, 2023 8:40 AM To: edk2-devel-groups-io <[email protected]>; Li, Yi1 <[email protected]> Cc: Ard Biesheuvel <[email protected]>; Yao, Jiewen <[email protected]>; Justen, Jordan L <[email protected]>; Gerd Hoffmann <[email protected]> Subject: Re: [edk2-devel] [PATCH] OvmfPkg/PlatformCI: Skip GCC5_OVMF_IA32X64_FULL_NOOPT build On Tue, 20 Jun 2023, 12:11 Li, Yi, <[email protected]<mailto:[email protected]>> wrote: The effect of LTO is limited with optimization turned off, and blocked the upgrade of Openssl3.0. We already skipped this build with VS2019, skip the GCC NOOPT build also. Hi, If LTO is the problem here, have you given ffunction-sections + fdata-sections + gc-sections a spin? It may end up working, though I genuinely don't remember if the GCC toolchain has that on regardless (and wont be able to check foe the next few days)... Signed-off-by: Yi Li <[email protected]<mailto:[email protected]>> Cc: Ard Biesheuvel <[email protected]<mailto:ardb%[email protected]>> Cc: Jiewen Yao <[email protected]<mailto:[email protected]>> Cc: Jordan Justen <[email protected]<mailto:[email protected]>> Cc: Gerd Hoffmann <[email protected]<mailto:[email protected]>> --- .../PlatformCI/.azurepipelines/Ubuntu-GCC5.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml b/OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml index ad43f9fad2..5809152d26 100644 --- a/OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml +++ b/OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml @@ -109,13 +109,16 @@ jobs: Build.Target: "RELEASE" Run.Flags: $(run_flags) Run: $(should_run) - OVMF_IA32X64_FULL_NOOPT: - Build.File: "$(package)/PlatformCI/PlatformBuild.py" - Build.Arch: "IA32,X64" - Build.Flags: "BLD_*_SECURE_BOOT_ENABLE=1 BLD_*_SMM_REQUIRE=1 BLD_*_TPM2_ENABLE=1 BLD_*_NETWORK_TLS_ENABLE=1 BLD_*_NETWORK_IP6_ENABLE=1 BLD_*_NETWORK_HTTP_BOOT_ENABLE=1" - Build.Target: "NOOPT" - Run.Flags: $(run_flags) - Run: $(should_run) + # This currently creates a very large image which is too big for the FDF declared range, + # skip this build for now. + # + # OVMF_IA32X64_FULL_NOOPT: + # Build.File: "$(package)/PlatformCI/PlatformBuild.py" + # Build.Arch: "IA32,X64" + # Build.Flags: "BLD_*_SECURE_BOOT_ENABLE=1 BLD_*_SMM_REQUIRE=1 BLD_*_TPM2_ENABLE=1 BLD_*_NETWORK_TLS_ENABLE=1 BLD_*_NETWORK_IP6_ENABLE=1 BLD_*_NETWORK_HTTP_BOOT_ENABLE=1" + # Build.Target: "NOOPT" + # Run.Flags: $(run_flags) + # Run: $(should_run) AMDSEV_X64_DEBUG: Build.File: "$(package)/PlatformCI/AmdSevBuild.py" -- 2.31.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#106238): https://edk2.groups.io/g/devel/message/106238 Mute This Topic: https://groups.io/mt/99641869/21656 Group Owner: [email protected] Unsubscribe: https://edk2.groups.io/g/devel/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
