From 22a99b87c4d29ebaa8713ac8f04d9d0c11c3add5 Mon Sep 17 00:00:00 2001 From: Yingke Liu Date: Fri, 6 Feb 2015 03:40:27 +0000 Subject: 1. Update UpdateBuildVersion.py; 2. Generate correct HII data offset. 3. Fixed a bug for incorrect PCD value used in conditional statement. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yingke Liu Reviewed-by: Liming Gao git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16784 6f19259b-4bc3-4df7-8a09-765794883524 --- BaseTools/Source/Python/Workspace/MetaFileParser.py | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'BaseTools/Source/Python/Workspace/MetaFileParser.py') diff --git a/BaseTools/Source/Python/Workspace/MetaFileParser.py b/BaseTools/Source/Python/Workspace/MetaFileParser.py index 53b44f4403..f96c73c1db 100644 --- a/BaseTools/Source/Python/Workspace/MetaFileParser.py +++ b/BaseTools/Source/Python/Workspace/MetaFileParser.py @@ -1,7 +1,7 @@ ## @file # This file is used to parse meta files # -# Copyright (c) 2008 - 2014, Intel Corporation. All rights reserved.
+# Copyright (c) 2008 - 2015, Intel Corporation. All rights reserved.
# This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at @@ -1338,18 +1338,6 @@ class DscParser(MetaFileParser): self._SubsectionType = MODEL_UNKNOWN def __RetrievePcdValue(self): - Records = self._RawTable.Query(MODEL_PCD_FEATURE_FLAG, BelongsToItem= -1.0) - for TokenSpaceGuid, PcdName, Value, Dummy2, Dummy3, ID, Line in Records: - Name = TokenSpaceGuid + '.' + PcdName - ValList, Valid, Index = AnalyzeDscPcd(Value, MODEL_PCD_FEATURE_FLAG) - self._Symbols[Name] = ValList[Index] - - Records = self._RawTable.Query(MODEL_PCD_FIXED_AT_BUILD, BelongsToItem= -1.0) - for TokenSpaceGuid, PcdName, Value, Dummy2, Dummy3, ID, Line in Records: - Name = TokenSpaceGuid + '.' + PcdName - ValList, Valid, Index = AnalyzeDscPcd(Value, MODEL_PCD_FIXED_AT_BUILD) - self._Symbols[Name] = ValList[Index] - Content = open(str(self.MetaFile), 'r').readlines() GlobalData.gPlatformOtherPcds['DSCFILE'] = str(self.MetaFile) for PcdType in (MODEL_PCD_PATCHABLE_IN_MODULE, MODEL_PCD_DYNAMIC_DEFAULT, MODEL_PCD_DYNAMIC_HII, @@ -1542,7 +1530,9 @@ class DscParser(MetaFileParser): if ValList[Index] == 'False': ValList[Index] = '0' - GlobalData.gPlatformPcds[TAB_SPLIT.join(self._ValueList[0:2])] = PcdValue + if (not self._DirectiveEvalStack) or (False not in self._DirectiveEvalStack): + GlobalData.gPlatformPcds[TAB_SPLIT.join(self._ValueList[0:2])] = PcdValue + self._Symbols[TAB_SPLIT.join(self._ValueList[0:2])] = PcdValue self._ValueList[2] = '|'.join(ValList) def __ProcessComponent(self): -- cgit v1.2.3