[PATCH] Fix Windows path formatting when using -MD

Yung, Douglas douglas_yung at playstation.sony.com
Thu Apr 9 12:49:11 PDT 2015


Hi Yaron,

The reason this change is Windows only is because I believe the unix versions are trying to mimic gcc as closely as possible for compatibility reasons (as evidenced by the comments), while on Windows gcc compatibility is generally not an issue. If it is preferred to always use double quotes, I would have no problem making that change, although my only hesitation is that I don't know who/what consumes this output, so I cannot guarantee that they may not break with this change.

Douglas Yung

From: Yaron Keren [mailto:yaron.keren at gmail.com]
Sent: Thursday, April 09, 2015 12:43
To: Yung, Douglas
Cc: llvm-commits at cs.uiuc.edu
Subject: Re: [PATCH] Fix Windows path formatting when using -MD

Double quotes work on "real" Unix as well as MSYS or Cygwin, why not use it always?



2015-04-09 22:27 GMT+03:00 Yung, Douglas <douglas_yung at playstation.sony.com<mailto:douglas_yung at playstation.sony.com>>:
Hi,

This patch fixes a problem on Windows when the compiler generates a dependency file using -MD or -MMD. The problem is that when emitting a path that contains spaces, the compiler emits it by escaping the spaces with a leading backspace character which is not valid in Windows. The proper fix for this is to just emit the path enclosed in double quotes which is accepted by Windows. This patch makes that change, and the compiler will then generate the double quoted paths only when the compiler is hosted on Windows. It also updates 3 tests that were affected by this change to accept this change on Windows as well as verify the change works as expected.

Douglas Yung

_______________________________________________
llvm-commits mailing list
llvm-commits at cs.uiuc.edu<mailto:llvm-commits at cs.uiuc.edu>
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150409/213357cb/attachment.html>


More information about the llvm-commits mailing list