forked from Losses/rune
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rinf.patch
54 lines (53 loc) · 2.5 KB
/
rinf.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
diff --git a/cargokit/build_tool/lib/src/artifacts_provider.dart b/cargokit/build_tool/lib/src/artifacts_provider.dart
index ef655a9..01f58ea 100755
--- a/cargokit/build_tool/lib/src/artifacts_provider.dart
+++ b/cargokit/build_tool/lib/src/artifacts_provider.dart
@@ -60,10 +60,8 @@ class ArtifactProvider {
return result;
}
- final rustup = Rustup();
for (final target in targets) {
final builder = RustBuilder(target: target, environment: environment);
- builder.prepare(rustup);
_log.info('Building ${environment.crateInfo.packageName} for $target');
final targetDir = await builder.build();
// For local build accept both static and dynamic libraries.
diff --git a/cargokit/build_tool/lib/src/builder.dart b/cargokit/build_tool/lib/src/builder.dart
index 570a537..6cc0e2a 100755
--- a/cargokit/build_tool/lib/src/builder.dart
+++ b/cargokit/build_tool/lib/src/builder.dart
@@ -137,11 +137,8 @@ class RustBuilder {
final extraArgs = _buildOptions?.flags ?? [];
final manifestPath = path.join(environment.manifestDir, 'Cargo.toml');
runCommand(
- 'rustup',
+ 'cargo',
[
- 'run',
- _toolchain,
- 'cargo',
'build',
...extraArgs,
'--manifest-path',
diff --git a/cargokit/cmake/cargokit.cmake b/cargokit/cmake/cargokit.cmake
index 41c03b0..9e1c5eb 100755
--- a/cargokit/cmake/cargokit.cmake
+++ b/cargokit/cmake/cargokit.cmake
@@ -60,7 +60,7 @@ function(apply_cargokit target manifest_dir lib_name any_symbol_name)
"${CMAKE_CURRENT_BINARY_DIR}/${CONFIG}/${CARGOKIT_LIB_FULL_NAME}"
"${CMAKE_CURRENT_BINARY_DIR}/_phony_"
COMMAND ${CMAKE_COMMAND} -E env ${CARGOKIT_ENV}
- "${cargokit_cmake_root}/run_build_tool${SCRIPT_EXTENSION}" build-cmake
+ dart --packages=../../../../../../.dart_tool/package_config.json "${cargokit_cmake_root}/build_tool/bin/build_tool.dart" build-cmake
VERBATIM
)
endforeach()
@@ -70,7 +70,7 @@ function(apply_cargokit target manifest_dir lib_name any_symbol_name)
${OUTPUT_LIB}
"${CMAKE_CURRENT_BINARY_DIR}/_phony_"
COMMAND ${CMAKE_COMMAND} -E env ${CARGOKIT_ENV}
- "${cargokit_cmake_root}/run_build_tool${SCRIPT_EXTENSION}" build-cmake
+ dart --packages=../../../../../../.dart_tool/package_config.json "${cargokit_cmake_root}/build_tool/bin/build_tool.dart" build-cmake
VERBATIM
)
endif()