authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-01-31 12:48:46-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-01-31 15:09:35-07:00
log9a29f4e0387f0480273ca4347ee43e4917cad8e2
tree810a47c374686d744c3405df1c349936b0c941ec
parent5129fae4e8fdb68db1efdff20679b13487501691

langref updates for new std.Build API


1 files changed, 12 insertions(+), 5 deletions(-)

doc/langref.html.in+12-5
...@@ -10560,8 +10560,9 @@ pub fn build(b: *std.Build) void {...@@ -10560,8 +10560,9 @@ pub fn build(b: *std.Build) void {
10560 // for restricting supported target set are available.10560 // for restricting supported target set are available.
10561 const target = b.standardTargetOptions(.{});10561 const target = b.standardTargetOptions(.{});
1056210562
10563 // Standard release options allow the person running `zig build` to select10563 // Standard optimization options allow the person running `zig build` to select
10564 // between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall.10564 // between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall. Here we do not
10565 // set a preferred release mode, allowing the user to decide how to optimize.
10565 const optimize = b.standardOptimizeOption(.{});10566 const optimize = b.standardOptimizeOption(.{});
1056610567
10567 const exe = b.addExecutable(.{10568 const exe = b.addExecutable(.{
...@@ -10964,8 +10965,11 @@ int main(int argc, char **argv) {...@@ -10964,8 +10965,11 @@ int main(int argc, char **argv) {
10964const std = @import("std");10965const std = @import("std");
1096510966
10966pub fn build(b: *std.Build) void {10967pub fn build(b: *std.Build) void {
10967 const lib = b.addSharedLibrary("mathtest", "mathtest.zig", b.version(1, 0, 0));10968 const lib = b.addSharedLibrary(.{
1096810969 .name = "mathtest",
10970 .root_source_file = .{ .path = "mathtest.zig" },
10971 .version = .{ .major = 1, .minor = 0, .patch = 0 },
10972 });
10969 const exe = b.addExecutable(.{10973 const exe = b.addExecutable(.{
10970 .name = "test",10974 .name = "test",
10971 });10975 });
...@@ -11028,7 +11032,10 @@ int main(int argc, char **argv) {...@@ -11028,7 +11032,10 @@ int main(int argc, char **argv) {
11028const std = @import("std");11032const std = @import("std");
1102911033
11030pub fn build(b: *std.Build) void {11034pub fn build(b: *std.Build) void {
11031 const obj = b.addObject("base64", "base64.zig");11035 const obj = b.addObject(.{
11036 .name = "base64",
11037 .root_source_file = .{ .path = "base64.zig" },
11038 });
1103211039
11033 const exe = b.addExecutable(.{11040 const exe = b.addExecutable(.{
11034 .name = "test",11041 .name = "test",