mirror of https://github.com/acidanthera/audk.git
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 commit05217d210e
. This patch is going to fix the bug in commit05217d210e
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>
This commit is contained in:
parent
dfaa565559
commit
c9b3fe1586
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue