Pass ARCHS build setting to flutter assemble on macOS (#100811)
This commit is contained in:
parent
810784842a
commit
231c1a4b55
@ -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(
|
||||
|
Loading…
x
Reference in New Issue
Block a user