summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Vagedes <joey.vagedes@gmail.com>2024-06-27 08:43:48 -0700
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2024-07-03 02:41:13 +0000
commit4f174696fd8fbd9cc29c9f172e8e83fe6da5b070 (patch)
treeea627f02d4f4569fb2ca0239c0b86f69ce6d0ba0
parent6b256cef01825fd597ce31ec9343ea280c6114c9 (diff)
downloadedk2-4f174696fd8fbd9cc29c9f172e8e83fe6da5b070.zip
edk2-4f174696fd8fbd9cc29c9f172e8e83fe6da5b070.tar.gz
edk2-4f174696fd8fbd9cc29c9f172e8e83fe6da5b070.tar.bz2
.pytool: CompilerPlugin: Pass through build varsHEADmaster
Pass build variables (those passed to build.py through -D) to the DSC parser to provide a more accurate parsing of the DSC file. Signed-off-by: Joey Vagedes <joey.vagedes@gmail.com>
-rw-r--r--.pytool/Plugin/CompilerPlugin/CompilerPlugin.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/.pytool/Plugin/CompilerPlugin/CompilerPlugin.py b/.pytool/Plugin/CompilerPlugin/CompilerPlugin.py
index 3cf3888..01101b2 100644
--- a/.pytool/Plugin/CompilerPlugin/CompilerPlugin.py
+++ b/.pytool/Plugin/CompilerPlugin/CompilerPlugin.py
@@ -74,9 +74,10 @@ class CompilerPlugin(ICiBuildPlugin):
self._env.SetValue("ACTIVE_PLATFORM", AP_Path, "Set in Compiler Plugin")
# Parse DSC to check for SUPPORTED_ARCHITECTURES
+ build_target = self._env.GetValue("TARGET")
+ input_vars = self._env.GetAllBuildKeyValues(build_target)
dp = DscParser()
- dp.SetBaseAbsPath(Edk2pathObj.WorkspacePath)
- dp.SetPackagePaths(Edk2pathObj.PackagePathList)
+ dp.SetEdk2Path(Edk2pathObj).SetInputVars(input_vars)
dp.ParseFile(AP_Path)
if "SUPPORTED_ARCHITECTURES" in dp.LocalVars:
SUPPORTED_ARCHITECTURES = dp.LocalVars["SUPPORTED_ARCHITECTURES"].split('|')
@@ -85,7 +86,7 @@ class CompilerPlugin(ICiBuildPlugin):
# Skip if there is no intersection between SUPPORTED_ARCHITECTURES and TARGET_ARCHITECTURES
if len(set(SUPPORTED_ARCHITECTURES) & set(TARGET_ARCHITECTURES)) == 0:
tc.SetSkipped()
- tc.LogStdError("No supported architecutres to build")
+ tc.LogStdError("No supported architectures to build")
return -1
uefiBuilder = UefiBuilder()