From: Yonghong Zhu Date: Sat, 24 Feb 2018 13:41:13 +0000 (+0800) Subject: BaseTools:Override the MAKE_FLAGS by BuildOptions in DSC X-Git-Tag: edk2-stable201903~2332 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=02a908fc6d93a7971990d5fa8cd4efe023d14e43;hp=1c06bd485e45ccbcec1b532d26fba3208b32b0c5 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 --- 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