From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@aquantia1com.onmicrosoft.com header.s=selector1-aquantia1com-onmicrosoft-com header.b=bKAaX+R5; spf=pass (domain: aquantia.com, ip: 40.107.72.86, mailfrom: roman.agafonov@aquantia.com) Received: from NAM05-CO1-obe.outbound.protection.outlook.com (NAM05-CO1-obe.outbound.protection.outlook.com [40.107.72.86]) by groups.io with SMTP; Tue, 04 Jun 2019 10:20:58 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=AQUANTIA1COM.onmicrosoft.com; s=selector1-AQUANTIA1COM-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Vbgb62ToBUt2V7ewH6UrEsFAF0AIEA2cS3GXu2vNQJ4=; b=bKAaX+R5RopyfsipLXkoHInyMbgHKSZqMhxk3na/nZuXe14Jse4HpOqb9x1aLAP6ReffxJV4AbbNgX2AJ7RjYfCq5u7/VXIH9c1ja+YTrXup86iA2ABU06jlIzwN1KIHPVFAJl0hOlnImDFtnkyBJ1CTCmPeKIT19kP8QzWLmrI= Received: from DM6PR11MB2955.namprd11.prod.outlook.com (20.177.217.28) by DM6PR11MB3689.namprd11.prod.outlook.com (20.178.231.95) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1943.20; Tue, 4 Jun 2019 17:20:54 +0000 Received: from DM6PR11MB2955.namprd11.prod.outlook.com ([fe80::a06e:bee7:e6ee:3907]) by DM6PR11MB2955.namprd11.prod.outlook.com ([fe80::a06e:bee7:e6ee:3907%7]) with mapi id 15.20.1943.018; Tue, 4 Jun 2019 17:20:54 +0000 From: Roman Agafonov To: "Gao, Liming" , "devel@edk2.groups.io" CC: "Feng, Bob C" , "Zhu, Yonghong" Subject: Re: [PATCH v1 1/1] BaseTools: don't use WHOLEARCHIVE linker flag for VS2017 toolchain Thread-Topic: [PATCH v1 1/1] BaseTools: don't use WHOLEARCHIVE linker flag for VS2017 toolchain Thread-Index: AQHVGuvztnZTUQXnBEyYuTMVWYDXF6aLpdiAgAAV+R8= Date: Tue, 4 Jun 2019 17:20:54 +0000 Message-ID: References: <20190604154059.30380-1-roman.agafonov@aquantia.com> <20190604154059.30380-2-roman.agafonov@aquantia.com>,<4A89E2EF3DFEDB4C8BFDE51014F606A14E46BAAE@SHSMSX104.ccr.corp.intel.com> In-Reply-To: <4A89E2EF3DFEDB4C8BFDE51014F606A14E46BAAE@SHSMSX104.ccr.corp.intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Roman.Agafonov@aquantia.com; x-originating-ip: [95.79.108.179] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 5c23c7ba-d0fe-4e04-ad42-08d6e9110059 x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(5600148)(711020)(4605104)(1401327)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020);SRVR:DM6PR11MB3689; x-ms-traffictypediagnostic: DM6PR11MB3689: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-forefront-prvs: 0058ABBBC7 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(346002)(39850400004)(396003)(376002)(366004)(136003)(13464003)(199004)(189003)(14444005)(486006)(478600001)(256004)(305945005)(71200400001)(5660300002)(186003)(26005)(7696005)(33656002)(102836004)(53546011)(6506007)(76176011)(99286004)(54906003)(86362001)(19627235002)(14454004)(7736002)(68736007)(110136005)(72206003)(52536014)(446003)(11346002)(476003)(66066001)(316002)(53936002)(73956011)(6246003)(71190400001)(8936002)(64756008)(66556008)(66446008)(6116002)(76116006)(91956017)(66946007)(66476007)(74316002)(2906002)(25786009)(229853002)(8676002)(81166006)(81156014)(4326008)(6436002)(2501003)(3846002)(55016002)(9686003)(460985005);DIR:OUT;SFP:1101;SCL:1;SRVR:DM6PR11MB3689;H:DM6PR11MB2955.namprd11.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: aquantia.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: KISvz4tqVZn13lPLONsg0Wg298+XXhVFDFcO8Ig0f18T0a0Zc33mgdpbl3l4nWLuMA+Em+jQj7rFKfy088vDhXReKXF8zl9+3F7FM9eg4gj1HS7ONLKg8tVKMdgprv1YNIiEN3oxAqlH9Hovkib68yKYiE2ytdeUz4WmsXYhjEhgDkMGeSuZf3o5teUIJNT6CUesZD2dZ9KpRSkHklpmPCmDGBCnXGH6hcAjs/9iVDH3ikH7NDOGoWFX2g4JXh025KT9rdemffVg7L21c+Q98CYViE4trcJNL0BCUwv5JW68jfGfa3exO2fqaavLiGVxEQEQM4kagy6THEJkf9eBmMAVQYtQ4bnWJEDjuJ1kIZWST0CT1ij6pGW2eEVXDC1SGkn3MtIb0S1TUb0sbpO9asy7I6Ym+wjVDhAnY2SC6HM= MIME-Version: 1.0 X-OriginatorOrg: aquantia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5c23c7ba-d0fe-4e04-ad42-08d6e9110059 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Jun 2019 17:20:54.8107 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 83e2e134-991c-4ede-8ced-34d47e38e6b1 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: ragaf@aquantia.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB3689 Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi Liming,=0A= =0A= Sure. Here is what I get after building our NIC driver binary with VS2015x8= 6 and VS2017 toolchains:=0A= =0A= pcfist@pcfist-pc:/mnt/c/src/uefi/udk2018$ du -h Build/xgbe_atl/RELEASE_VS20= 15x86/X64/xgbe_atl.efi Build/xgbe_atl/RELEASE_VS2017/X64/xgbe_atl.efi=0A= 36K =A0 =A0 Build/xgbe_atl/RELEASE_VS2015x86/X64/xgbe_atl.efi=0A= 68K =A0 =A0 Build/xgbe_atl/RELEASE_VS2017/X64/xgbe_atl.efi=0A= =0A= Best regards,=0A= Roman=0A= =0A= From: Gao, Liming =0A= Sent: Tuesday, June 4, 2019 6:54 PM=0A= To: Roman Agafonov; devel@edk2.groups.io=0A= Cc: Feng, Bob C; Zhu, Yonghong=0A= Subject: RE: [PATCH v1 1/1] BaseTools: don't use WHOLEARCHIVE linker flag f= or VS2017 toolchain=0A= =A0=0A= Can you show the size data with VS2017 and VS2015 for the same code?=0A= =0A= Thanks=0A= Liming=0A= > -----Original Message-----=0A= > From: Roman Agafonov [mailto:Roman.Agafonov@aquantia.com]=0A= > Sent: Tuesday, June 4, 2019 11:41 PM=0A= > To: devel@edk2.groups.io=0A= > Cc: Feng, Bob C ; Gao, Liming ; Zhu, Yonghong =0A= > Subject: [PATCH v1 1/1] BaseTools: don't use WHOLEARCHIVE linker flag for= VS2017 toolchain=0A= > =0A= > I have noticed the resulting binaries are about twice as large when=0A= > using VS2017 toolchain compared to the ones built with VS2015. It appears= =0A= > this is caused by /WHOLEARCHIVE linker flag used by this toolchain. This= =0A= > flag was previously removed from VS2015 toolchain due to compatibility=0A= > issues. I believe it should not be used with VS2017 as well.=0A= > =0A= > Cc: Bob Feng =0A= > Cc: Liming Gao =0A= > Cc: Yonghong Zhu =0A= > Signed-off-by: Roman Agafonov =0A= > ---=0A= >=A0 BaseTools/Conf/tools_def.template | 2 +-=0A= >=A0 1 file changed, 1 insertion(+), 1 deletion(-)=0A= > =0A= > diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def= .template=0A= > index 26a2cf604f74..482a526f3052 100755=0A= > --- a/BaseTools/Conf/tools_def.template=0A= > +++ b/BaseTools/Conf/tools_def.template=0A= > @@ -1545,7 +1545,7 @@ NOOPT_VS2015x86_X64_DLINK_FLAGS=A0=A0=A0 =3D /NOLOG= O /NODEFAULTLIB /IGNORE:4001 /OPT:REF=0A= >=A0 *_VS2017_*_APP_FLAGS=A0=A0=A0=A0=A0=A0 =3D /nologo /E /TC=0A= >=A0 *_VS2017_*_PP_FLAGS=A0=A0=A0=A0=A0=A0=A0 =3D /nologo /E /TC /FIAutoGen= .h=0A= >=A0 *_VS2017_*_VFRPP_FLAGS=A0=A0=A0=A0 =3D /nologo /E /TC /DVFRCOMPILE /FI= $(MODULE_NAME)StrDefs.h=0A= > -*_VS2017_*_DLINK2_FLAGS=A0=A0=A0 =3D /WHOLEARCHIVE=0A= > +*_VS2017_*_DLINK2_FLAGS=A0=A0=A0 =3D=0A= >=A0 *_VS2017_*_ASM16_PATH=A0=A0=A0=A0=A0 =3D DEF(VS2017_BIN_IA32)\ml.exe= =0A= > =0A= >=A0 ##################=0A= > --=0A= > 2.9.0.windows.1=0A= =0A=