mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-23 05:34:31 +02:00
.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>
This commit is contained in:
parent
6b256cef01
commit
4f174696fd
@ -74,9 +74,10 @@ class CompilerPlugin(ICiBuildPlugin):
|
|||||||
self._env.SetValue("ACTIVE_PLATFORM", AP_Path, "Set in Compiler Plugin")
|
self._env.SetValue("ACTIVE_PLATFORM", AP_Path, "Set in Compiler Plugin")
|
||||||
|
|
||||||
# Parse DSC to check for SUPPORTED_ARCHITECTURES
|
# Parse DSC to check for SUPPORTED_ARCHITECTURES
|
||||||
|
build_target = self._env.GetValue("TARGET")
|
||||||
|
input_vars = self._env.GetAllBuildKeyValues(build_target)
|
||||||
dp = DscParser()
|
dp = DscParser()
|
||||||
dp.SetBaseAbsPath(Edk2pathObj.WorkspacePath)
|
dp.SetEdk2Path(Edk2pathObj).SetInputVars(input_vars)
|
||||||
dp.SetPackagePaths(Edk2pathObj.PackagePathList)
|
|
||||||
dp.ParseFile(AP_Path)
|
dp.ParseFile(AP_Path)
|
||||||
if "SUPPORTED_ARCHITECTURES" in dp.LocalVars:
|
if "SUPPORTED_ARCHITECTURES" in dp.LocalVars:
|
||||||
SUPPORTED_ARCHITECTURES = dp.LocalVars["SUPPORTED_ARCHITECTURES"].split('|')
|
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
|
# Skip if there is no intersection between SUPPORTED_ARCHITECTURES and TARGET_ARCHITECTURES
|
||||||
if len(set(SUPPORTED_ARCHITECTURES) & set(TARGET_ARCHITECTURES)) == 0:
|
if len(set(SUPPORTED_ARCHITECTURES) & set(TARGET_ARCHITECTURES)) == 0:
|
||||||
tc.SetSkipped()
|
tc.SetSkipped()
|
||||||
tc.LogStdError("No supported architecutres to build")
|
tc.LogStdError("No supported architectures to build")
|
||||||
return -1
|
return -1
|
||||||
|
|
||||||
uefiBuilder = UefiBuilder()
|
uefiBuilder = UefiBuilder()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user