]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: Fix the Windows GCC Build Failure with too long path
authorYonghong Zhu <yonghong.zhu@intel.com>
Thu, 3 Nov 2016 07:44:17 +0000 (15:44 +0800)
committerYonghong Zhu <yonghong.zhu@intel.com>
Fri, 4 Nov 2016 06:57:09 +0000 (14:57 +0800)
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 <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
BaseTools/Source/Python/AutoGen/GenMake.py

index c8c5fc53860d7f6c35371a0b0565bbd624d3005d..51c5238fd17ebf89a655e0f5a3977318d8d7c013 100644 (file)
@@ -768,7 +768,11 @@ cleanlib:
                                     break\r
                             else:\r
                                 break\r
-                        RespDict[Key] = Value\r
+\r
+                        if self._AutoGenObject.ToolChainFamily == 'GCC':\r
+                            RespDict[Key] = Value.replace('\\', '/')\r
+                        else:\r
+                            RespDict[Key] = Value\r
                         for Target in BuildTargets:\r
                             for i, SingleCommand in enumerate(BuildTargets[Target].Commands):\r
                                 if FlagDict[Flag]['Macro'] in SingleCommand:\r