| Summary: | [webkitpy] Automatically detect hw architecture for supporting Apple Silicon | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Jonathan Bedard <jbedard> | ||||||||||
| Component: | Tools / Tests | Assignee: | Jonathan Bedard <jbedard> | ||||||||||
| Status: | RESOLVED FIXED | ||||||||||||
| Severity: | Normal | CC: | aakash_jain, ap, ews-watchlist, glenn, Hironori.Fujii, ryanhaddad, webkit-bug-importer | ||||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||||
| Version: | WebKit Nightly Build | ||||||||||||
| Hardware: | Unspecified | ||||||||||||
| OS: | Unspecified | ||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Jonathan Bedard
2020-06-26 12:36:16 PDT
Created attachment 402888 [details]
Patch
(In reply to Jonathan Bedard from comment #2) > Created attachment 402888 [details] > Patch This doesn't handle Rosetta yet, but it means that machines running on Apple Silicon with native WebKit will report correctly. Comment on attachment 402888 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=402888&action=review > Tools/Scripts/webkitpy/common/system/platforminfo.py:117 > + if output == 'arm64e': This will never be true since output is assigned to arm64 in above line when it's arm64e. Created attachment 402901 [details]
Patch
Comment on attachment 402901 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=402901&action=review > Tools/ChangeLog:3 > + [webkitpy] Support Apple Silicon (Part 1) Bug title can be little more descriptive. Like: [webkitpy] Automatically detect hw architecture for supporting Apple Silicon > Tools/Scripts/webkitpy/common/system/platforminfo.py:111 > + try: can we avoid running 'uname -m' command when is_mac() is false and have an early return instead? (In reply to Aakash Jain from comment #6) > Comment on attachment 402901 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=402901&action=review > > > Tools/ChangeLog:3 > > + [webkitpy] Support Apple Silicon (Part 1) > > Bug title can be little more descriptive. Like: [webkitpy] Automatically > detect hw architecture for supporting Apple Silicon > > > Tools/Scripts/webkitpy/common/system/platforminfo.py:111 > > + try: > > can we avoid running 'uname -m' command when is_mac() is false and have an > early return instead? I don't think we should. We have multiple watchOS architectures, the same logic should apply. That's actually the whole reason I didn't use the os version of that function in the first place. Created attachment 402903 [details]
Patch
Comment on attachment 402901 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=402901&action=review > Tools/Scripts/webkitpy/common/system/platforminfo_mock.py:43 > + ).get(self.os_name, 'x86') should the default be x86 or x86_64? > Tools/Scripts/webkitpy/port/mac.py:72 > + return 'arm64' might be worth adding a comment here for the reason of doing this. rs=me Created attachment 402905 [details]
Patch for landing
Committed r263592: <https://trac.webkit.org/changeset/263592> All reviewed patches have been landed. Closing bug and clearing flags on attachment 402905 [details]. Comment on attachment 402905 [details] Patch for landing View in context: https://bugs.webkit.org/attachment.cgi?id=402905&action=review > Tools/Scripts/webkitpy/port/base.py:-116 > - self.set_option('architecture', self.DEFAULT_ARCHITECTURE) Removing this code causes a trouble for Windows ports. Filed : Bug 213688 – [Win] run-webkit-tests is failing to run DRT and WTR without --architecture x86_64 |