[PATCH] non-Unicode response file support on Windows
Sean Silva
chisophugis at gmail.com
Sat Jan 24 08:11:12 PST 2015
In http://reviews.llvm.org/D7133#113113, @ygao wrote:
> > From: Rafael Espíndola [mailto:rafael.espindola at gmail.com]
>
> > Sent: Friday, January 23, 2015 4:07 PM
>
> > Thanks for splitting the patch!
>
> > When Rafael Auler implemented the bits for *writing* response files from clang, I think the observed behavior was
>
> >
>
> > - GNU tools use the current codepage.
>
> > - MS Tools use UTF-16 only.
>
> > - Clang uses UTF-16 or UTF-8 (non-BOM) The first part of you patch adds support for UTF-8 BOM, which I think is a strict improvement. The change to assume current codepage in a tool that can handle utf is what I think is problematic, since there is no precedent for it (that I know of). Response files are small (relative to the work they cause), so maybe one options would be to try to check if the file is UTF-8 and fallback to current codepage if that fails.
>
>
> I think I just found Rafael Auler’s commit, r217792 (right?). And I confirm that mingw on Windows (tested with MinGW-W64 4.9.2) accepts system codepage-encoded response files (but not UTF-8). I guess what's new here is to try to support both UTF-8 and system codepage.
So why is this patch needed for Shift-JIS then? Wouldn't Shift-JIS be the system codepage?
http://reviews.llvm.org/D7133
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list