Skip to content

Commit

Permalink
BaseTools: Fix a bug of genffs command generation
Browse files Browse the repository at this point in the history
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2221

The command used by multiple thread genffs feature in makefile
for testing if file exist is generated based on the toolchain family.
It should be based on the OS type.

Cc: Liming Gao <[email protected]>
Signed-off-by: Bob Feng <[email protected]>
Reviewed-by: Liming Gao <[email protected]>
  • Loading branch information
BobCF committed Oct 14, 2019
1 parent 778832b commit a1f9404
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from __future__ import absolute_import

import Common.LongFilePathOs as os
import sys
from sys import stdout
from subprocess import PIPE,Popen
from struct import Struct
Expand Down Expand Up @@ -486,7 +487,7 @@ def GenerateSection(Output, Input, Type=None, CompressionType=None, Guid=None,

SaveFileOnChange(CommandFile, ' '.join(Cmd), False)
if IsMakefile:
if GlobalData.gGlobalDefines.get("FAMILY") == "MSFT":
if sys.platform == "win32":
Cmd = ['if', 'exist', Input[0]] + Cmd
else:
Cmd = ['-test', '-e', Input[0], "&&"] + Cmd
Expand Down

0 comments on commit a1f9404

Please sign in to comment.