summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFeng, Bob C <bob.c.feng@intel.com>2019-09-27 10:30:17 +0800
committerFeng, Bob C <bob.c.feng@intel.com>2019-10-14 09:00:10 +0800
commita1f94045ffe9218ec438c4d23980de4243d21cd0 (patch)
treed8a8de26142b4b1807e376b2d34a12bc8fc7b120
parent778832bcad33512ae09bbf7235a1ddcfa7403083 (diff)
downloadedk2-a1f94045ffe9218ec438c4d23980de4243d21cd0.tar.gz
edk2-a1f94045ffe9218ec438c4d23980de4243d21cd0.tar.bz2
edk2-a1f94045ffe9218ec438c4d23980de4243d21cd0.zip
BaseTools: Fix a bug of genffs command generation
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 <liming.gao@intel.com> Signed-off-by: Bob Feng <bob.c.feng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
-rw-r--r--BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py b/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py
index b2f3f6a112..6e1ff7fe04 100644
--- a/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py
+++ b/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py
@@ -13,6 +13,7 @@ from __future__ import print_function
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
@@ -486,7 +487,7 @@ class GenFdsGlobalVariable:
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