diff options
author | Feng, Bob C <bob.c.feng@intel.com> | 2019-08-02 14:40:31 +0800 |
---|---|---|
committer | Feng, Bob C <bob.c.feng@intel.com> | 2019-08-12 10:40:24 +0800 |
commit | a0792697bc54e5472e2126c6fbff8031868426a9 (patch) | |
tree | 21d13e37273d46e24d0cea6c654de6b5e97c765f /BaseTools/Source/Python/Workspace/DscBuildData.py | |
parent | 4053587347a4c68402c1fc40921b7f1cdaec900e (diff) | |
download | edk2-a0792697bc54e5472e2126c6fbff8031868426a9.tar.gz edk2-a0792697bc54e5472e2126c6fbff8031868426a9.tar.bz2 edk2-a0792697bc54e5472e2126c6fbff8031868426a9.zip |
BaseTools: Fixed an issue that build raise exception
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2047
Build raise exception if there is libraryclass
missing in dsc file and --pcd build option is used.
Build should report the missing libraryclass but not
a call stack.
This patch is going to fix it.
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Bob Feng <bob.c.feng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/Workspace/DscBuildData.py')
-rw-r--r-- | BaseTools/Source/Python/Workspace/DscBuildData.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/BaseTools/Source/Python/Workspace/DscBuildData.py index 383aeaaa15..d2b5ccbb7a 100644 --- a/BaseTools/Source/Python/Workspace/DscBuildData.py +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py @@ -1075,13 +1075,10 @@ class DscBuildData(PlatformBuildClassObject): GlobalData.BuildOptionPcd[i] = (TokenSpaceGuidCName, TokenCName, FieldName, pcdvalue, ("build command options", 1))
if GlobalData.BuildOptionPcd:
+ inf_objs = [item for item in self._Bdb._CACHE_.values() if item.Arch == self.Arch and item.MetaFile.Ext.lower() == '.inf']
for pcd in GlobalData.BuildOptionPcd:
(TokenSpaceGuidCName, TokenCName, FieldName, pcdvalue, _) = pcd
- for BuildData in self._Bdb._CACHE_.values():
- if BuildData.Arch != self.Arch:
- continue
- if BuildData.MetaFile.Ext == '.dec' or BuildData.MetaFile.Ext == '.dsc':
- continue
+ for BuildData in inf_objs:
for key in BuildData.Pcds:
PcdItem = BuildData.Pcds[key]
if (TokenSpaceGuidCName, TokenCName) == (PcdItem.TokenSpaceGuidCName, PcdItem.TokenCName) and FieldName =="":
|