Bug 218255

Summary: Fix "usage" message when invoking `ar -V`
Product: WebKit Reporter: Keith Rollin <krollin>
Component: CMakeAssignee: Keith Rollin <krollin>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, annulen, don.olmstead, ews-watchlist, gyuyoung.kim, Hironori.Fujii, ryuan.choi, sergio, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Keith Rollin 2020-10-27 13:16:31 PDT
The Mac/BSD version of `ar` does not support the -V flag. This flag is used unconditionally in OptionsCommon.cmake when trying to determine if the installed `ar` supports the thinning of archives, leading to a "usage" message being emitted on macOS.

Avoid this message by capturing the error-output. Examine the output to see if it's a "usage" message. If so, then treat the `ar` as one that does not support thinning. Any other error-output is printed as a warning. If there is no error-output, continue processing as normal.
Comment 1 Radar WebKit Bug Importer 2020-10-27 13:16:43 PDT
<rdar://problem/70735674>
Comment 2 Keith Rollin 2020-10-27 13:18:53 PDT
Created attachment 412455 [details]
Patch
Comment 3 EWS 2020-10-27 14:54:30 PDT
Committed r269076: <https://trac.webkit.org/changeset/269076>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 412455 [details].