[deps] Roll dart-lang/native
Change-Id: I4a37c01fefdf00e128b7b2716ac893b3aed10171 Cq-Include-Trybots: luci.dart.try:pkg-linux-debug-try,pkg-linux-release-arm64-try,pkg-linux-release-try,pkg-mac-release-arm64-try,pkg-mac-release-try,pkg-win-release-arm64-try,pkg-win-release-try Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/403585 Reviewed-by: Liam Appelbe <liama@google.com> Reviewed-by: Brian Quinlan <bquinlan@google.com> Reviewed-by: Nate Bosch <nbosch@google.com> Commit-Queue: Liam Appelbe <liama@google.com>
This commit is contained in:
committed by
Commit Queue
parent
6a1f9ed029
commit
9b631bf333
@@ -141,7 +141,7 @@ vars = {
|
||||
"markdown_rev": "19aaded4300d24bedcbf52ade792b203ddf030b0",
|
||||
"material_color_utilities_rev": "799b6ba2f3f1c28c67cc7e0b4f18e0c7d7f3c03e",
|
||||
# dart-native-interop-team@ is rolling breaking changes manually while the assets features are in experimental.
|
||||
"native_rev": "0f9cb0bea17cdd39bacc498e36d687d6baddd0a3", # disable tools/rev_sdk_deps.dart
|
||||
"native_rev": "14368a80bae9e3f381a2e59c91405338d82451ee", # disable tools/rev_sdk_deps.dart
|
||||
"package_config_rev": "07097d7ae60d40b34ce8daabdce318ecc168b7d1",
|
||||
"pool_rev": "bf27900420ba382b6e5c0484ab3c79daad703dcd",
|
||||
"protobuf_rev": "b7dd58cdbd879beee4c3fbf8ee80fce8e97bad26",
|
||||
|
||||
@@ -147,17 +147,17 @@ class BuildCommand extends DartdevCommand {
|
||||
final cCompilerConfig = getCCompilerConfig();
|
||||
|
||||
final buildResult = await nativeAssetsBuildRunner.build(
|
||||
configCreator: () => BuildConfigBuilder()
|
||||
..setupCodeConfig(
|
||||
inputCreator: () => BuildInputBuilder()
|
||||
..config.setupCode(
|
||||
targetOS: target.os,
|
||||
linkModePreference: LinkModePreference.dynamic,
|
||||
targetArchitecture: target.architecture,
|
||||
macOSConfig: macOSConfig,
|
||||
cCompilerConfig: cCompilerConfig,
|
||||
macOS: macOSConfig,
|
||||
cCompiler: cCompilerConfig,
|
||||
),
|
||||
configValidator: (config) async => [
|
||||
...await validateDataAssetBuildConfig(config),
|
||||
...await validateCodeAssetBuildConfig(config),
|
||||
inputValidator: (config) async => [
|
||||
...await validateDataAssetBuildInput(config),
|
||||
...await validateCodeAssetBuildInput(config),
|
||||
],
|
||||
workingDirectory: workingDirectory,
|
||||
|
||||
@@ -205,17 +205,17 @@ class BuildCommand extends DartdevCommand {
|
||||
|
||||
// Start linking here.
|
||||
final linkResult = await nativeAssetsBuildRunner.link(
|
||||
configCreator: () => LinkConfigBuilder()
|
||||
..setupCodeConfig(
|
||||
inputCreator: () => LinkInputBuilder()
|
||||
..config.setupCode(
|
||||
targetOS: target.os,
|
||||
targetArchitecture: target.architecture,
|
||||
linkModePreference: LinkModePreference.dynamic,
|
||||
macOSConfig: macOSConfig,
|
||||
cCompilerConfig: cCompilerConfig,
|
||||
macOS: macOSConfig,
|
||||
cCompiler: cCompilerConfig,
|
||||
),
|
||||
configValidator: (config) async => [
|
||||
...await validateDataAssetLinkConfig(config),
|
||||
...await validateCodeAssetLinkConfig(config),
|
||||
inputValidator: (config) async => [
|
||||
...await validateDataAssetLinkInput(config),
|
||||
...await validateCodeAssetLinkInput(config),
|
||||
],
|
||||
resourceIdentifiers:
|
||||
recordUseEnabled ? Uri.file(recordedUsagesPath!) : null,
|
||||
|
||||
@@ -54,18 +54,18 @@ Future<List<EncodedAsset>?> compileNativeAssetsJit({
|
||||
: null;
|
||||
final cCompilerConfig = getCCompilerConfig();
|
||||
final buildResult = await nativeAssetsBuildRunner.build(
|
||||
configCreator: () => BuildConfigBuilder()
|
||||
..setupCodeConfig(
|
||||
inputCreator: () => BuildInputBuilder()
|
||||
..config.setupCode(
|
||||
targetOS: target.os,
|
||||
targetArchitecture: target.architecture,
|
||||
// When running in JIT mode, only dynamic libraries are supported.
|
||||
linkModePreference: LinkModePreference.dynamic,
|
||||
macOSConfig: macOSConfig,
|
||||
cCompilerConfig: cCompilerConfig,
|
||||
macOS: macOSConfig,
|
||||
cCompiler: cCompilerConfig,
|
||||
),
|
||||
configValidator: (config) async => [
|
||||
...await validateCodeAssetBuildConfig(config),
|
||||
...await validateDataAssetBuildConfig(config),
|
||||
inputValidator: (config) async => [
|
||||
...await validateCodeAssetBuildInput(config),
|
||||
...await validateDataAssetBuildInput(config),
|
||||
],
|
||||
workingDirectory: workingDirectory,
|
||||
runPackageName: runPackageName,
|
||||
|
||||
@@ -7,13 +7,14 @@ import 'package:native_assets_cli/code_assets.dart';
|
||||
import 'package:native_toolchain_c/native_toolchain_c.dart';
|
||||
|
||||
void main(List<String> arguments) async {
|
||||
await build(arguments, (config, output) async {
|
||||
await build(arguments, (input, output) async {
|
||||
final logger = Logger('')
|
||||
..level = Level.ALL
|
||||
..onRecord.listen((record) {
|
||||
print('${record.level.name}: ${record.time}: ${record.message}');
|
||||
});
|
||||
final linkInPackage = config.linkingEnabled ? config.packageName : null;
|
||||
final linkInPackage =
|
||||
input.config.linkingEnabled ? input.packageName : null;
|
||||
await CBuilder.library(
|
||||
name: 'add',
|
||||
assetName: 'dylib_add',
|
||||
@@ -22,7 +23,7 @@ void main(List<String> arguments) async {
|
||||
],
|
||||
linkModePreference: LinkModePreference.dynamic,
|
||||
).run(
|
||||
config: config,
|
||||
input: input,
|
||||
output: output,
|
||||
logger: logger,
|
||||
linkInPackage: linkInPackage,
|
||||
@@ -36,7 +37,7 @@ void main(List<String> arguments) async {
|
||||
],
|
||||
linkModePreference: LinkModePreference.dynamic,
|
||||
).run(
|
||||
config: config,
|
||||
input: input,
|
||||
output: output,
|
||||
logger: logger,
|
||||
linkInPackage: linkInPackage,
|
||||
|
||||
@@ -26,18 +26,18 @@ final instanceId = const Identifier(
|
||||
);
|
||||
|
||||
void main(List<String> arguments) async {
|
||||
await link(arguments, (config, output) async {
|
||||
final file = File.fromUri(config.recordedUsagesFile!);
|
||||
await link(arguments, (input, output) async {
|
||||
final file = File.fromUri(input.recordedUsagesFile!);
|
||||
final string = await file.readAsString();
|
||||
final usages =
|
||||
RecordedUsages.fromJson(jsonDecode(string) as Map<String, dynamic>);
|
||||
|
||||
final codeAssets = config.codeAssets;
|
||||
final codeAssets = input.assets.code;
|
||||
print('Received assets: ${codeAssets.map((a) => a.id).join(', ')}.');
|
||||
|
||||
final symbols = <String>{};
|
||||
final argumentsFile =
|
||||
await File.fromUri(config.outputDirectory.resolve('arguments.txt'))
|
||||
await File.fromUri(input.outputDirectory.resolve('arguments.txt'))
|
||||
.create();
|
||||
|
||||
final dataLines = <String>[];
|
||||
@@ -71,8 +71,8 @@ void main(List<String> arguments) async {
|
||||
];
|
||||
|
||||
print('Keeping only ${neededCodeAssets.map((e) => e.id).join(', ')}.');
|
||||
output.codeAssets.addAll(neededCodeAssets);
|
||||
output.assets.code.addAll(neededCodeAssets);
|
||||
|
||||
output.addDependency(config.packageRoot.resolve('hook/link.dart'));
|
||||
output.addDependency(input.packageRoot.resolve('hook/link.dart'));
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user