abhina.sreeskantharajan added a comment.

In D99426#2653949 <https://reviews.llvm.org/D99426#2653949>, @MaskRay wrote:

> In D99426#2653869 <https://reviews.llvm.org/D99426#2653869>, 
> @abhina.sreeskantharajan wrote:
>
>> In D99426#2653725 <https://reviews.llvm.org/D99426#2653725>, @MaskRay wrote:
>>
>>> This touches a lot of files. I am a bit worried that it would not be easy 
>>> for a contributor to know OF_TextWithCRLF is needed to make SystemZ happy.
>>>
>>>> On SystemZ we need to open text files in text mode,
>>>
>>> Why can't it be served without CRLF translation?
>>
>> So this is a quick summary of the problem we're facing: 
>> On SystemZ, we can accept both OF_Text or OF_TextWithCRLF, it makes no 
>> difference. However, there are many text files that are marked as 
>> binary/OF_None to suppress CRLF translation on Windows. (e.g. patches like 
>> this one 
>> https://reviews.llvm.org/rGe78a7a0ecddc747129512fabf4836e22d1805f00). On 
>> SystemZ we need the text files to be marked as text and have made patches in 
>> the past to do so (e.g. https://reviews.llvm.org/D67696). These efforts are 
>> conflicting with each other, so Reid suggested this solution where we create 
>> a new flag that will set text mode and turn on CRLF translation on Windows 
>> platform. Then we will be able to mark all remaining text files with OF_Text 
>> and not turn on CRLF translation for Windows.
>>
>> I agree this patch is touching a lot of files,  I can maybe do the opposite 
>> and create a flag called OF_TextWithoutCRLF. I'm open to any new solutions 
>> to this problem.
>
> Hmm. I am still confused after seeting 
> rGe78a7a0ecddc747129512fabf4836e22d1805f00 
> <https://reviews.llvm.org/rGe78a7a0ecddc747129512fabf4836e22d1805f00> (does 
> it imply that using OF_None on Windows is fine?)
> If `OF_None` is used on SystemZ, does that regress functionality?

On Windows, OF_None suppresses CRLF translation and OF_Text will allow CRLF 
translation. On SystemZ it does regress functionality by causing file encoding 
issues. z/OS uses a file's text/binary mode to determine whether to perform 
translation to the system encoding EBCDIC if needed. (On binary files, no 
translation should be performed)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D99426/new/

https://reviews.llvm.org/D99426

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to