Unverified Commit 231c1a4b authored by Jenn Magder's avatar Jenn Magder Committed by GitHub

Pass ARCHS build setting to flutter assemble on macOS (#100811)

parent 81078484
......@@ -70,7 +70,7 @@ BuildApp() {
"assemble"
"--no-version-check"
"-dTargetPlatform=darwin"
"-dDarwinArchs=x86_64 arm64"
"-dDarwinArchs=${ARCHS}"
"-dTargetFile=${target_path}"
"-dBuildMode=${build_mode}"
"-dTreeShakeIcons=${TREE_SHAKE_ICONS}"
......
......@@ -79,7 +79,21 @@ void main() {
'App.framework',
));
expect(outputAppFramework.childFile('App'), exists);
final File outputAppFrameworkBinary = outputAppFramework.childFile('App');
final String archs = processManager.runSync(
<String>['file', outputAppFrameworkBinary.path],
).stdout as String;
final bool containsX64 = archs.contains('Mach-O 64-bit dynamically linked shared library x86_64');
final bool containsArm = archs.contains('Mach-O 64-bit dynamically linked shared library arm64');
if (buildModeLower == 'debug') {
// Only build the architecture matching the machine running this test, not both.
expect(containsX64 ^ containsArm, isTrue, reason: 'Unexpected architecture $archs');
} else {
expect(containsX64, isTrue, reason: 'Unexpected architecture $archs');
expect(containsArm, isTrue, reason: 'Unexpected architecture $archs');
}
expect(outputAppFramework.childLink('Resources'), exists);
final File vmSnapshot = fileSystem.file(fileSystem.path.join(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment