From: "Gao, Liming" <liming.gao@intel.com>
To: "Zhu, Yonghong" <yonghong.zhu@intel.com>,
"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: [Patch] BaseTools: PCD can only use single access method by source build
Date: Fri, 5 May 2017 09:14:52 +0000 [thread overview]
Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14D72A9CA@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <1493803235-55844-1-git-send-email-yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
>-----Original Message-----
>From: Zhu, Yonghong
>Sent: Wednesday, May 03, 2017 5:21 PM
>To: edk2-devel@lists.01.org
>Cc: Gao, Liming <liming.gao@intel.com>
>Subject: [Patch] BaseTools: PCD can only use single access method by source
>build
>
>Add the error check that A PCD can only use one type for all source
>modules.
>
>Cc: Liming Gao <liming.gao@intel.com>
>Contributed-under: TianoCore Contribution Agreement 1.0
>Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
>---
> BaseTools/Source/Python/AutoGen/AutoGen.py | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
>diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py
>b/BaseTools/Source/Python/AutoGen/AutoGen.py
>index 8075afc..205a75d 100644
>--- a/BaseTools/Source/Python/AutoGen/AutoGen.py
>+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
>@@ -502,10 +502,26 @@ class WorkspaceAutoGen(AutoGen):
> elif 'FixedAtBuild' in BuildData.Pcds[key].Type:
> if (BuildData.Pcds[key].TokenCName,
>BuildData.Pcds[key].TokenSpaceGuidCName) not in
>SourcePcdDict['FixedAtBuild']:
>
>SourcePcdDict['FixedAtBuild'].append((BuildData.Pcds[key].TokenCName,
>BuildData.Pcds[key].TokenSpaceGuidCName))
> else:
> pass
>+ #
>+ # A PCD can only use one type for all source modules
>+ #
>+ for i in SourcePcdDict_Keys:
>+ for j in SourcePcdDict_Keys:
>+ if i != j:
>+ IntersectionList =
>list(set(SourcePcdDict[i]).intersection(set(SourcePcdDict[j])))
>+ if len(IntersectionList) > 0:
>+ EdkLogger.error(
>+ 'build',
>+ FORMAT_INVALID,
>+ "Building modules from source INFs, following PCD use %s
>and %s access method. It must be corrected to use only one access method." %
>(i, j),
>+ ExtraData="%s" % '\n\t'.join([str(P[1]+'.'+P[0]) for P in
>IntersectionList])
>+ )
>+ else:
>+ pass
>
> #
> # intersection the BinaryPCD for Mixed PCD
> #
> for i in BinaryPcdDict_Keys:
>--
>2.6.1.windows.1
prev parent reply other threads:[~2017-05-05 9:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-03 9:20 [Patch] BaseTools: PCD can only use single access method by source build Yonghong Zhu
2017-05-05 9:14 ` Gao, Liming [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A89E2EF3DFEDB4C8BFDE51014F606A14D72A9CA@shsmsx102.ccr.corp.intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox