[edk2-devel] [edk2] NOOPT and PcdOptimizeCompilerEnable

Liming Gao liming.gao at intel.com
Mon Nov 4 03:40:49 UTC 2019


Andrew:
  I did some investigation. Seemly, there is no way to disable VS command line warning.

Thanks
Liming
From: devel at edk2.groups.io [mailto:devel at edk2.groups.io] On Behalf Of Andrew Fish via Groups.Io
Sent: Thursday, October 31, 2019 10:07 AM
To: devel at edk2.groups.io; Gao, Liming <liming.gao at intel.com>
Cc: tigerliu at zhaoxin.com
Subject: Re: [edk2-devel] [edk2] NOOPT and PcdOptimizeCompilerEnable

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++ warns for this behavior should we disable D9025 for VC++ so all the toolchains have the same behavior?

Thanks,

Andrew Fish


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

Yes. This is the expect behavior. Compiler optimization is disabled, then Od option will be used for VS tool chain.

From: devel at edk2.groups.io<mailto:devel at edk2.groups.io> [mailto:devel at edk2.groups.io] On Behalf Of Tiger Liu(BJ-RD)
Sent: Thursday, October 31, 2019 9:40 AM
To: devel at edk2.groups.io<mailto:devel at edk2.groups.io>; Gao, Liming <liming.gao at intel.com<mailto:liming.gao at intel.com>>
Subject: Re: [edk2-devel] [edk2] NOOPT and PcdOptimizeCompilerEnable

Hi, Liming:
Thanks for your explanation.

If setting PcdOptimizeCompilerEnable as disable, then will cause D9025 compiling warning.
Such as:
cl : Command line warning D9025 : overriding '/O1' with '/Od'

So, is it ok?

Thanks
发件人: devel at edk2.groups.io<mailto:devel at edk2.groups.io> <devel at edk2.groups.io<mailto:devel at edk2.groups.io>> 代表 Liming Gao
发送时间: 2019年10月30日 23:00
收件人: devel at edk2.groups.io<mailto:devel at edk2.groups.io>; Tiger Liu(BJ-RD) <TigerLiu at zhaoxin.com<mailto:TigerLiu at zhaoxin.com>>
主题: Re: [edk2-devel] [edk2] NOOPT and PcdOptimizeCompilerEnable

NOOPT is build target. It includes the compiler option to disable optimization. If the platform supports NOOPT target, it can be built with -b NOOPT.

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.

Thanks
Liming
From: devel at edk2.groups.io<mailto:devel at edk2.groups.io> <devel at edk2.groups.io<mailto:devel at edk2.groups.io>> On Behalf Of Tiger Liu(BJ-RD)
Sent: Tuesday, October 29, 2019 7:01 PM
To: devel at edk2.groups.io<mailto:devel at edk2.groups.io>
Subject: [edk2-devel] [edk2] NOOPT and PcdOptimizeCompilerEnable

Hi, All:
I have a question about NOOPT and PcdOptimizeCompilerEnable.

If Target = NOOPT, then will disable all optimizations.
And PcdOptimizeCompilerEnable has the same function.

So, What’s the relationship between PcdOptimizeCompilerEnable and NOOPT?

Thanks

Best wishes,

保密声明:
本邮件含有保密或专有信息,仅供指定收件人使用。严禁对本邮件或其内容做任何未经授权的查阅、使用、复制或转发。
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 content of this email is strictly prohibited.

保密声明:
本邮件含有保密或专有信息,仅供指定收件人使用。严禁对本邮件或其内容做任何未经授权的查阅、使用、复制或转发。
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 content of this email is strictly prohibited.



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#49902): https://edk2.groups.io/g/devel/message/49902
Mute This Topic: https://groups.io/mt/39414231/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/edk2-devel-archive/attachments/20191104/2a6ed6f0/attachment.htm>


More information about the edk2-devel-archive mailing list