diff options
author | Joey Vagedes <joey.vagedes@gmail.com> | 2024-06-27 08:43:48 -0700 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2024-07-03 02:41:13 +0000 |
commit | 4f174696fd8fbd9cc29c9f172e8e83fe6da5b070 (patch) | |
tree | ea627f02d4f4569fb2ca0239c0b86f69ce6d0ba0 /.pytool | |
parent | 6b256cef01825fd597ce31ec9343ea280c6114c9 (diff) | |
download | edk2-4f174696fd8fbd9cc29c9f172e8e83fe6da5b070.tar.gz |
.pytool: CompilerPlugin: Pass through build vars
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>
Diffstat (limited to '.pytool')
-rw-r--r-- | .pytool/Plugin/CompilerPlugin/CompilerPlugin.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/.pytool/Plugin/CompilerPlugin/CompilerPlugin.py b/.pytool/Plugin/CompilerPlugin/CompilerPlugin.py index 3cf3888828..01101b2f4a 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()
|