summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/AutoGen/GenMake.py
diff options
context:
space:
mode:
authorBob Feng <bob.c.feng@intel.com>2019-04-23 11:21:22 +0800
committerFeng, Bob C <bob.c.feng@intel.com>2019-04-28 09:11:27 +0800
commitc9b3fe1586eb191150081851c94f30277b7a3844 (patch)
tree9a9db35c6deed4b1c1b3a0da1cc79d7f30fbdacf /BaseTools/Source/Python/AutoGen/GenMake.py
parentdfaa565559ba28a3b78c0f42b2480d28cecb7382 (diff)
downloadedk2-c9b3fe1586eb191150081851c94f30277b7a3844.tar.gz
edk2-c9b3fe1586eb191150081851c94f30277b7a3844.tar.bz2
edk2-c9b3fe1586eb191150081851c94f30277b7a3844.zip
BaseTools: Support customized compiling command
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1737 User may add other commands before CC command from build_rule.txt for specific purpose. It worked fine before commit 05217d210e. This patch is going to fix the bug in commit 05217d210e to support customized CC command. Signed-off-by: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/AutoGen/GenMake.py')
-rw-r--r--BaseTools/Source/Python/AutoGen/GenMake.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/BaseTools/Source/Python/AutoGen/GenMake.py b/BaseTools/Source/Python/AutoGen/GenMake.py
index 3e770ad7c4..0e0f9fd9b0 100644
--- a/BaseTools/Source/Python/AutoGen/GenMake.py
+++ b/BaseTools/Source/Python/AutoGen/GenMake.py
@@ -1023,7 +1023,7 @@ cleanlib:
CommandList = T.Commands[:]
for Item in CommandList[:]:
SingleCommandList = Item.split()
- if len(SingleCommandList) > 0 and '$(CC)' in SingleCommandList[0]:
+ if len(SingleCommandList) > 0 and self.CheckCCCmd(SingleCommandList):
for Temp in SingleCommandList:
if Temp.startswith('/Fo'):
CmdSign = '%s%s' % (Temp.rsplit(TAB_SLASH, 1)[0], TAB_SLASH)
@@ -1043,6 +1043,11 @@ cleanlib:
T.Commands.pop(Index)
return T, CmdSumDict, CmdTargetDict, CmdCppDict
+ def CheckCCCmd(self, CommandList):
+ for cmd in CommandList:
+ if '$(CC)' in cmd:
+ return True
+ return False
## For creating makefile targets for dependent libraries
def ProcessDependentLibrary(self):
for LibraryAutoGen in self._AutoGenObject.LibraryAutoGenList: