]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/build/build.py
BaseTools: Fix New Target/ToolChain/Arch in DSC [BuildOptions] issues
[mirror_edk2.git] / BaseTools / Source / Python / build / build.py
index 0570c29f1ada4779d65ea87e8289b476131c2c63..e5693c0d27a2010ef5a20803386cbce48934f55a 100755 (executable)
@@ -897,6 +897,7 @@ class Build():
     # $(TARGET), $(TOOLCHAIN), $(TOOLCHAIN_TAG), or $(ARCH) operands.\r
     #\r
     def GetToolChainAndFamilyFromDsc (self, File):\r
+        SavedGlobalDefines = GlobalData.gGlobalDefines.copy()\r
         for BuildTarget in self.BuildTargetList:\r
             GlobalData.gGlobalDefines['TARGET'] = BuildTarget\r
             for BuildToolChain in self.ToolChainList:\r
@@ -929,6 +930,7 @@ class Build():
                             self.ToolDef.ToolsDefTxtDatabase[TAB_TOD_DEFINES_TOOL_CHAIN_TAG] = []\r
                         if ToolChain not in self.ToolDef.ToolsDefTxtDatabase[TAB_TOD_DEFINES_TOOL_CHAIN_TAG]:\r
                             self.ToolDef.ToolsDefTxtDatabase[TAB_TOD_DEFINES_TOOL_CHAIN_TAG].append(ToolChain)\r
+        GlobalData.gGlobalDefines = SavedGlobalDefines\r
 \r
     ## Load configuration\r
     #\r