mirror of
https://github.com/ziglang/zig.git
synced 2024-11-28 16:12:33 +00:00
28514476ef
After this commit, the self-hosted compiler does not offer the option to use stage1 as a backend anymore.
25 lines
783 B
Zig
25 lines
783 B
Zig
const std = @import("std");
|
|
const Builder = std.build.Builder;
|
|
|
|
pub fn build(b: *Builder) void {
|
|
const mode = b.standardReleaseOptions();
|
|
|
|
const test_step = b.step("test", "Test");
|
|
test_step.dependOn(b.getInstallStep());
|
|
|
|
// The code in question will pull-in compiler-rt,
|
|
// and therefore link with its archive file.
|
|
const lib = b.addSharedLibrary("main", "main.zig", .unversioned);
|
|
lib.setBuildMode(mode);
|
|
lib.setTarget(.{ .cpu_arch = .wasm32, .os_tag = .freestanding });
|
|
lib.use_llvm = false;
|
|
lib.use_lld = false;
|
|
lib.strip = false;
|
|
|
|
const check = lib.checkObject(.wasm);
|
|
check.checkStart("Section custom");
|
|
check.checkNext("name __truncsfhf2"); // Ensure it was imported and resolved
|
|
|
|
test_step.dependOn(&check.step);
|
|
}
|