Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
66d77ca0
Unverified
Commit
66d77ca0
authored
Apr 16, 2020
by
Jenn Magder
Committed by
GitHub
Apr 16, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support armv7s architecture (#54989)
parent
96f80055
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
2 deletions
+52
-2
build_info.dart
packages/flutter_tools/lib/src/build_info.dart
+1
-0
xcode.dart
packages/flutter_tools/lib/src/macos/xcode.dart
+7
-2
xcode_test.dart
...es/flutter_tools/test/general.shard/macos/xcode_test.dart
+44
-0
No files found.
packages/flutter_tools/lib/src/build_info.dart
View file @
66d77ca0
...
...
@@ -400,6 +400,7 @@ DarwinArch getIOSArchForName(String arch) {
switch
(
arch
)
{
case
'armv7'
:
case
'armv7f'
:
// iPhone 4S.
case
'armv7s'
:
// iPad 4.
return
DarwinArch
.
armv7
;
case
'arm64'
:
case
'arm64e'
:
// iPhone XS/XS Max/XR and higher. arm64 runs on arm64e devices.
...
...
packages/flutter_tools/lib/src/macos/xcode.dart
View file @
66d77ca0
...
...
@@ -435,8 +435,13 @@ class XCDevice {
}
on
Exception
{
// Fallback to default iOS architecture. Future-proof against a
// theoretical version of Xcode that changes this string to something
// slightly different like "ARM64".
cpuArchitecture
??=
defaultIOSArchs
.
first
;
// slightly different like "ARM64", or armv7 variations like
// armv7s and armv7f.
if
(
architecture
.
startsWith
(
'armv7'
))
{
cpuArchitecture
=
DarwinArch
.
armv7
;
}
else
{
cpuArchitecture
=
defaultIOSArchs
.
first
;
}
_logger
.
printError
(
'Unknown architecture
$architecture
, defaulting to '
'
${getNameForDarwinArch(cpuArchitecture)}
'
,
...
...
packages/flutter_tools/test/general.shard/macos/xcode_test.dart
View file @
66d77ca0
...
...
@@ -443,6 +443,50 @@ void main() {
},
overrides:
<
Type
,
Generator
>{
Platform:
()
=>
macPlatform
,
});
testUsingContext
(
'handles unknown architectures'
,
()
async
{
when
(
mockXcode
.
isInstalledAndMeetsVersionCheck
).
thenReturn
(
true
);
when
(
processManager
.
runSync
(<
String
>[
'xcrun'
,
'--find'
,
'xcdevice'
]))
.
thenReturn
(
ProcessResult
(
1
,
0
,
'/path/to/xcdevice'
,
''
));
const
String
devicesOutput
=
'''
[
{
"simulator" : false,
"operatingSystemVersion" : "13.3 (17C54)",
"interface" : "usb",
"available" : true,
"platform" : "com.apple.platform.iphoneos",
"modelCode" : "iPhone8,1",
"identifier" : "d83d5bc53967baa0ee18626ba87b6254b2ab5418",
"architecture" : "armv7x",
"modelName" : "iPad 3 BOGUS",
"name" : "iPad"
},
{
"simulator" : false,
"operatingSystemVersion" : "13.3 (17C54)",
"interface" : "usb",
"available" : true,
"platform" : "com.apple.platform.iphoneos",
"modelCode" : "iPhone8,1",
"identifier" : "d83d5bc53967baa0ee18626ba87b6254b2ab5418",
"architecture" : "BOGUS",
"modelName" : "Future iPad",
"name" : "iPad"
}
]
'''
;
when
(
processManager
.
run
(<
String
>[
'xcrun'
,
'xcdevice'
,
'list'
,
'--timeout'
,
'2'
]))
.
thenAnswer
((
_
)
=>
Future
<
ProcessResult
>.
value
(
ProcessResult
(
1
,
0
,
devicesOutput
,
''
)));
final
List
<
IOSDevice
>
devices
=
await
xcdevice
.
getAvailableTetheredIOSDevices
();
expect
(
devices
[
0
].
cpuArchitecture
,
DarwinArch
.
armv7
);
expect
(
devices
[
1
].
cpuArchitecture
,
DarwinArch
.
arm64
);
},
overrides:
<
Type
,
Generator
>{
Platform:
()
=>
macPlatform
,
});
});
group
(
'diagnostics'
,
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment