From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from ma1-aaemail-dr-lapp02.apple.com (ma1-aaemail-dr-lapp02.apple.com [17.171.2.68]) by mx.groups.io with SMTP id smtpd.web10.662.1572487614095648972 for ; Wed, 30 Oct 2019 19:06:54 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@apple.com header.s=20180706 header.b=U4O01IgL; spf=pass (domain: apple.com, ip: 17.171.2.68, mailfrom: afish@apple.com) Received: from pps.filterd (ma1-aaemail-dr-lapp02.apple.com [127.0.0.1]) by ma1-aaemail-dr-lapp02.apple.com (8.16.0.27/8.16.0.27) with SMTP id x9V22FK8064779; Wed, 30 Oct 2019 19:06:52 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apple.com; h=sender : from : message-id : content-type : mime-version : subject : date : in-reply-to : cc : to : references; s=20180706; bh=2Uk+J0NsS1Ujv+1I/dxSSOIkx/LvV5rsNOrg9v8+Ta4=; b=U4O01IgLJXPETofepb8BmW3xEcfd4tZ/dHj+usTeu5amaW1x85BqVFm+v/D7IdVOK9El oWXAzpigZA0Inmuo7m+kRDH5bDvfnr+dzL8zKMnLaIg6HBK/UI7sRJyWMSWGcyvBVBlL XDVkvinaD12j2xSha1KGd/jApKJirNIevgfAlrReJd6BbfzFw1vywRKOsj1hNqQhgyNB xt4afQTwNApiSOEcQ614Xn7PwD4NUk0cSw98K/XhnzudV/xH08X/IDQ/65K0Hw9gPCs0 GXW2NtP+bE85fZ2m5Mr2GVFwMhJvVOCdmjnxLthEB2PGEZEClb6q2blVPbsHyEMSWl3c pQ== Received: from mr2-mtap-s01.rno.apple.com (mr2-mtap-s01.rno.apple.com [17.179.226.133]) by ma1-aaemail-dr-lapp02.apple.com with ESMTP id 2vxwfj6v7n-5 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Wed, 30 Oct 2019 19:06:52 -0700 Received: from nwk-mmpp-sz09.apple.com (nwk-mmpp-sz09.apple.com [17.128.115.80]) by mr2-mtap-s01.rno.apple.com (Oracle Communications Messaging Server 8.0.2.4.20190507 64bit (built May 7 2019)) with ESMTPS id <0Q0700EPNV7FX000@mr2-mtap-s01.rno.apple.com>; Wed, 30 Oct 2019 19:06:51 -0700 (PDT) Received: from process_milters-daemon.nwk-mmpp-sz09.apple.com by nwk-mmpp-sz09.apple.com (Oracle Communications Messaging Server 8.0.2.4.20190507 64bit (built May 7 2019)) id <0Q0700C00UYKQF00@nwk-mmpp-sz09.apple.com>; Wed, 30 Oct 2019 19:06:51 -0700 (PDT) X-Va-A: X-Va-T-CD: a089f0d0f105fb7a44d44c34c17aa01e X-Va-E-CD: 4c18f08684eff679337f18d62477fc07 X-Va-R-CD: 62e6ed62aebede719759a2c43183ec0c X-Va-CD: 0 X-Va-ID: 321669ea-b8b2-4936-b2c1-29db014673d3 X-V-A: X-V-T-CD: 7daa14ab80d2839c17f099a8fda5373c X-V-E-CD: 4c18f08684eff679337f18d62477fc07 X-V-R-CD: 62e6ed62aebede719759a2c43183ec0c X-V-CD: 0 X-V-ID: 6bf57cce-a2dc-4582-a13d-1f81ee7be5a8 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-10-30_10:,, signatures=0 Received: from [17.235.53.249] (unknown [17.235.53.249]) by nwk-mmpp-sz09.apple.com (Oracle Communications Messaging Server 8.0.2.4.20190507 64bit (built May 7 2019)) with ESMTPSA id <0Q0700JP2V7D4Q90@nwk-mmpp-sz09.apple.com>; Wed, 30 Oct 2019 19:06:51 -0700 (PDT) Sender: afish@apple.com From: "Andrew Fish" Message-id: MIME-version: 1.0 (Mac OS X Mail 13.0 \(3594.4.17\)) Subject: Re: [edk2-devel] [edk2] NOOPT and PcdOptimizeCompilerEnable Date: Wed, 30 Oct 2019 19:06:49 -0700 In-reply-to: <4A89E2EF3DFEDB4C8BFDE51014F606A14E535229@SHSMSX104.ccr.corp.intel.com> Cc: "tigerliu@zhaoxin.com" To: devel@edk2.groups.io, liming.gao@intel.com References: <4A89E2EF3DFEDB4C8BFDE51014F606A14E535229@SHSMSX104.ccr.corp.intel.com> X-Mailer: Apple Mail (2.3594.4.17) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-10-30_10:,, signatures=0 Content-type: multipart/alternative; boundary="Apple-Mail=_04B8D8E9-2DCB-4DC2-9B9E-3BDCA3EC2002" --Apple-Mail=_04B8D8E9-2DCB-4DC2-9B9E-3BDCA3EC2002 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Liming, For gcc/clang if you repeat an argument the last argument wins. This is th= e default behavior and it does not warn, as it is designed to work with fea= tures like PcdOptimizeCompilerEnable.=20 If VC++ warns for this behavior should we disable D9025 for VC++ so all th= e toolchains have the same behavior? Thanks, Andrew Fish > On Oct 30, 2019, at 6:46 PM, Liming Gao wrote: >=20 > Yes. This is the expect behavior. Compiler optimization is disabled, the= n Od option will be used for VS tool chain. > > From: devel@edk2.groups.io [mailto:devel@e= dk2.groups.io ] On Behalf Of Tiger Liu(BJ-RD) > Sent: Thursday, October 31, 2019 9:40 AM > To: devel@edk2.groups.io ; Gao, Liming > > Subject: Re: [edk2-devel] [edk2] NOOPT and PcdOptimizeCompilerEnable > > Hi, Liming: > Thanks for your explanation. > > If setting PcdOptimizeCompilerEnable as disable, then will cause D9025 c= ompiling warning. > Such as: > cl : Command line warning D9025 : overriding '/O1' with '/Od' > > So, is it ok? > > Thanks > =E5=8F=91=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io > =E4=BB=A3=E8= =A1=A8 Liming Gao > =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2019=E5=B9=B410=E6=9C=8830=E6=97= =A5 23:00 > =E6=94=B6=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io ; Tiger Liu(BJ-RD) > > =E4=B8=BB=E9=A2=98: Re: [edk2-devel] [edk2] NOOPT and PcdOptimizeCompile= rEnable > > NOOPT is build target. It includes the compiler option to disable optimi= zation. If the platform supports NOOPT target, it can be built with -b NOOP= T. > > PcdOptimizeCompilerEnable is one feature PCD defined in edk2-platforms. = It can be used to control the compiler option in [BuildOptions] section. It= can also be used for DEBUG or RELEASE target.=20 > > Thanks > Liming > <>From: devel@edk2.groups.io > On Behalf Of Tiger Liu(BJ-RD) > Sent: Tuesday, October 29, 2019 7:01 PM > To: devel@edk2.groups.io > Subject: [edk2-devel] [edk2] NOOPT and PcdOptimizeCompilerEnable > > Hi, All: > I have a question about NOOPT and PcdOptimizeCompilerEnable. > > If Target =3D NOOPT, then will disable all optimizations. > And PcdOptimizeCompilerEnable has the same function. > > So, What=E2=80=99s the relationship between PcdOptimizeCompilerEnable an= d NOOPT? > > Thanks > > Best wishes, > >=20 > =E4=BF=9D=E5=AF=86=E5=A3=B0=E6=98=8E=EF=BC=9A > =E6=9C=AC=E9=82=AE=E4=BB=B6=E5=90=AB=E6=9C=89=E4=BF=9D=E5=AF=86=E6=88=96= = =E4=B8=93=E6=9C=89=E4=BF=A1=E6=81=AF=EF=BC=8C=E4=BB=85=E4=BE=9B=E6=8C=87= =E5=AE=9A=E6=94=B6=E4=BB=B6=E4=BA=BA=E4=BD=BF=E7=94=A8=E3=80=82=E4=B8=A5= =E7=A6=81=E5=AF=B9=E6=9C=AC=E9=82=AE=E4=BB=B6=E6=88=96=E5=85=B6=E5=86=85= =E5=AE=B9=E5=81=9A=E4=BB=BB=E4=BD=95=E6=9C=AA=E7=BB=8F=E6=8E=88=E6=9D=83= =E7=9A=84=E6=9F=A5=E9=98=85=E3=80=81=E4=BD=BF=E7=94=A8=E3=80=81=E5=A4=8D= =E5=88=B6=E6=88=96=E8=BD=AC=E5=8F=91=E3=80=82 > CONFIDENTIAL NOTE: > This email contains confidential or legally privileged information and i= s for the sole use of its intended recipient. Any unauthorized review, use,= copying or forwarding of this email or the content of this email is strict= ly prohibited. > >=20 > =E4=BF=9D=E5=AF=86=E5=A3=B0=E6=98=8E=EF=BC=9A > =E6=9C=AC=E9=82=AE=E4=BB=B6=E5=90=AB=E6=9C=89=E4=BF=9D=E5=AF=86=E6=88=96= = =E4=B8=93=E6=9C=89=E4=BF=A1=E6=81=AF=EF=BC=8C=E4=BB=85=E4=BE=9B=E6=8C=87= =E5=AE=9A=E6=94=B6=E4=BB=B6=E4=BA=BA=E4=BD=BF=E7=94=A8=E3=80=82=E4=B8=A5= =E7=A6=81=E5=AF=B9=E6=9C=AC=E9=82=AE=E4=BB=B6=E6=88=96=E5=85=B6=E5=86=85= =E5=AE=B9=E5=81=9A=E4=BB=BB=E4=BD=95=E6=9C=AA=E7=BB=8F=E6=8E=88=E6=9D=83= =E7=9A=84=E6=9F=A5=E9=98=85=E3=80=81=E4=BD=BF=E7=94=A8=E3=80=81=E5=A4=8D= =E5=88=B6=E6=88=96=E8=BD=AC=E5=8F=91=E3=80=82 > CONFIDENTIAL NOTE: > This email contains confidential or legally privileged information and i= s for the sole use of its intended recipient. Any unauthorized review, use,= copying or forwarding of this email or the content of this email is strict= ly prohibited. >=20 --Apple-Mail=_04B8D8E9-2DCB-4DC2-9B9E-3BDCA3EC2002 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Liming,
For gcc/clang if you repeat an argument = the last argument wins. This is the default behavior and it does not warn, = as it is designed to work with features like PcdOptimizeCompilerEnable= . 

