Skip to content

Commit

Permalink
[CI] Strip .a's from build archives
Browse files Browse the repository at this point in the history
rdar://121607904
https://bugs.webkit.org/show_bug.cgi?id=268097

Reviewed by Ryan Haddad and Aakash Jain.

libJavaScriptCore.a, added to the Xcode-based builds last fall, has
nearly doubled the size of our archives. Exclude it (and other .a's)
when compressing.

All our static archives are loaded into frameworks or dylibs, so this
has no impact on archive usability.

* Tools/CISupport/built-product-archive:
(listRecursiveFilesInDirWithSuffix):
(archiveBuiltProduct):

Canonical link: https://commits.webkit.org/273533@main
  • Loading branch information
emw-apple committed Jan 25, 2024
1 parent 4d20880 commit b5c8ff5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Tools/CISupport/built-product-archive
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,8 @@ def listRecursiveFilesInDirWithSuffix(directory, suffix):
listFiles.append(realRelativePath)
return listFiles

MINIFIED_EXCLUDED_PATTERNS = ('*.a', '*.dSYM', 'DerivedSources')
ALWAYS_EXCLUDED_PATTERNS = ('*.a',)
MINIFIED_EXCLUDED_PATTERNS = (*ALWAYS_EXCLUDED_PATTERNS, '*.dSYM', 'DerivedSources')

def archiveBuiltProduct(configuration, platform, fullPlatform, minify=False):
assert platform in ('gtk', 'ios', 'jsc-only', 'mac', 'tvos', 'watchos', 'win', 'wincairo', 'wpe')
Expand All @@ -247,12 +248,12 @@ def archiveBuiltProduct(configuration, platform, fullPlatform, minify=False):
if minify:
return createZip(combinedDirectory, 'minified-' + configuration, excludePatterns=MINIFIED_EXCLUDED_PATTERNS)
else:
return createZip(combinedDirectory, configuration)
return createZip(combinedDirectory, configuration, excludePatterns=ALWAYS_EXCLUDED_PATTERNS)
elif platform == 'mac':
if minify:
return createZip(_configurationBuildDirectory, 'minified-' + configuration, excludePatterns=MINIFIED_EXCLUDED_PATTERNS, embedParentDirectoryNameOnDarwin=True)
else:
return createZip(_configurationBuildDirectory, configuration, embedParentDirectoryNameOnDarwin=True)
return createZip(_configurationBuildDirectory, configuration, excludePatterns=ALWAYS_EXCLUDED_PATTERNS, embedParentDirectoryNameOnDarwin=True)
elif platform in ('win', 'wincairo'):
binType = 'bin64' if os.path.exists(os.path.join(_configurationBuildDirectory, 'bin64')) else 'bin32'
binDirectory = os.path.join(_configurationBuildDirectory, binType)
Expand Down

0 comments on commit b5c8ff5

Please sign in to comment.