[Bug 4081] New: INF [Sources] section Feature Flag Expressions do not use override values from build --pcd option


bugzilla-daemon@...
 

https://bugzilla.tianocore.org/show_bug.cgi?id=4081

Bug ID: 4081
Summary: INF [Sources] section Feature Flag Expressions do not
use override values from build --pcd option
Product: EDK2
Version: Current
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: Lowest
Component: Code
Assignee: unassigned@...
Reporter: michael.d.kinney@...
CC: edk2+bugs+int+994+563148131503455288@groups.io

If a PCD value is set using the build command --pcd option and that
PCD is used in a Feature Flag Expression in an INF [Sources] section,
then the PCD value in the expression evaluation is from only the
DEC and DSC file values. The --pcd override is ignored.

This issue can be reproduced when building the CryptoPkg and
attempting to set PcdOpensslEcEnabled to TRUE. The build
will break with undefined symbols because the EC related source
files were not compiled into the openssl lib.

build -a IA32 -n 5 -t VS2019 -p CryptoPkg\CryptoPkg.dsc -D CRYPTO_SERVICES=ALL
--pcd gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled=TRUE

The bug is in the file BaseTools/Source/Python/Workspace/InfBuildData.py
in the function CheckFeatureFlagPcd(). It only uses
GlobalData.gPlatformFinalPcds and does not evaluate GlobalData.BuildOptionPcd
or some other source of the
PCDs set using the --pcd option.

--
You are receiving this mail because:
You are on the CC list for the bug.