Bug 187133

Summary: Switch OS(FUCHSIA) to using JSCOnly
Product: WebKit Reporter: Adam Barth <abarth>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, dbates, webkit-bug-importer, ysuzuki
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Adam Barth
Reported 2018-06-27 21:25:36 PDT
Switch OS(FUCHSIA) to using JSCOnly
Attachments
Patch (10.06 KB, patch)
2018-06-27 21:34 PDT, Adam Barth
no flags
Patch (5.36 KB, patch)
2018-06-27 23:38 PDT, Adam Barth
no flags
Patch (5.19 KB, patch)
2018-06-27 23:58 PDT, Adam Barth
no flags
Adam Barth
Comment 1 2018-06-27 21:34:00 PDT
Yusuke Suzuki
Comment 2 2018-06-27 23:21:20 PDT
Comment on attachment 343792 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=343792&action=review > ChangeLog:9 > + Rather than creating a Fuchsia port, OS(FUCHSIA) now uses the JSCOnly > + port. OK, then, I think we should remove Fuchsia related things in webkitdir.pm. We can pass cmakeargs by using `--cmakeargs`. So basically, `Tools/Scripts/build-jsc --jsc-only --cmakeargs="-DCMAKE_TOOLCHAIN_FILE=XXX"` should work. > Tools/Scripts/webkitdirs.pm:152 > +my $targetingFuchsia; If we use JSCOnly port in Fuchsia OS, I think we do not need to check Fuchsia related things in webkitdirs.pm. We can just use `--jsc-only`, and we can remove Fuchsia related things in webkitdirs.pm. > Tools/Scripts/webkitdirs.pm:2212 > + my $toolchainFile = $ENV{'CMAKE_TOOLCHAIN_FILE'}; > + if ($toolchainFile) { > + push @args, "-DCMAKE_TOOLCHAIN_FILE=$toolchainFile"; > + } Why not passing it with `cmakeargs`? `Tools/Scripts/build-jsc --cmakeargs="-DCMAKE_TOOLCHAIN_FILE=XXX"`
Daniel Bates
Comment 3 2018-06-27 23:34:29 PDT
Comment on attachment 343792 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=343792&action=review > Tools/Scripts/webkitdirs.pm:2209 > + my $toolchainFile = $ENV{'CMAKE_TOOLCHAIN_FILE'}; Minor: ‘ (single quote) => “ (double quote) Although unwritten, we prefer double-quoted string literals over single quoted ones unless we explicitly do not want string interpolation or using single quotes reduces the need to escape characters in the string. > Tools/Scripts/webkitdirs.pm:2211 > + push @args, "-DCMAKE_TOOLCHAIN_FILE=$toolchainFile"; This will not work correctly if the path has spaces in its name. We should take a similar approach as done for -DCMAKE_INSTALL_PREFIX and surround $toolchainFile in quotes. Is there a better way to write this code to handle a path that has embedded space characters?
Adam Barth
Comment 4 2018-06-27 23:38:17 PDT
Adam Barth
Comment 5 2018-06-27 23:40:33 PDT
> OK, then, I think we should remove Fuchsia related things in webkitdir.pm. > We can pass cmakeargs by using `--cmakeargs`. > So basically, `Tools/Scripts/build-jsc --jsc-only > --cmakeargs="-DCMAKE_TOOLCHAIN_FILE=XXX"` should work. Neat! > If we use JSCOnly port in Fuchsia OS, I think we do not need to check > Fuchsia related things in webkitdirs.pm. We can just use `--jsc-only`, and > we can remove Fuchsia related things in webkitdirs.pm. Yes, that seems to work. Done. > Why not passing it with `cmakeargs`? `Tools/Scripts/build-jsc > --cmakeargs="-DCMAKE_TOOLCHAIN_FILE=XXX"` Good idea. > Minor: ‘ (single quote) => “ (double quote) Removed. > Although unwritten, we prefer double-quoted string literals over single > quoted ones unless we explicitly do not want string interpolation or using > single quotes reduces the need to escape characters in the string. Got it. I've removed this code, in any case. > > Tools/Scripts/webkitdirs.pm:2211 > > + push @args, "-DCMAKE_TOOLCHAIN_FILE=$toolchainFile"; > > This will not work correctly if the path has spaces in its name. We should > take a similar approach as done for -DCMAKE_INSTALL_PREFIX and surround > $toolchainFile in quotes. Is there a better way to write this code to handle > a path that has embedded space characters? Apparently the best way to write this code is to delete it. :)
Yusuke Suzuki
Comment 6 2018-06-27 23:41:43 PDT
Comment on attachment 343797 [details] Patch r=me, nice!
Daniel Bates
Comment 7 2018-06-27 23:45:44 PDT
Comment on attachment 343797 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=343797&action=review > Tools/ChangeLog:11 > + * Scripts/webkitdirs.pm: Please update this ChangeLog as this function listing is out of date. It would be good to explain that we are removing code from webkitdir.pm (and why) as well as explain how to build by passing --cmakeargs “...” to build-webkit.
Adam Barth
Comment 8 2018-06-27 23:57:17 PDT
> Please update this ChangeLog as this function listing is out of date. Done. > It would be good to explain that we are removing code from webkitdir.pm (and > why) as well as explain how to build by passing --cmakeargs “...” to > build-webkit. I've been putting that information on the wiki: https://trac.webkit.org/wiki/Fuchsia
Adam Barth
Comment 9 2018-06-27 23:58:09 PDT
Yusuke Suzuki
Comment 10 2018-06-28 00:47:17 PDT
Comment on attachment 343799 [details] Patch r=me
WebKit Commit Bot
Comment 11 2018-06-28 01:02:37 PDT
Comment on attachment 343799 [details] Patch Clearing flags on attachment: 343799 Committed r233303: <https://trac.webkit.org/changeset/233303>
WebKit Commit Bot
Comment 12 2018-06-28 01:02:39 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 13 2018-06-28 01:03:18 PDT
Note You need to log in before you can comment on or make changes to this bug.