If VC++ w= arns for this behavior should we disable D9025 for VC++ so all the too= lchains have the same behavior?

<= div class=3D"">Thanks,

Andrew Fish

On Oct 30, 2019, at 6:46 PM, Liming Gao <= liming.gao@intel.com= > wrote:

Yes. This is= the expect behavior. Compiler optimization is disabled, then Od option wil= l be used for VS tool chain.
=  
From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Tiger Liu(BJ-RD)
Sent:=  Thursday, October 31= , 2019 9:40 AM
To: devel@edk= 2.groups.io; Gao, Liming <li= ming.gao@intel.com>
Subject: Re: [edk2-devel] [edk2] NOOPT an= d PcdOptimizeCompilerEnable
<= div style=3D"margin: 0in 0in 0.0001pt; font-size: 10.5pt; font-family: Deng= Xian; text-align: left;" class=3D""> 
Hi, Liming:<= o:p class=3D"">
<= span style=3D"" class=3D"">Thanks for your explanation.
 
If setting PcdOptimizeCompilerEna= ble as disable, then will cause D9025 compiling warning.
Such as:
cl : Command line warning D902= 5 : overriding '/O1' with '/Od'
=  
So, is it ok?
=  
Thanks
=
=E5=8F=91=E4=BB= =B6=E4=BA=BA: devel@edk2.groups.io = <devel@edk2.groups.io= > =E4=BB=A3=E8=A1=A8 Liming Gao
=E5= =8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2019=E5=B9=B410= =E6=9C=8830=E6=97=A5 2= 3:00
=E6=94=B6=E4=BB=B6= = =E4=BA=BA: devel@edk2.groups.io; Tiger Liu(BJ-RD) <TigerLiu@zhaoxin.com>
=E4=B8=BB=E9=A2=98: Re: = [edk2-devel] [edk2] NOOPT and PcdOptimizeCompilerEnable
 
