Oops, I read Abner's email too quickly. My use case is only limited to the
use of FeaturePcd in '#if' conditions in ASM files.
Example:
#if FeaturePcdGet(PcdAcTest)
mov r0, #1
#endif
Will be post-processed into:
#if ((BOOLEAN)0U)
mov r0, #1
#endif
And the compiler will report an error because it does not understand
'BOOLEAN' keyword.
The workaround is to replace FeaturePcd by FixedPcdUInt32.
From: Gao, Liming [mailto:[email protected]]
Sent: 13 December 2013 13:55
To: Olivier Martin; 'Abner Chang';
[email protected]
Subject: RE: [edk2-buildtools] FeaturePcd for the preprocessor
Abner:
You can use FeaturePcdGet() in source code to switch code logic. Although
such logic is not trimmed in preprocessor, it can be optimized in link phase
by the smart compiler.
Thanks
Liming
From: Olivier Martin [mailto:[email protected]]
Sent: Friday, December 13, 2013 6:53 PM
To: 'Abner Chang'; [email protected]
Subject: Re: [edk2-buildtools] FeaturePcd for the preprocessor
The workaround I have been using for this 'limitation' is I replaced the
FeaturePcd by PcdUint32 ...
From: Abner Chang [mailto:[email protected]]
Sent: 30 October 2013 02:55
To: [email protected]
Subject: [edk2-buildtools] FeaturePcd for the preprocessor
Hi Buildtools-devel,
First, I am not sure whether or not the topic I would like to talk had been
discussed before
FeaturePcd is used for the different code path. However, in many cases, we
use the predefined macro for the different code for the different purpose.
The difference between these two cases is the different code path is not
involved in the build.
For the FeaturePcd, build tool generates the declaration as below sample,
#define _PCD_VALUE_PcdAcTest ((BOOLEAN)0U)
Can we have the additional one just like, "#define
_PCD_VALUE_CONDITIONAL_PcdAcTest 0"? With this, we can use #if #else in the
source code for the different purpose.
Thanks
Abner
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
edk2-buildtools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-buildtools-devel