Sounds good. Will update in v3. - Bret ________________________________ From: Feng, Bob C <bob.c.f...@intel.com> Sent: Wednesday, November 3, 2021 8:35:33 AM To: Andrew Fish <af...@apple.com>; edk2-devel-groups-io <devel@edk2.groups.io>; Bret Barkelew <bret.barke...@microsoft.com> Cc: Lindholm, Leif <l...@nuviainc.com>; brbar...@microsoft.com <b...@corthon.com>; Ard Biesheuvel <ardb+tianoc...@kernel.org>; Liming Gao <gaolim...@byosoft.com.cn>; Chen, Yuwei <yuwei.c...@intel.com>; Sean Brogan <sean.bro...@microsoft.com> Subject: RE: [EXTERNAL] [edk2-devel] [PATCH v1 06/16] ArmPkg and BaseTools: Move the GccLto binaries from ArmPkg to BaseTools
I’d prefer to use EDK_TOOLS_PATH. Because of PACKAGES_PATH, the relative path does not depend on the WORKSPACE, the WORKSPACE can be set to anywhere. So we can’t assume the BaseTools is under WORKSPACE. But EDK_TOOLS_PATH always points to edk2/BaseTools. This patch does not break any of the use-cases on my side. Thanks, Bob From: Andrew Fish <af...@apple.com> Sent: Wednesday, November 3, 2021 7:34 AM To: edk2-devel-groups-io <devel@edk2.groups.io>; bret.barke...@microsoft.com Cc: Lindholm, Leif <l...@nuviainc.com>; brbar...@microsoft.com <b...@corthon.com>; Ard Biesheuvel <ardb+tianoc...@kernel.org>; Feng, Bob C <bob.c.f...@intel.com>; Liming Gao <gaolim...@byosoft.com.cn>; Chen, Christine <yuwei.c...@intel.com>; Sean Brogan <sean.bro...@microsoft.com> Subject: Re: [EXTERNAL] [edk2-devel] [PATCH v1 06/16] ArmPkg and BaseTools: Move the GccLto binaries from ArmPkg to BaseTools On Nov 2, 2021, at 12:45 PM, Bret Barkelew via groups.io<https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgroups.io%2F&data=04%7C01%7Cbret.barkelew%40microsoft.com%7C06f295b9903a44c7b8d408d99edff565%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637715507056865024%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=7IeYGfQir8xUiKwmZ9N%2BTsiLRc8%2F03Rzsr%2FwJ08qmvQ%3D&reserved=0> <bret.barkelew=microsoft....@groups.io<mailto:bret.barkelew=microsoft....@groups.io>> wrote: Good call. Maintainers, your opinion? - Bret From: Leif Lindholm via groups.io<mailto:leif=nuviainc....@groups.io> Sent: Tuesday, November 2, 2021 2:55 AM To: brbar...@microsoft.com<mailto:b...@corthon.com> Cc: devel@edk2.groups.io<mailto:devel@edk2.groups.io>; Ard Biesheuvel<mailto:ardb+tianoc...@kernel.org>; Feng, Bob C<mailto:bob.c.f...@intel.com>; Liming Gao<mailto:gaolim...@byosoft.com.cn>; Chen, Yuwei<mailto:yuwei.c...@intel.com>; Sean Brogan<mailto:sean.bro...@microsoft.com> Subject: [EXTERNAL] Re: [edk2-devel] [PATCH v1 06/16] ArmPkg and BaseTools: Move the GccLto binaries from ArmPkg to BaseTools On Mon, Nov 01, 2021 at 12:56:38 -0700, brbar...@microsoft.com<mailto:brbar...@microsoft.com> wrote: > From: Bret Barkelew <brbar...@microsoft.com<mailto:brbar...@microsoft.com>> > > This aligns better with Mu's philosophy around dependency structuring > and is one of the steps to enable Basecore to have zero CI dependencies > on other Mu repos. > > REF: > https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.tianocore.org%2Fshow_bug.cgi%3Fid%3D3650&data=04%7C01%7Cbret.barkelew%40microsoft.com%7Cc9129586336447a44c3908d99de6e1d1%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637714437251132216%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=ijjQG1L4fScVxSn5nIBQGrFHLVtNbuTfd0YYLGdw8sg%3D&reserved=0<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.tianocore.org%2Fshow_bug.cgi%3Fid%3D3650&data=04%7C01%7Cbret.barkelew%40microsoft.com%7C06f295b9903a44c7b8d408d99edff565%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637715507056865024%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=oBOJo5g2DzNrgu2Py0sjxAd%2BHekQBxrlDylc%2BkIwEow%3D&reserved=0> > > Cc: Leif Lindholm <l...@nuviainc.com<mailto:l...@nuviainc.com>> > Cc: Ard Biesheuvel > <ardb+tianoc...@kernel.org<mailto:ardb+tianoc...@kernel.org>> > Cc: Bob Feng <bob.c.f...@intel.com<mailto:bob.c.f...@intel.com>> > Cc: Liming Gao <gaolim...@byosoft.com.cn<mailto:gaolim...@byosoft.com.cn>> > Cc: Yuwei Chen <yuwei.c...@intel.com<mailto:yuwei.c...@intel.com>> > Cc: Sean Brogan <sean.bro...@microsoft.com<mailto:sean.bro...@microsoft.com>> > Signed-off-by: Bret Barkelew > <bret.barke...@microsoft.com<mailto:bret.barke...@microsoft.com>> No objections to this for any of my use-cases, but I'd like for one of the BaseTools maintainers to comment on whether this breaks anything with regards to EDK_TOOLS_PATH, or if we can finally get rid of that and replace it with $WORKSPACE/BaseTools globally. Our internal repo uses EDK_TOOLS_PATH. In our case it is $(WORKSPACE)/edk2/BaseTools. We have a PACKAGES_PATH set to $(WORKSPACE)/edk2 and magic happens. So I’m thinking maybe: $(EDK_TOOLS_PATH)/Bin/GccLto Vs: $(WORKSPACE)/BaseTools/Bin/GccLto If EDK_TOOLS_PATH gets ripped out, it should be one atomic remove, but let us not stick that on Bret. Thanks, Andrew Fish / Leif > --- > {ArmPkg/Library => BaseTools/Bin}/GccLto/liblto-aarch64.a | Bin > {ArmPkg/Library => BaseTools/Bin}/GccLto/liblto-aarch64.s | 0 > {ArmPkg/Library => BaseTools/Bin}/GccLto/liblto-arm.a | Bin > {ArmPkg/Library => BaseTools/Bin}/GccLto/liblto-arm.s | 0 > BaseTools/Conf/tools_def.template | 19 > ++++++++++--------- > 5 files changed, 10 insertions(+), 9 deletions(-) > > diff --git a/ArmPkg/Library/GccLto/liblto-aarch64.a > b/BaseTools/Bin/GccLto/liblto-aarch64.a > similarity index 100% > rename from ArmPkg/Library/GccLto/liblto-aarch64.a > rename to BaseTools/Bin/GccLto/liblto-aarch64.a > diff --git a/ArmPkg/Library/GccLto/liblto-aarch64.s > b/BaseTools/Bin/GccLto/liblto-aarch64.s > similarity index 100% > rename from ArmPkg/Library/GccLto/liblto-aarch64.s > rename to BaseTools/Bin/GccLto/liblto-aarch64.s > diff --git a/ArmPkg/Library/GccLto/liblto-arm.a > b/BaseTools/Bin/GccLto/liblto-arm.a > similarity index 100% > rename from ArmPkg/Library/GccLto/liblto-arm.a > rename to BaseTools/Bin/GccLto/liblto-arm.a > diff --git a/ArmPkg/Library/GccLto/liblto-arm.s > b/BaseTools/Bin/GccLto/liblto-arm.s > similarity index 100% > rename from ArmPkg/Library/GccLto/liblto-arm.s > rename to BaseTools/Bin/GccLto/liblto-arm.s > diff --git a/BaseTools/Conf/tools_def.template > b/BaseTools/Conf/tools_def.template > index 2e6b382ab623..cd8899d24d4a 100755 > --- a/BaseTools/Conf/tools_def.template > +++ b/BaseTools/Conf/tools_def.template > @@ -15,7 +15,8 @@ > # 2.00 - Initial version with changes for CI > # - Change RC path to use plugin > # > -#!VERSION=2.00 > +# 2.10 - Move GccLto files to a tools path to be more repository layout > agnostic > +#!VERSION=2.10 > > IDENTIFIER = Default TOOL_CHAIN_CONF > > @@ -2386,10 +2387,10 @@ RELEASE_GCC5_X64_DLINK_FLAGS = > DEF(GCC5_X64_DLINK_FLAGS) -flto -Os > *_GCC5_ARM_CC_XIPFLAGS = DEF(GCC5_ARM_CC_XIPFLAGS) > > DEBUG_GCC5_ARM_CC_FLAGS = DEF(GCC5_ARM_CC_FLAGS) -flto > -Wno-unused-but-set-variable -Wno-unused-const-variable > - DEBUG_GCC5_ARM_DLINK_FLAGS = DEF(GCC5_ARM_DLINK_FLAGS) -flto -Os > -L$(WORKSPACE)/ArmPkg/Library/GccLto -llto-arm > -Wl,-plugin-opt=-pass-through=-llto-arm > + DEBUG_GCC5_ARM_DLINK_FLAGS = DEF(GCC5_ARM_DLINK_FLAGS) -flto -Os > -L$(WORKSPACE)/BaseTools/Bin/GccLto -llto-arm > -Wl,-plugin-opt=-pass-through=-llto-arm > > RELEASE_GCC5_ARM_CC_FLAGS = DEF(GCC5_ARM_CC_FLAGS) -flto > -Wno-unused-but-set-variable -Wno-unused-const-variable > -RELEASE_GCC5_ARM_DLINK_FLAGS = DEF(GCC5_ARM_DLINK_FLAGS) -flto -Os > -L$(WORKSPACE)/ArmPkg/Library/GccLto -llto-arm > -Wl,-plugin-opt=-pass-through=-llto-arm > +RELEASE_GCC5_ARM_DLINK_FLAGS = DEF(GCC5_ARM_DLINK_FLAGS) -flto -Os > -L$(WORKSPACE)/BaseTools/Bin/GccLto -llto-arm > -Wl,-plugin-opt=-pass-through=-llto-arm > > NOOPT_GCC5_ARM_CC_FLAGS = DEF(GCC5_ARM_CC_FLAGS) -O0 > NOOPT_GCC5_ARM_DLINK_FLAGS = DEF(GCC5_ARM_DLINK_FLAGS) -O0 > @@ -2420,11 +2421,11 @@ RELEASE_GCC5_ARM_DLINK_FLAGS = > DEF(GCC5_ARM_DLINK_FLAGS) -flto -Os -L$(WORKS > *_GCC5_AARCH64_CC_XIPFLAGS = DEF(GCC5_AARCH64_CC_XIPFLAGS) > > DEBUG_GCC5_AARCH64_CC_FLAGS = DEF(GCC5_AARCH64_CC_FLAGS) -flto > -Wno-unused-but-set-variable -Wno-unused-const-variable > - DEBUG_GCC5_AARCH64_DLINK_FLAGS = DEF(GCC5_AARCH64_DLINK_FLAGS) -flto -Os > -L$(WORKSPACE)/ArmPkg/Library/GccLto -llto-aarch64 > -Wl,-plugin-opt=-pass-through=-llto-aarch64 -Wno-lto-type-mismatch > + DEBUG_GCC5_AARCH64_DLINK_FLAGS = DEF(GCC5_AARCH64_DLINK_FLAGS) -flto -Os > -L$(WORKSPACE)/BaseTools/Bin/GccLto -llto-aarch64 > -Wl,-plugin-opt=-pass-through=-llto-aarch64 -Wno-lto-type-mismatch > DEBUG_GCC5_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20 > > RELEASE_GCC5_AARCH64_CC_FLAGS = DEF(GCC5_AARCH64_CC_FLAGS) -flto > -Wno-unused-but-set-variable -Wno-unused-const-variable > -RELEASE_GCC5_AARCH64_DLINK_FLAGS = DEF(GCC5_AARCH64_DLINK_FLAGS) -flto -Os > -L$(WORKSPACE)/ArmPkg/Library/GccLto -llto-aarch64 > -Wl,-plugin-opt=-pass-through=-llto-aarch64 -Wno-lto-type-mismatch > +RELEASE_GCC5_AARCH64_DLINK_FLAGS = DEF(GCC5_AARCH64_DLINK_FLAGS) -flto -Os > -L$(WORKSPACE)/BaseTools/Bin/GccLto -llto-aarch64 > -Wl,-plugin-opt=-pass-through=-llto-aarch64 -Wno-lto-type-mismatch > RELEASE_GCC5_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20 > > NOOPT_GCC5_AARCH64_CC_FLAGS = DEF(GCC5_AARCH64_CC_FLAGS) -O0 > @@ -2681,11 +2682,11 @@ DEFINE CLANG38_ARM_DLINK_FLAGS = > DEF(CLANG38_ARM_TARGET) DEF(GCC_ARM_DLINK_FLA > *_CLANG38_ARM_CC_XIPFLAGS = DEF(GCC_ARM_CC_XIPFLAGS) > > DEBUG_CLANG38_ARM_CC_FLAGS = DEF(CLANG38_ARM_CC_FLAGS) $(ARCHCC_FLAGS) > $(PLATFORM_FLAGS) -flto -O1 > - DEBUG_CLANG38_ARM_DLINK_FLAGS = DEF(CLANG38_ARM_DLINK_FLAGS) -flto > -Wl,-O1 -L$(WORKSPACE)/ArmPkg/Library/GccLto -llto-arm > -Wl,-plugin-opt=-pass-through=-llto-arm > + DEBUG_CLANG38_ARM_DLINK_FLAGS = DEF(CLANG38_ARM_DLINK_FLAGS) -flto > -Wl,-O1 -L$(WORKSPACE)/BaseTools/Bin/GccLto -llto-arm > -Wl,-plugin-opt=-pass-through=-llto-arm > NOOPT_CLANG38_ARM_CC_FLAGS = DEF(CLANG38_ARM_CC_FLAGS) $(ARCHCC_FLAGS) > $(PLATFORM_FLAGS) -O0 > NOOPT_CLANG38_ARM_DLINK_FLAGS = DEF(CLANG38_ARM_DLINK_FLAGS) > RELEASE_CLANG38_ARM_CC_FLAGS = DEF(CLANG38_ARM_CC_FLAGS) $(ARCHCC_FLAGS) > $(PLATFORM_FLAGS) -flto -O3 > -RELEASE_CLANG38_ARM_DLINK_FLAGS = DEF(CLANG38_ARM_DLINK_FLAGS) -flto > -Wl,-O3 -L$(WORKSPACE)/ArmPkg/Library/GccLto -llto-arm > -Wl,-plugin-opt=-pass-through=-llto-arm > +RELEASE_CLANG38_ARM_DLINK_FLAGS = DEF(CLANG38_ARM_DLINK_FLAGS) -flto > -Wl,-O3 -L$(WORKSPACE)/BaseTools/Bin/GccLto -llto-arm > -Wl,-plugin-opt=-pass-through=-llto-arm > > ################## > # CLANG38 AARCH64 definitions > @@ -2727,11 +2728,11 @@ DEFINE CLANG38_AARCH64_DLINK_FLAGS = > DEF(CLANG38_AARCH64_TARGET) DEF(GCC_AARCH6 > *_CLANG38_AARCH64_CC_XIPFLAGS = DEF(GCC_AARCH64_CC_XIPFLAGS) > > DEBUG_CLANG38_AARCH64_CC_FLAGS = DEF(CLANG38_AARCH64_CC_FLAGS) > $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -flto -O1 > - DEBUG_CLANG38_AARCH64_DLINK_FLAGS = DEF(CLANG38_AARCH64_DLINK_FLAGS) -flto > -Wl,-O1 -L$(WORKSPACE)/ArmPkg/Library/GccLto -llto-aarch64 > -Wl,-plugin-opt=-pass-through=-llto-aarch64 > + DEBUG_CLANG38_AARCH64_DLINK_FLAGS = DEF(CLANG38_AARCH64_DLINK_FLAGS) -flto > -Wl,-O1 -L$(WORKSPACE)/BaseTools/Bin/GccLto -llto-aarch64 > -Wl,-plugin-opt=-pass-through=-llto-aarch64 > NOOPT_CLANG38_AARCH64_CC_FLAGS = DEF(CLANG38_AARCH64_CC_FLAGS) > $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -O0 > NOOPT_CLANG38_AARCH64_DLINK_FLAGS = DEF(CLANG38_AARCH64_DLINK_FLAGS) > RELEASE_CLANG38_AARCH64_CC_FLAGS = DEF(CLANG38_AARCH64_CC_FLAGS) > $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -flto -O3 > -RELEASE_CLANG38_AARCH64_DLINK_FLAGS = DEF(CLANG38_AARCH64_DLINK_FLAGS) -flto > -Wl,-O3 -L$(WORKSPACE)/ArmPkg/Library/GccLto -llto-aarch64 > -Wl,-plugin-opt=-pass-through=-llto-aarch64 > +RELEASE_CLANG38_AARCH64_DLINK_FLAGS = DEF(CLANG38_AARCH64_DLINK_FLAGS) -flto > -Wl,-O3 -L$(WORKSPACE)/BaseTools/Bin/GccLto -llto-aarch64 > -Wl,-plugin-opt=-pass-through=-llto-aarch64 > > > #################################################################################### > # > -- > 2.31.1.windows.1 > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#83280): https://edk2.groups.io/g/devel/message/83280 Mute This Topic: https://groups.io/mt/86779903/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-