Bug 249644 - [Tools] built-product-archive shouldn't pass 'jsc' as port name for 'jsc-only'
Summary: [Tools] built-product-archive shouldn't pass 'jsc' as port name for 'jsc-only'
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Carlos Alberto Lopez Perez
URL:
Keywords: InRadar
Depends on:
Blocks: 249031
  Show dependency treegraph
 
Reported: 2022-12-20 05:14 PST by Carlos Alberto Lopez Perez
Modified: 2022-12-20 10:58 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Alberto Lopez Perez 2022-12-20 05:14:40 PST
When the parameter platform=foo-bar is passed to the script built-product-archive the script picks as platform name 'foo'.

This is correct for platform names like ios-wk2 or mac-wk2 where the generic platform name is 'mac' or 'ios', but not for 'jsc-only'

This may causes issues later when calling the script webkit-build-directory to determine the build directory path.


Example of the issue (with the patch from bug 249604)

OK $ ./Tools/Scripts/webkit-build-directory --release --configuration --cross-target=rpi3-32bits-mesa --jsc-only
/home/clopez/webkit/webkit/WebKitBuild/JSCOnly/Release_rpi3-32bits-mesa


FAIL $ ./Tools/Scripts/webkit-build-directory --release --configuration --cross-target=rpi3-32bits-mesa --jsc
/home/clopez/webkit/webkit/WebKitBuild/Unknown/Release_rpi3-32bits-mesa

It prints 'Unknown' as port directory because 'jsc' is not a valid port name in webkitdirs.pm so passing --jsc here is like passing any random string

FAIL $ ./Tools/Scripts/webkit-build-directory --release --configuration --cross-target=rpi3-32bits-mesa --magicstring
/home/clopez/webkit/webkit/WebKitBuild/Unknown/Release_rpi3-32bits-mesa


The script webkit-build-directory doesn't complain when you pass an unknown command line switch, so passing '--jsc' is the same than passing '--magicstring' in this example.

The script build-webkit however complains, and if you pass '--jsc' instead of '--jsc-only' you get:

CMake Error at Source/cmake/WebKitCommon.cmake:57 (message):
  Please choose which WebKit port to build (one of
  AppleWin;Efl;FTW;GTK;JSCOnly;Mac;PlayStation;WPE;WinCairo)
Call Stack (most recent call first):
  CMakeLists.txt:25 (include)
Comment 1 Carlos Alberto Lopez Perez 2022-12-20 05:26:31 PST
Pull request: https://github.com/WebKit/WebKit/pull/7907
Comment 2 EWS 2022-12-20 10:57:44 PST
Committed 258147@main (428d184a46a4): <https://commits.webkit.org/258147@main>

Reviewed commits have been landed. Closing PR #7907 and removing active labels.
Comment 3 Radar WebKit Bug Importer 2022-12-20 10:58:17 PST
<rdar://problem/103563497>