From 669b6cc60bf610bbee32e79ed165ca604764c169 Mon Sep 17 00:00:00 2001 From: Yonghong Zhu Date: Thu, 3 Nov 2016 15:44:17 +0800 Subject: BaseTools: Fix the Windows GCC Build Failure with too long path When path is too long, build tool will wrap them into resp.txt, then call gcc @resp.txt. It will cause windows GCC build failure, because resp.txt still uses windows directory separator \. This patch change the \ to /. Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu Reviewed-by: Liming Gao --- BaseTools/Source/Python/AutoGen/GenMake.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'BaseTools/Source/Python') diff --git a/BaseTools/Source/Python/AutoGen/GenMake.py b/BaseTools/Source/Python/AutoGen/GenMake.py index c8c5fc5386..51c5238fd1 100644 --- a/BaseTools/Source/Python/AutoGen/GenMake.py +++ b/BaseTools/Source/Python/AutoGen/GenMake.py @@ -768,7 +768,11 @@ cleanlib: break else: break - RespDict[Key] = Value + + if self._AutoGenObject.ToolChainFamily == 'GCC': + RespDict[Key] = Value.replace('\\', '/') + else: + RespDict[Key] = Value for Target in BuildTargets: for i, SingleCommand in enumerate(BuildTargets[Target].Commands): if FlagDict[Flag]['Macro'] in SingleCommand: -- cgit v1.2.3