[PATCH] non-Unicode response file support on Windows

Yunzhong Gao Yunzhong_Gao at playstation.sony.com
Fri Jan 23 20:56:53 PST 2015


> 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.


http://reviews.llvm.org/D7133

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list