NOOPT is build target. I= t includes the compiler option to disable optimization. If the platform sup= ports NOOPT target, it can be built with -b NOOPT.
 
PcdOptimizeCompilerEnable is o= ne feature PCD defined in edk2-platforms. It can be used to control the com= piler option in [BuildOptions] section. It can also be used for DEBUG or RE= LEASE target. 
 
Thanks
Liming
<= div style=3D"margin: 0in 0in 0.0001pt; font-size: 10.5pt; font-family: Deng= Xian; text-align: left;" class=3D"">From: devel@edk2.g= roups.io <devel@edk2.groups.io> On Behalf Of Tiger Liu(BJ-RD)
Sent: Tuesday, October 29, 2019 7:01 PM
To: 
devel@edk2.groups.io
Subject: [edk2-devel] [edk2] NO= OPT and PcdOptimizeCompilerEnable
<= /div>
 
Hi, All:
I have a question about NOOPT and PcdOptimizeCompilerEna= ble.
=  
If Target =3D NOOPT, then will di= sable all optimizations.
And PcdOptimizeCompilerEnable has the same function.=
 
So, What=E2=80=99s the relationship between PcdOptimizeCompile= rEnable and NOOPT?
 
Thanks=
 
Best wishes,

 = ;

=E4=BF=9D=E5=AF=86= = =E5=A3=B0=E6=98=8E=EF=BC=9A
=E6=9C=AC= =E9=82=AE=E4=BB=B6=E5=90=AB=E6=9C=89=E4=BF=9D=E5=AF=86=E6=88=96=E4=B8=93= =E6=9C=89=E4=BF=A1=E6=81=AF=EF=BC=8C=E4=BB=85=E4=BE=9B=E6=8C=87=E5=AE=9A= =E6=94=B6=E4=BB=B6=E4=BA=BA=E4=BD=BF=E7=94=A8=E3=80=82=E4=B8=A5=E7=A6=81= =E5=AF=B9=E6=9C=AC=E9=82=AE=E4=BB=B6=E6=88=96=E5=85=B6=E5=86=85=E5=AE=B9= =E5=81=9A=E4=BB=BB=E4=BD=95=E6=9C=AA=E7=BB=8F=E6=8E=88=E6=9D=83=E7=9A=84= =E6=9F=A5=E9=98=85=E3=80=81=E4=BD=BF=E7=94=A8=E3=80=81=E5=A4=8D=E5=88=B6= =E6=88=96=E8=BD=AC=E5=8F=91=E3=80=82
CONFIDENTIAL NOTE:
This email contains confidential or legally= privileged information and is for the sole use of its intended recipient. = Any unauthorized review, use, copying or forwarding of this email or the co= ntent of this email is strictly prohibited.

 

