summaryrefslogtreecommitdiff
path: root/BaseTools/Source/Python/AutoGen
diff options
context:
space:
mode:
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2010-03-19 06:55:07 +0000
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2010-03-19 06:55:07 +0000
commitf3decdc362d74c06b6b5028b09eecbaf8db23c12 (patch)
tree9dc0d602eab9291311aea865b9fab7050b555270 /BaseTools/Source/Python/AutoGen
parentaa91de055c5e15a716f3a0ce6bf5a1c28fda9e56 (diff)
downloadedk2-platforms-f3decdc362d74c06b6b5028b09eecbaf8db23c12.tar.xz
Sync EDKII BaseTools to BaseTools project r1937.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10287 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/Source/Python/AutoGen')
-rw-r--r--BaseTools/Source/Python/AutoGen/AutoGen.py10
-rw-r--r--BaseTools/Source/Python/AutoGen/UniClassObject.py4
2 files changed, 11 insertions, 3 deletions
diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py
index 4755e31e96..fa434e810a 100644
--- a/BaseTools/Source/Python/AutoGen/AutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
@@ -138,7 +138,7 @@ class WorkspaceAutoGen(AutoGen):
# @param SkuId SKU id from command line
#
def _Init(self, WorkspaceDir, ActivePlatform, Target, Toolchain, ArchList, MetaFileDb,
- BuildConfig, ToolDefinition, FlashDefinitionFile='', Fds=[], Fvs=[], SkuId=''):
+ BuildConfig, ToolDefinition, FlashDefinitionFile='', Fds=[], Fvs=[], SkuId='', UniFlag=None):
self.MetaFile = ActivePlatform.MetaFile
self.WorkspaceDir = WorkspaceDir
self.Platform = ActivePlatform
@@ -146,6 +146,7 @@ class WorkspaceAutoGen(AutoGen):
self.ToolChain = Toolchain
self.ArchList = ArchList
self.SkuId = SkuId
+ self.UniFlag = UniFlag
self.BuildDatabase = MetaFileDb
self.TargetTxt = BuildConfig
@@ -1191,6 +1192,13 @@ class PlatformAutoGen(AutoGen):
BuildOptions[Tool][Attr] = Value[1:]
else:
BuildOptions[Tool][Attr] += " " + Value
+ if Module.AutoGenVersion < 0x00010005 and self.Workspace.UniFlag != None:
+ #
+ # Override UNI flag only for EDK module.
+ #
+ if 'BUILD' not in BuildOptions:
+ BuildOptions['BUILD'] = {}
+ BuildOptions['BUILD']['FLAGS'] = self.Workspace.UniFlag
return BuildOptions
Platform = property(_GetPlatform)
diff --git a/BaseTools/Source/Python/AutoGen/UniClassObject.py b/BaseTools/Source/Python/AutoGen/UniClassObject.py
index de2f93b8ea..717c10f266 100644
--- a/BaseTools/Source/Python/AutoGen/UniClassObject.py
+++ b/BaseTools/Source/Python/AutoGen/UniClassObject.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2007, Intel Corporation
+# Copyright (c) 2007 - 2010, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -193,7 +193,7 @@ class UniFileClassObject(object):
# Get Language definition
#
def GetLangDef(self, File, Line):
- Lang = Line.split()
+ Lang = Line.split(u"//")[0].split()
if len(Lang) != 3:
try:
FileIn = codecs.open(File, mode='rb', encoding='utf-16').read()