Skip to content

Commit 575a1a6

Browse files
fix: use the .cmd NDK clangs on Windows (#24)
Fixes #21
1 parent e4fd492 commit 575a1a6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

native_toolchain_rs/lib/src/build_environment.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,10 @@ interface class AndroidBuildEnvironmentFactory {
4848
final compilerBinariesDir = path.dirname(
4949
path.fromUri(cCompiler.compiler),
5050
);
51-
final binaryPath = path.join(compilerBinariesDir, binaryName);
51+
final binaryPath = path.join(
52+
compilerBinariesDir,
53+
(OS.current == OS.windows) ? '$binaryName.cmd' : binaryName,
54+
);
5255

5356
if (!File(binaryPath).existsSync()) {
5457
throw RustValidationException([

0 commit comments

Comments
 (0)