mirror of
https://github.com/dart-lang/sdk
synced 2024-09-15 23:49:47 +00:00
[pkgs/native] Roll and update env keys
Also picks up keys from `package:native_assets_cli` instead of coding them which could lead to typos. Change-Id: I5c72c26c9a45a38ac41f3513c2b5b10e8863ff83 Cq-Include-Trybots: luci.dart.try:pkg-linux-debug-try,pkg-linux-release-try,pkg-mac-release-arm64-try,pkg-mac-release-try,pkg-win-release-try Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/300221 Reviewed-by: William Hesse <whesse@google.com> Commit-Queue: Daco Harkes <dacoharkes@google.com>
This commit is contained in:
parent
88aeaa4fec
commit
9e0e9a8a9a
2
DEPS
2
DEPS
|
@ -151,7 +151,7 @@ vars = {
|
|||
"matcher_rev": "cb6b68c603d2c57a51bbddfff08fa211bba7dcd3",
|
||||
"mime_rev": "2d8496df6a6e851816610c3f99eae0d9663f54c4",
|
||||
"mockito_rev": "f851e1754f0af41b1731bd81803d05988482d61b",
|
||||
"native_rev": "5d5db9e1c019512752b5d4d222eb1ae572b8d33c", # disable rev_sdk_deps.dart
|
||||
"native_rev": "a72037604f66190ad0123863774111014546e37c", # disable rev_sdk_deps.dart
|
||||
"package_config_rev": "7e09db12e968482ef81e309de3ce233463b4cd7e",
|
||||
"path_rev": "23e33194c4073c0fdd818a70dd944afd5ad206e6",
|
||||
"pool_rev": "650e5d3eff10529c65ef45b5fcb4bca270c7ea8f",
|
||||
|
|
|
@ -7,6 +7,7 @@ import 'dart:convert';
|
|||
import 'dart:ffi';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:native_assets_cli/native_assets_cli.dart' show CCompilerConfig;
|
||||
import 'package:smith/configuration.dart';
|
||||
import 'package:smith/smith.dart';
|
||||
|
||||
|
@ -280,6 +281,14 @@ class TestConfiguration {
|
|||
}();
|
||||
|
||||
late final Map<String, String> nativeCompilerEnvironmentVariables = () {
|
||||
String unparseKey(String key) => key.replaceAll('.', '__').toUpperCase();
|
||||
final arKey = unparseKey(CCompilerConfig.arConfigKeyFull);
|
||||
final ccKey = unparseKey(CCompilerConfig.ccConfigKeyFull);
|
||||
final ldKey = unparseKey(CCompilerConfig.ldConfigKeyFull);
|
||||
final envScriptKey = unparseKey(CCompilerConfig.envScriptConfigKeyFull);
|
||||
final envScriptArgsKey =
|
||||
unparseKey(CCompilerConfig.envScriptArgsConfigKeyFull);
|
||||
|
||||
if (Platform.isWindows) {
|
||||
// Use MSVC from Depot Tools instead. When using clang from DEPS, we still
|
||||
// need to pass the right INCLUDE / LIB environment variables. So we might
|
||||
|
@ -307,11 +316,11 @@ class TestConfiguration {
|
|||
msvcPath.resolve('bin/Hostx64/${targetFolderName[Abi.current()]!}/');
|
||||
final toolchainEnvScript = windowsSdk.resolve('bin/SetEnv.cmd');
|
||||
return {
|
||||
'AR': binDir.resolve('lib.exe').toFilePath(),
|
||||
'CC': binDir.resolve('cl.exe').toFilePath(),
|
||||
'LD': binDir.resolve('link.exe').toFilePath(),
|
||||
'ToolchainEnvScript': toolchainEnvScript.toFilePath(),
|
||||
'ToolchainEnvScriptArguments': envScriptArgument[Abi.current()]!,
|
||||
arKey: binDir.resolve('lib.exe').toFilePath(),
|
||||
ccKey: binDir.resolve('cl.exe').toFilePath(),
|
||||
ldKey: binDir.resolve('link.exe').toFilePath(),
|
||||
envScriptKey: toolchainEnvScript.toFilePath(),
|
||||
envScriptArgsKey: envScriptArgument[Abi.current()]!,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -330,9 +339,9 @@ class TestConfiguration {
|
|||
final clangBin =
|
||||
Directory.current.uri.resolve('buildtools/$hostFolderName/clang/bin/');
|
||||
return {
|
||||
'AR': clangBin.resolve('llvm-ar').toFilePath(),
|
||||
'CC': clangBin.resolve('clang').toFilePath(),
|
||||
'LD': clangBin.resolve('ld.lld').toFilePath(),
|
||||
arKey: clangBin.resolve('llvm-ar').toFilePath(),
|
||||
ccKey: clangBin.resolve('clang').toFilePath(),
|
||||
ldKey: clangBin.resolve('ld.lld').toFilePath(),
|
||||
};
|
||||
}();
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@ dependencies:
|
|||
args: any
|
||||
collection: any
|
||||
dart2js_tools: any
|
||||
native_assets_cli: any
|
||||
package_config: any
|
||||
path: any
|
||||
pool: any
|
||||
|
|
Loading…
Reference in a new issue