Changeset 267101 in webkit


Ignore:
Timestamp:
Sep 15, 2020 2:43:23 PM (4 years ago)
Author:
Fujii Hironori
Message:

preprocessor.pm: Use Cygwin::win_to_posix_path and Cygwin::posix_to_win_path instead of cygpath command
https://bugs.webkit.org/show_bug.cgi?id=216527

Reviewed by Darin Adler.

  • bindings/scripts/preprocessor.pm:

(applyPreprocessor): Use shellwords() to split the $preprocessor.
Use Cygwin Perl's builtin functions instead of spawning process.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r267098 r267101  
     12020-09-15  Fujii Hironori  <Hironori.Fujii@sony.com>
     2
     3        preprocessor.pm: Use Cygwin::win_to_posix_path and Cygwin::posix_to_win_path instead of cygpath command
     4        https://bugs.webkit.org/show_bug.cgi?id=216527
     5
     6        Reviewed by Darin Adler.
     7
     8        * bindings/scripts/preprocessor.pm:
     9        (applyPreprocessor): Use shellwords() to split the $preprocessor.
     10        Use Cygwin Perl's builtin functions instead of spawning process.
     11
    1122020-09-15  Sam Weinig  <weinig@apple.com>
    213
  • trunk/Source/WebCore/bindings/scripts/preprocessor.pm

    r234720 r267101  
    7070    if ($Config{osname} eq "cygwin") {
    7171        $ENV{PATH} = "$ENV{PATH}:/cygdrive/c/cygwin/bin";
    72         my @preprocessorAndFlags;
    73         if ($preprocessor eq "/usr/bin/gcc") {
    74             @preprocessorAndFlags = split(' ', $preprocessor);
    75         } else {       
    76             $preprocessor =~ /"(.*)"/;
    77             chomp(my $preprocessor = `cygpath -u '$1'`) if (defined $1);
    78             chomp($fileName = `cygpath -w '$fileName'`);
    79             @preprocessorAndFlags = ($preprocessor, "/nologo", "/EP");
     72        my @preprocessorAndFlags = shellwords($preprocessor);
     73        if ($preprocessorAndFlags[0] =~ "cl.exe") {
     74            $fileName = Cygwin::posix_to_win_path($fileName);
    8075        }
     76        $preprocessorAndFlags[0] = Cygwin::win_to_posix_path($preprocessorAndFlags[0]);
    8177        # This call can fail if Windows rebases cygwin, so retry a few times until it succeeds.
    8278        for (my $tries = 0; !$pid && ($tries < 20); $tries++) {
Note: See TracChangeset for help on using the changeset viewer.