std/special: init-exe,lib make import(std) its own decl (#8160)

std/special: init-exe,lib make import(std) its own decl
This commit is contained in:
Meghan 2021-03-05 19:13:05 -08:00 committed by GitHub
parent ef3adbdb36
commit 9f722f43ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 4 deletions

View File

@ -1,6 +1,6 @@
const Builder = @import("std").build.Builder;
const std = @import("std");
pub fn build(b: *Builder) void {
pub fn build(b: *std.build.Builder) void {
// Standard target options allows the person running `zig build` to choose
// what target to build for. Here we do not override the defaults, which
// means any target is allowed, and the default is native. Other options

View File

@ -1,7 +1,10 @@
const Builder = @import("std").build.Builder;
const std = @import("std");
pub fn build(b: *Builder) void {
pub fn build(b: *std.build.Builder) void {
// Standard release options allow the person running `zig build` to select
// between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall.
const mode = b.standardReleaseOptions();
const lib = b.addStaticLibrary("$", "src/main.zig");
lib.setBuildMode(mode);
lib.install();