mirror of https://github.com/acidanthera/audk.git
BaseTools: Resolve a issue of Incremental build
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2311 In patch set13c5e34a
-0c3e8e99
, we implemented incremental build with using compiler/pre-processor generate dependent header file function. A issue is found for MSVC compiler, that the cl.exe /showIncludes build option generate header file list to either stdout or stderr. For .c file, the header file list is print out to stdout while for .vfr, .aslc and .nasm file, the file list is print out to stderr. The build tool use two threads to process the message from stdout and stderr, but to generate correct *.deps file, build tool need to combine the header file list from stderr and other messages from stdout together with correct time sequence order. So this patch is trying to combine the stdout and stderr together for the process which is for calling make program. The impact of this patch is that the output message of build with -q will be changed. The compiler error message will not print out. The build behavior of other log level setting will not be impacted. Signed-off-by: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Steven Shi <steven.shi@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
parent
c5d6a57da0
commit
01b6090b75
|
@ -24,7 +24,7 @@ import traceback
|
|||
import multiprocessing
|
||||
from threading import Thread,Event,BoundedSemaphore
|
||||
import threading
|
||||
from subprocess import Popen,PIPE
|
||||
from subprocess import Popen,PIPE, STDOUT
|
||||
from collections import OrderedDict, defaultdict
|
||||
from Common.buildoptions import BuildOption,BuildTarget
|
||||
from AutoGen.PlatformAutoGen import PlatformAutoGen
|
||||
|
@ -230,7 +230,7 @@ def LaunchCommand(Command, WorkingDir,ModuleAuto = None):
|
|||
EndOfProcedure = None
|
||||
try:
|
||||
# launch the command
|
||||
Proc = MakeSubProc(Command, stdout=PIPE, stderr=PIPE, env=os.environ, cwd=WorkingDir, bufsize=-1, shell=True)
|
||||
Proc = MakeSubProc(Command, stdout=PIPE, stderr=STDOUT, env=os.environ, cwd=WorkingDir, bufsize=-1, shell=True)
|
||||
|
||||
# launch two threads to read the STDOUT and STDERR
|
||||
EndOfProcedure = Event()
|
||||
|
@ -241,11 +241,6 @@ def LaunchCommand(Command, WorkingDir,ModuleAuto = None):
|
|||
StdOutThread.setDaemon(False)
|
||||
StdOutThread.start()
|
||||
|
||||
if Proc.stderr:
|
||||
StdErrThread = Thread(target=ReadMessage, args=(Proc.stderr, EdkLogger.quiet, EndOfProcedure,Proc.ProcOut))
|
||||
StdErrThread.setName("STDERR-Redirector")
|
||||
StdErrThread.setDaemon(False)
|
||||
StdErrThread.start()
|
||||
|
||||
# waiting for program exit
|
||||
Proc.wait()
|
||||
|
@ -261,8 +256,6 @@ def LaunchCommand(Command, WorkingDir,ModuleAuto = None):
|
|||
|
||||
if Proc.stdout:
|
||||
StdOutThread.join()
|
||||
if Proc.stderr:
|
||||
StdErrThread.join()
|
||||
|
||||
# check the return code of the program
|
||||
if Proc.returncode != 0:
|
||||
|
|
Loading…
Reference in New Issue