Include ARM64 when uploading d8.

Change-Id: I613ca948734a849c43f6f6d02cfd678d18fe7e03
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/336200
Reviewed-by: Alexander Thomas <athom@google.com>
This commit is contained in:
Ryan Macnak 2023-11-21 17:15:20 +00:00 committed by Commit Queue
parent 8d62c1962c
commit c1143082fe
8 changed files with 31 additions and 19 deletions

View file

@ -6,6 +6,7 @@
///
/// This is a shell that runs multiple tests, one per folder under `data/`.
import 'dart:io';
import 'dart:ffi';
import 'dart:async';
import 'package:compiler/src/commandline_options.dart';
@ -585,12 +586,13 @@ Future<ProcessResult> _runProcess(
}
String get _d8executable {
final arch = Abi.current().toString().split('_')[1];
if (Platform.isWindows) {
return 'third_party/d8/windows/d8.exe';
return 'third_party/d8/windows/$arch/d8.exe';
} else if (Platform.isLinux) {
return 'third_party/d8/linux/d8';
return 'third_party/d8/linux/$arch/d8';
} else if (Platform.isMacOS) {
return 'third_party/d8/macos/d8';
return 'third_party/d8/macos/$arch/d8';
}
throw UnsupportedError('Unsupported platform.');
}

View file

@ -2,6 +2,7 @@
// for details. All rights reserved. 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:modular_test/src/create_package_config.dart';
@ -298,12 +299,13 @@ Future<ProcessResult> _runProcess(
}
String get _d8executable {
final arch = Abi.current().toString().split('_')[1];
if (Platform.isWindows) {
return 'third_party/d8/windows/d8.exe';
return 'third_party/d8/windows/$arch/d8.exe';
} else if (Platform.isLinux) {
return 'third_party/d8/linux/d8';
return 'third_party/d8/linux/$arch/d8';
} else if (Platform.isMacOS) {
return 'third_party/d8/macos/d8';
return 'third_party/d8/macos/$arch/d8';
}
throw UnsupportedError('Unsupported platform.');
}

View file

@ -63,6 +63,7 @@ aot
ap
api
apis
arch
app
apparently
applicable

View file

@ -3,6 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
import 'dart:io';
import 'dart:ffi';
import "utils/io_utils.dart";
@ -59,12 +60,13 @@ Future<void> main(List<String> args) async {
final Uri repoDir = computeRepoDirUri();
String get _d8executable {
final arch = Abi.current().toString().split('_')[1];
if (Platform.isWindows) {
return 'third_party/d8/windows/d8.exe';
return 'third_party/d8/windows/$arch/d8.exe';
} else if (Platform.isLinux) {
return 'third_party/d8/linux/d8';
return 'third_party/d8/linux/$arch/d8';
} else if (Platform.isMacOS) {
return 'third_party/d8/macos/d8';
return 'third_party/d8/macos/$arch/d8';
}
throw UnsupportedError('Unsupported platform.');
}

View file

@ -4,6 +4,7 @@
import 'dart:async';
import 'dart:convert' show jsonDecode;
import 'dart:ffi' show Abi;
import 'dart:io';
import 'package:_fe_analyzer_shared/src/testing/annotated_code_helper.dart';
@ -413,12 +414,13 @@ TargetEntry? _findColumn(int line, int column, TargetLineEntry? lineEntry) {
/// Returns the path of the d8 executable.
String get d8executable {
final arch = Abi.current().toString().split('_')[1];
if (Platform.isWindows) {
return 'third_party/d8/windows/d8.exe';
return 'third_party/d8/windows/$arch/d8.exe';
} else if (Platform.isLinux) {
return 'third_party/d8/linux/d8';
return 'third_party/d8/linux/$arch/d8';
} else if (Platform.isMacOS) {
return 'third_party/d8/macos/d8';
return 'third_party/d8/macos/$arch/d8';
}
throw UnsupportedError('Unsupported platform.');
}

View file

@ -1,4 +1,5 @@
import 'dart:convert' show jsonDecode;
import 'dart:ffi' show Abi;
import 'dart:io';
import 'package:_fe_analyzer_shared/src/testing/annotated_code_helper.dart';
@ -443,12 +444,14 @@ File? _cachedD8File;
Directory? _cachedSdkRoot;
File getD8File() {
File attemptFileFromDir(Directory dir) {
final arch = Abi.current().toString().split('_')[1];
if (Platform.isWindows) {
return File('${dir.path}${Platform.pathSeparator}d8/windows/d8.exe');
return File(
'${dir.path}${Platform.pathSeparator}d8/windows/$arch/d8.exe');
} else if (Platform.isLinux) {
return File('${dir.path}${Platform.pathSeparator}d8/linux/d8');
return File('${dir.path}${Platform.pathSeparator}d8/linux/$arch/d8');
} else if (Platform.isMacOS) {
return File('${dir.path}${Platform.pathSeparator}d8/macos/d8');
return File('${dir.path}${Platform.pathSeparator}d8/macos/$arch/d8');
}
throw UnsupportedError('Unsupported platform.');
}

View file

@ -137,8 +137,8 @@ abstract class RuntimeConfiguration {
String get d8FileName {
var d8Dir = Repository.dir.append('third_party/d8');
var d8Path =
d8Dir.append('${Platform.operatingSystem}/d8$executableExtension');
var d8Path = d8Dir.append(
'${Platform.operatingSystem}/${Architecture.host}/d8$executableExtension');
var d8 = d8Path.toNativePath();
TestUtils.ensureExists(d8, _configuration);
return d8;

View file

@ -20,8 +20,8 @@ cleanup() {
trap cleanup EXIT HUP INT QUIT TERM PIPE
cd "$tmpdir"
arch=("linux64" "linux32" "linux64" "linux-arm32" "mac64" "win64")
path=("linux" "linux/ia32" "linux/x64" "linux/arm32" "macos" "windows")
arch=("linux64" "linux-arm64" "mac64" "mac-arm64" "win64")
path=("linux/x64" "linux/arm64" "macos/x64" "macos/arm64" "windows/x64")
for i in "${!arch[@]}"
do