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
84322041
Unverified
Commit
84322041
authored
May 27, 2020
by
Jonah Williams
Committed by
GitHub
May 27, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[flutter_tools] throw if asked to build release for x86_64 (#57874)
parent
a926715d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
1 deletion
+33
-1
ios.dart
packages/flutter_tools/lib/src/build_system/targets/ios.dart
+7
-1
ios_test.dart
...ols/test/general.shard/build_system/targets/ios_test.dart
+26
-0
No files found.
packages/flutter_tools/lib/src/build_system/targets/ios.dart
View file @
84322041
...
...
@@ -58,7 +58,13 @@ abstract class AotAssemblyBase extends Target {
?.
toList
()
??
<
DarwinArch
>[
DarwinArch
.
arm64
];
if
(
targetPlatform
!=
TargetPlatform
.
ios
)
{
throw
Exception
(
'aot_assembly is only supported for iOS applications'
);
throw
Exception
(
'aot_assembly is only supported for iOS applications.'
);
}
if
(
iosArchs
.
contains
(
DarwinArch
.
x86_64
))
{
throw
Exception
(
'release/profile builds are only supported for physical devices. '
'attempted to build for
$iosArchs
.'
);
}
// If we're building multiple iOS archs the binaries need to be lipo'd
...
...
packages/flutter_tools/test/general.shard/build_system/targets/ios_test.dart
View file @
84322041
...
...
@@ -2,9 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'package:file/memory.dart'
;
import
'package:file_testing/file_testing.dart'
;
import
'package:flutter_tools/src/artifacts.dart'
;
import
'package:flutter_tools/src/base/file_system.dart'
;
import
'package:flutter_tools/src/base/logger.dart'
;
import
'package:flutter_tools/src/build_info.dart'
;
import
'package:flutter_tools/src/build_system/build_system.dart'
;
import
'package:flutter_tools/src/build_system/targets/dart.dart'
;
...
...
@@ -175,6 +177,30 @@ void main() {
expect
(
assetDirectory
.
childFile
(
'vm_snapshot_data'
),
isNot
(
exists
));
expect
(
assetDirectory
.
childFile
(
'isolate_snapshot_data'
),
isNot
(
exists
));
}));
test
(
'AotAssemblyRelease throws exception if asked to build for x86 target'
,
()
=>
testbed
.
run
(()
async
{
final
FileSystem
fileSystem
=
MemoryFileSystem
.
test
();
final
Environment
environment
=
Environment
.
test
(
fileSystem
.
currentDirectory
,
defines:
<
String
,
String
>{
kTargetPlatform:
'ios'
,
},
processManager:
processManager
,
artifacts:
MockArtifacts
(),
logger:
BufferLogger
.
test
(),
fileSystem:
fileSystem
,
);
environment
.
defines
[
kBuildMode
]
=
'release'
;
environment
.
defines
[
kIosArchs
]
=
'x86_64'
;
expect
(
const
AotAssemblyRelease
().
build
(
environment
),
throwsA
(
isA
<
Exception
>()
.
having
(
(
Exception
exception
)
=>
exception
.
toString
(),
'description'
,
contains
(
'release/profile builds are only supported for physical devices.'
),
)
));
}));
}
class
MockArtifacts
extends
Mock
implements
Artifacts
{}
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