From: Yonghong Zhu Date: Thu, 3 Nov 2016 07:44:17 +0000 (+0800) Subject: BaseTools: Fix the Windows GCC Build Failure with too long path X-Git-Tag: edk2-stable201903~5361 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=669b6cc60bf610bbee32e79ed165ca604764c169 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 --- 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: