@@ -7,15 +7,6 @@ const builtin = @import("builtin");
77
88const auto_detect = @import ("build/auto-detect.zig" );
99
10- fn sdkRootIntern () []const u8 {
11- return std .fs .path .dirname (@src ().file ) orelse "." ;
12- }
13-
14- fn sdkRoot () * const [sdkRootIntern ().len ]u8 {
15- comptime var buffer = sdkRootIntern ();
16- return buffer [0.. buffer .len ];
17- }
18-
1910// linux-x86_64
2011pub fn toolchainHostTag () []const u8 {
2112 const os = builtin .os .tag ;
@@ -88,16 +79,16 @@ pub fn init(b: *Build, user_config: ?UserConfig, toolchains: ToolchainVersions)
8879 const host_tools = blk : {
8980 const zip_add = b .addExecutable (.{
9081 .name = "zip_add" ,
91- .root_source_file = b .path (sdkRoot () ++ "/ tools/zip_add.zig" ),
82+ .root_source_file = b .path (" tools/zip_add.zig" ),
9283 .target = b .resolveTargetQuery (.{}),
9384 .optimize = .Debug ,
9485 });
95- zip_add .addCSourceFile (.{ .file = b .path (sdkRoot () ++ "/ vendor/kuba-zip/zip.c" ), .flags = &[_ ][]const u8 {
86+ zip_add .addCSourceFile (.{ .file = b .path (" vendor/kuba-zip/zip.c" ), .flags = &[_ ][]const u8 {
9687 "-std=c99" ,
9788 "-fno-sanitize=undefined" ,
9889 "-D_POSIX_C_SOURCE=200112L" ,
9990 } });
100- zip_add .addIncludePath (b .path (sdkRoot () ++ "/ vendor/kuba-zip" ));
91+ zip_add .addIncludePath (b .path (" vendor/kuba-zip" ));
10192 zip_add .linkLibC ();
10293
10394 break :blk HostTools {
@@ -272,7 +263,7 @@ pub const CreateAppStep = struct {
272263 pub fn getAndroidPackage (self : @This (), name : []const u8 ) std.build.Pkg {
273264 return self .sdk .b .dupePkg (std.build.Pkg {
274265 .name = name ,
275- .source = self .sdk .b .path (sdkRoot () ++ "/ src/android-support.zig" ),
266+ .source = self .sdk .b .path (" src/android-support.zig" ),
276267 .dependencies = &[_ ]std.build.Pkg {
277268 self .build_options .getPackage ("build_options" ),
278269 },
0 commit comments