properly generate android triple in build.zig
This commit is contained in:
parent
3d6e24af4f
commit
c4b9c0e039
1 changed files with 8 additions and 1 deletions
|
@ -215,7 +215,14 @@ fn compileRaylib(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.
|
||||||
else => @panic("unsupported host OS"),
|
else => @panic("unsupported host OS"),
|
||||||
};
|
};
|
||||||
|
|
||||||
const androidTriple = try target.result.linuxTriple(b.allocator);
|
const androidTriple = switch (target.result.cpu.arch) {
|
||||||
|
.x86 => "i686-linux-android",
|
||||||
|
.x86_64 => "x86_64-linux-android",
|
||||||
|
.arm => "arm-linux-androideabi",
|
||||||
|
.aarch64 => "aarch64-linux-android",
|
||||||
|
.riscv64 => "riscv64-linux-android",
|
||||||
|
else => error.InvalidAndroidTarget,
|
||||||
|
};
|
||||||
const androidNdkPathString: []const u8 = options.android_ndk;
|
const androidNdkPathString: []const u8 = options.android_ndk;
|
||||||
if (androidNdkPathString.len < 1) @panic("no ndk path provided and ANDROID_NDK_HOME is not set");
|
if (androidNdkPathString.len < 1) @panic("no ndk path provided and ANDROID_NDK_HOME is not set");
|
||||||
const androidApiLevel: []const u8 = options.android_api_version;
|
const androidApiLevel: []const u8 = options.android_api_version;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue