Something went wrong. Try again.
An experiment in static, refcounted, procedural language with ownership
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031const std = @import("std");
pub fn build(b: *std.Build) !void { const target = b.standardTargetOptions(.{}); const optimize = b.standardOptimizeOption(.{});
var gpa = std.heap.GeneralPurposeAllocator(.{}){}; const allocator = gpa.allocator();
const triple = try target.result.linuxTriple(allocator); defer allocator.free(triple);
const name = try std.fmt.allocPrint(allocator, "jinrt_{s}", .{triple});
const lib = b.addStaticLibrary(.{ .name = name, .root_source_file = .{ .path = "jinrt.zig" }, .target = target, .optimize = optimize, });
switch (optimize) { .Debug, .ReleaseSafe => lib.bundle_compiler_rt = true, .ReleaseFast, .ReleaseSmall => {}, }
lib.linkLibC();
b.installArtifact(lib);}