forked from firka/flutter
Reverts "Enable native compilation for windows-arm64 " (#141809)
Reverts flutter/flutter#137618 Initiated by: Jasguerrero This change reverts the following previous change: Original Description: It's now possible to natively compile a flutter app for windows-arm64. Cross-compilation is not yet implemented. Uses arm64 artifacts now available for Dart/Flutter. Platform detection is based on Abi class, provided by Dart. Depending if Dart is an arm64 or x64 binary, the Abi is set accordingly. Initial bootstrap of dart artifacts (update_dart_sdk.ps1) is checking PROCESSOR_ARCHITECTURE environment variable, which is the way to detect host architecture on Windows. This is available only for master channel (on other channels, it fallbacks to windows-x64). On windows-x64, it produces an x64 app. On windows-arm64, it produces an arm64 app.
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
|
||||
import 'dart:async';
|
||||
import 'dart:convert' show LineSplitter, json, utf8;
|
||||
import 'dart:ffi' show Abi;
|
||||
import 'dart:io';
|
||||
import 'dart:math' as math;
|
||||
|
||||
@@ -954,12 +953,11 @@ class StartupTest {
|
||||
'--target=$target',
|
||||
]);
|
||||
final String basename = path.basename(testDirectory);
|
||||
final String arch = Abi.current() == Abi.windowsX64 ? 'x64': 'arm64';
|
||||
applicationBinaryPath = path.join(
|
||||
testDirectory,
|
||||
'build',
|
||||
'windows',
|
||||
arch,
|
||||
'x64',
|
||||
'runner',
|
||||
'Profile',
|
||||
'$basename.exe'
|
||||
@@ -1765,12 +1763,11 @@ class CompileTest {
|
||||
await flutter('build', options: options);
|
||||
watch.stop();
|
||||
final String basename = path.basename(cwd);
|
||||
final String arch = Abi.current() == Abi.windowsX64 ? 'x64': 'arm64';
|
||||
final String exePath = path.join(
|
||||
cwd,
|
||||
'build',
|
||||
'windows',
|
||||
arch,
|
||||
'x64',
|
||||
'runner',
|
||||
'release',
|
||||
'$basename.exe');
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'dart:ffi';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:path/path.dart' as path;
|
||||
@@ -329,9 +328,8 @@ public class $pluginClass: NSObject, FlutterPlugin {
|
||||
throw TaskResult.failure('Platform unit tests failed');
|
||||
}
|
||||
case 'windows':
|
||||
final String arch = Abi.current() == Abi.windowsX64 ? 'x64': 'arm64';
|
||||
if (await exec(
|
||||
path.join(rootPath, 'build', 'windows', arch, 'plugins', 'plugintest', 'Release', 'plugintest_test.exe'),
|
||||
path.join(rootPath, 'build', 'windows', 'x64', 'plugins', 'plugintest', 'Release', 'plugintest_test.exe'),
|
||||
<String>[],
|
||||
canFail: true,
|
||||
) != 0) {
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
import 'dart:ffi';
|
||||
import 'dart:io';
|
||||
|
||||
import '../framework/devices.dart';
|
||||
@@ -174,14 +173,12 @@ class WindowsRunOutputTest extends DesktopRunOutputTest {
|
||||
}
|
||||
);
|
||||
|
||||
final String arch = Abi.current() == Abi.windowsX64 ? 'x64': 'arm64';
|
||||
|
||||
static final RegExp _buildOutput = RegExp(
|
||||
r'Building Windows application\.\.\.\s*\d+(\.\d+)?(ms|s)',
|
||||
multiLine: true,
|
||||
);
|
||||
static final RegExp _builtOutput = RegExp(
|
||||
r'Built build\\windows\\(x64|arm64)\\runner\\(Debug|Release)\\\w+\.exe( \(\d+(\.\d+)?MB\))?\.',
|
||||
r'Built build\\windows\\x64\\runner\\(Debug|Release)\\\w+\.exe( \(\d+(\.\d+)?MB\))?\.',
|
||||
);
|
||||
|
||||
@override
|
||||
@@ -208,7 +205,7 @@ class WindowsRunOutputTest extends DesktopRunOutputTest {
|
||||
|
||||
return true;
|
||||
},
|
||||
'Built build\\windows\\$arch\\runner\\$buildMode\\app.exe',
|
||||
'Built build\\windows\\x64\\runner\\$buildMode\\app.exe',
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user