Skip to content

Commit

Permalink
Done with hdr command
Browse files Browse the repository at this point in the history
  • Loading branch information
chen3feng committed Oct 4, 2023
1 parent db12a14 commit b68dae3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/blade/toolchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,12 +482,13 @@ def _hdrs_command(self, flags, cppflags, includes):
Command to generate cc inclusion information file for header file to check dependency missing.
See https://learn.microsoft.com/en-us/cpp/build/reference/showincludes-list-include-files for details.
"""
args = (' -Fonul /Zs %s %s /w ${cppflags} %s ${includes} ${in} '
'2> ${out}.err' % (' '.join(flags), ' '.join(cppflags), includes))
cmd = ('cmd.exe /c %s /nologo /c /E /Zs /TP /showIncludes %s %s /w ${cppflags} %s ${includes} ${in} 2>&1 >nul |'
' findstr "Note: including file" >${out} && type ${out}'% (
self.cc, ' '.join(flags), ' '.join(cppflags), includes))

# If the first cpp command fails, the second cpp command will be executed.
# The error message of the first command should be completely ignored.
return self.cc + args
return cmd

def get_link_command(self):
return self.ld + self._get_link_args()
Expand Down

0 comments on commit b68dae3

Please sign in to comment.