Bug 216527 - preprocessor.pm: Use Cygwin::win_to_posix_path and Cygwin::posix_to_win_path instead of cygpath command
Summary: preprocessor.pm: Use Cygwin::win_to_posix_path and Cygwin::posix_to_win_path ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Bindings (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Fujii Hironori
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-09-14 22:22 PDT by Fujii Hironori
Modified: 2020-09-15 14:44 PDT (History)
7 users (show)

See Also:


Attachments
Patch (2.16 KB, patch)
2020-09-14 22:35 PDT, Fujii Hironori
no flags Details | Formatted Diff | Diff
Patch (2.15 KB, patch)
2020-09-15 13:51 PDT, Fujii Hironori
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>