Bug 216527

Summary: preprocessor.pm: Use Cygwin::win_to_posix_path and Cygwin::posix_to_win_path instead of cygpath command
Product: WebKit Reporter: Fujii Hironori <Hironori.Fujii>
Component: BindingsAssignee: Fujii Hironori <Hironori.Fujii>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, bfulgham, cdumez, darin, pvollan, stephan.szabo, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Fujii Hironori 2020-09-14 22:22:40 PDT
preprocessor.pm: Use Cygwin::win_to_posix_path and Cygwin::posix_to_win_path instead of cygpath command
Comment 1 Fujii Hironori 2020-09-14 22:35:43 PDT
Created attachment 408794 [details]
Patch
Comment 2 Stephan Szabo 2020-09-15 10:38:36 PDT
Comment on attachment 408794 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=408794&action=review

> Source/WebCore/bindings/scripts/preprocessor.pm:73
> +        if ($preprocessorAndFlags[0] =~ "cl.exe") {

It seems strange to me to assume that only a cl.exe invocation would be in a windows path. Or that you didn't (for example) have a non-cygwin windows build of clang that might need a windows path to the filename even if the perl being run is cygwin perl.
Comment 3 Fujii Hironori 2020-09-15 12:54:26 PDT
Comment on attachment 408794 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=408794&action=review

>> Source/WebCore/bindings/scripts/preprocessor.pm:73
>> +        if ($preprocessorAndFlags[0] =~ "cl.exe") {
> 
> It seems strange to me to assume that only a cl.exe invocation would be in a windows path. Or that you didn't (for example) have a non-cygwin windows build of clang that might need a windows path to the filename even if the perl being run is cygwin perl.

Yup, this code can support only cl.exe and clang-cl.exe for Windows path, others (gcc and g++) for Cygwin path.
Comment 4 Fujii Hironori 2020-09-15 13:12:42 PDT
Comment on attachment 408794 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=408794&action=review

> Source/WebCore/bindings/scripts/preprocessor.pm:74
> +            $preprocessorAndFlags[0] = Cygwin::win_to_posix_path($preprocessorAndFlags[0]);

Theoretically, I should always do this part "$preprocessorAndFlags[0] = Cygwin::win_to_posix_path($preprocessorAndFlags[0]);" for Cygwin perl even for cl.exe. Will fix.
Comment 5 Fujii Hironori 2020-09-15 13:51:48 PDT
Created attachment 408857 [details]
Patch
Comment 6 Fujii Hironori 2020-09-15 14:43:37 PDT
Comment on attachment 408857 [details]
Patch

Clearing flags on attachment: 408857

Committed r267101: <https://trac.webkit.org/changeset/267101>
Comment 7 Fujii Hironori 2020-09-15 14:43:41 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 Radar WebKit Bug Importer 2020-09-15 14:44:15 PDT
<rdar://problem/68942823>