diff options
author | Nate DeSimone <nathaniel.l.desimone@intel.com> | 2025-05-05 23:41:14 -0700 |
---|---|---|
committer | Liming Gao <gaoliming@byosoft.com.cn> | 2025-05-09 09:01:43 +0800 |
commit | 43e29830ef98a98c7045aade648dac14d54cad62 (patch) | |
tree | 2a742cde89ae6aaa0be19994fd1e77bc3b53910b /BaseTools/Source/Python | |
parent | 5bc52de6877a1e70adc91e3242394044155518bb (diff) | |
download | edk2-43e29830ef98a98c7045aade648dac14d54cad62.zip edk2-43e29830ef98a98c7045aade648dac14d54cad62.tar.gz edk2-43e29830ef98a98c7045aade648dac14d54cad62.tar.bz2 |
BaseTools: Fix Macro Expansion on Machine Architecture for Components
BaseTools currently does not expand macros for component architecture when
nested !include directives are used. This breaks use cases like
[Component.$(DXE_ARCH)].
The fix is to add explicit macro expansion when computing the Arch value
for component lines in DscParser.
Signed-off-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
Diffstat (limited to 'BaseTools/Source/Python')
-rw-r--r-- | BaseTools/Source/Python/Workspace/MetaFileParser.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/BaseTools/Source/Python/Workspace/MetaFileParser.py b/BaseTools/Source/Python/Workspace/MetaFileParser.py index 73a1654..50319bf 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 - 2018, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2008 - 2025, Intel Corporation. All rights reserved.<BR>
# (C) Copyright 2015-2018 Hewlett Packard Enterprise Development LP<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
@@ -1388,7 +1388,7 @@ class DscParser(MetaFileParser): self._SectionsMacroDict.clear()
GlobalData.gPlatformDefines = {}
- # Get all macro and PCD which has straitforward value
+ # Get all macro and PCD which has straightforward value
self.__RetrievePcdValue()
self._Content = self._RawTable.GetAll()
self._ContentIndex = 0
@@ -1464,7 +1464,7 @@ class DscParser(MetaFileParser): self._ValueList[0],
self._ValueList[1],
self._ValueList[2],
- S1,
+ self._Scope[0][0],
S2,
S3,
NewOwner,
@@ -1711,6 +1711,7 @@ class DscParser(MetaFileParser): def __ProcessComponent(self):
self._ValueList[0] = ReplaceMacro(self._ValueList[0], self._Macros)
+ self._Scope[0][0] = ReplaceMacro(self._Scope[0][0], self._Macros)
def __ProcessBuildOption(self):
self._ValueList = [ReplaceMacro(Value, self._Macros, RaiseError=False)
|