=E4=BF=9D=E5=AF=86=E5=A3= = =B0=E6=98=8E=EF=BC=9A
=E6=9C=AC=E9= =82=AE=E4=BB=B6=E5=90=AB=E6=9C=89=E4=BF=9D=E5=AF=86=E6=88=96=E4=B8=93=E6= =9C=89=E4=BF=A1=E6=81=AF=EF=BC=8C=E4=BB=85=E4=BE=9B=E6=8C=87=E5=AE=9A=E6= =94=B6=E4=BB=B6=E4=BA=BA=E4=BD=BF=E7=94=A8=E3=80=82=E4=B8=A5=E7=A6=81=E5= =AF=B9=E6=9C=AC=E9=82=AE=E4=BB=B6=E6=88=96=E5=85=B6=E5=86=85=E5=AE=B9=E5= =81=9A=E4=BB=BB=E4=BD=95=E6=9C=AA=E7=BB=8F=E6=8E=88=E6=9D=83=E7=9A=84=E6= =9F=A5=E9=98=85=E3=80=81=E4=BD=BF=E7=94=A8=E3=80=81=E5=A4=8D=E5=88=B6=E6= =88=96=E8=BD=AC=E5=8F=91=E3=80=82
CONFIDENTIAL NOTE:
This email contains confidential or legally pri= vileged information and is for the sole use of its intended recipient. Any = unauthorized review, use, copying or forwarding of this email or the conten= t of this email is strictly prohibited.
<= p class=3D"MsoNormal" align=3D"left" style=3D"margin: 0in 0in 0.0001pt; fon= t-size: 10.5pt; font-family: DengXian; text-align: left;">

<= /div>

--Apple-Mail=_04B8D8E9-2DCB-4DC2-9B9E-3BDCA3EC2002--