From d0cd33006906f250f184b6f873a05d15755ba0f0 Mon Sep 17 00:00:00 2001 From: Yonghong Zhu Date: Sat, 24 Feb 2018 21:41:13 +0800 Subject: [PATCH] BaseTools:Override the MAKE_FLAGS by BuildOptions in DSC The issue that *_*_*_MAKE_FLAGS doesn't work in DSC [BuildOptions] section. It means MAKE flags can't be set in platform DSC file. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu Reviewed-by: Liming Gao (cherry picked from commit 02a908fc6d93a7971990d5fa8cd4efe023d14e43) --- BaseTools/Source/Python/AutoGen/AutoGen.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py index 405bfa145a..1787decd1d 100644 --- a/BaseTools/Source/Python/AutoGen/AutoGen.py +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py @@ -1907,6 +1907,13 @@ class PlatformAutoGen(AutoGen): NewOption = self.ToolDefinition["MAKE"]["FLAGS"].strip() if NewOption != '': self._BuildCommand += SplitOption(NewOption) + if "MAKE" in self.EdkIIBuildOption: + if "FLAGS" in self.EdkIIBuildOption["MAKE"]: + Flags = self.EdkIIBuildOption["MAKE"]["FLAGS"] + if Flags.startswith('='): + self._BuildCommand = [self._BuildCommand[0]] + [Flags[1:]] + else: + self._BuildCommand += [Flags] return self._BuildCommand ## Get tool chain definition