Skip to content

Commit

Permalink
[Tools] built-product-archive shouldn't pass 'jsc' as port name for '…
Browse files Browse the repository at this point in the history
…jsc-only'

https://bugs.webkit.org/show_bug.cgi?id=249644

Reviewed by Michael Catanzaro.

'jsc' is not a valid port name, so built-product-archive ends calling
webkit-build-directory to determine the build directories with an unknown
port name, which returns the default directory layout.

This works by accident for the general use case, but it should be calling
webkit-build-directory script with the right port name.

Fix it to use and pass 'jsc-only' for the case of the JSCOnly port.

* Tools/CISupport/built-product-archive:

Canonical link: https://commits.webkit.org/258147@main
  • Loading branch information
clopez committed Dec 20, 2022
1 parent 8df840f commit 428d184
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Tools/CISupport/built-product-archive
Expand Up @@ -60,7 +60,7 @@ def main():
parser.error("Action is required")
return 1

genericPlatform = options.platform.split('-', 1)[0]
genericPlatform = 'jsc-only' if options.platform.startswith('jsc') else options.platform.split('-', 1)[0]
determineWebKitBuildDirectories(genericPlatform, options.platform, options.configuration)
if not _topLevelBuildDirectory:
print('Could not determine top-level build directory', file=sys.stderr)
Expand Down Expand Up @@ -215,7 +215,7 @@ def dirContainsdwo(directory):
MINIFIED_EXCLUDED_PATTERNS = ('*.a', '*.dSYM', 'DerivedSources')

def archiveBuiltProduct(configuration, platform, fullPlatform, minify=False):
assert platform in ('gtk', 'ios', 'jsc', 'mac', 'tvos', 'watchos', 'win', 'wincairo', 'wpe')
assert platform in ('gtk', 'ios', 'jsc-only', 'mac', 'tvos', 'watchos', 'win', 'wincairo', 'wpe')
global _configurationBuildDirectory

if platform in ['ios', 'tvos', 'watchos']:
Expand Down Expand Up @@ -255,7 +255,7 @@ def archiveBuiltProduct(configuration, platform, fullPlatform, minify=False):

shutil.rmtree(thinDirectory)

elif platform in ('gtk', 'jsc', 'wpe'):
elif platform in ('gtk', 'jsc-only', 'wpe'):
# On GTK+/WPE/JSC we don't need the intermediate step of creating a thinDirectory
# to be compressed in a ZIP file, because we can create the ZIP directly.
# This is faster and requires less disk resources.
Expand Down Expand Up @@ -329,7 +329,7 @@ def unzipArchive(directoryToExtractTo, configuration):


def extractBuiltProduct(configuration, platform):
assert platform in ('gtk', 'ios', 'jsc', 'mac', 'tvos', 'watchos', 'win', 'wincairo', 'wpe')
assert platform in ('gtk', 'ios', 'jsc-only', 'mac', 'tvos', 'watchos', 'win', 'wincairo', 'wpe')

archiveFile = os.path.join(_topLevelBuildDirectory, configuration + '.zip')

Expand All @@ -338,7 +338,7 @@ def extractBuiltProduct(configuration, platform):

if platform in ('mac', 'ios', 'tvos', 'watchos'):
return unzipArchive(_topLevelBuildDirectory, configuration)
elif platform in ('gtk', 'jsc', 'win', 'wincairo', 'wpe'):
elif platform in ('gtk', 'jsc-only', 'win', 'wincairo', 'wpe'):
print('Extracting: {}'.format(_configurationBuildDirectory))
if unzipArchive(_configurationBuildDirectory, configuration):
return 1
Expand Down

0 comments on commit 428d184

Please sign in to comment.