| ... | ... | @@ -290,6 +290,7 @@ const UserValue = union(enum) { |
| 290 | 290 | lazy_path_list: std.array_list.Managed(LazyPath), |
| 291 | 291 | }; |
| 292 | 292 | |
| 293 | /// Build system implementation detail. |
| 293 | 294 | pub fn create( |
| 294 | 295 | graph: *Graph, |
| 295 | 296 | root: Cache.Path, |
| ... | ... | @@ -681,9 +682,9 @@ fn hashUserInputOptionsMap(allocator: Allocator, user_input_options: UserInputOp |
| 681 | 682 | |
| 682 | 683 | /// Create a set of key-value pairs that can be converted into a Zig source |
| 683 | 684 | /// file and then inserted into a Zig compilation's module table for importing. |
| 684 | | /// In other words, this provides a way to expose build.zig values to Zig |
| 685 | | /// source code with `@import`. |
| 686 | | /// Related: `Module.addOptions`. |
| 685 | /// |
| 686 | /// This provides a way to expose build.zig values to Zig source code with |
| 687 | /// `@import`. Related: `Module.addOptions`. |
| 687 | 688 | pub fn addOptions(b: *Build) *Step.Options { |
| 688 | 689 | return Step.Options.create(b); |
| 689 | 690 | } |
| ... | ... | @@ -970,6 +971,7 @@ pub fn addConfigHeader( |
| 970 | 971 | return config_header_step; |
| 971 | 972 | } |
| 972 | 973 | |
| 974 | /// Deprecated, call `Graph.dupeString` instead. |
| 973 | 975 | pub fn dupe(b: *Build, bytes: []const u8) []const u8 { |
| 974 | 976 | return b.graph.dupeString(bytes); |
| 975 | 977 | } |
| ... | ... | @@ -1292,6 +1294,8 @@ pub fn option(b: *Build, comptime T: type, name_raw: []const u8, description_raw |
| 1292 | 1294 | } |
| 1293 | 1295 | } |
| 1294 | 1296 | |
| 1297 | /// Creates a top-level build step, exposed to the CLI user and advertised in |
| 1298 | /// the "--help" menu. |
| 1295 | 1299 | pub fn step(b: *Build, name: []const u8, description: []const u8) *Step { |
| 1296 | 1300 | const graph = b.graph; |
| 1297 | 1301 | const arena = graph.arena; |
| ... | ... | @@ -1476,6 +1480,7 @@ pub fn standardTargetOptionsQueryOnly(b: *Build, args: StandardTargetOptionsArgs |
| 1476 | 1480 | return args.default_target; |
| 1477 | 1481 | } |
| 1478 | 1482 | |
| 1483 | /// Build system implementation detail. |
| 1479 | 1484 | pub fn addUserInputOption(b: *Build, name_raw: []const u8, value_raw: []const u8) error{OutOfMemory}!bool { |
| 1480 | 1485 | const graph = b.graph; |
| 1481 | 1486 | const arena = graph.arena; |
| ... | ... | @@ -1532,6 +1537,7 @@ pub fn addUserInputOption(b: *Build, name_raw: []const u8, value_raw: []const u8 |
| 1532 | 1537 | return false; |
| 1533 | 1538 | } |
| 1534 | 1539 | |
| 1540 | /// Build system implementation detail. |
| 1535 | 1541 | pub fn addUserInputFlag(b: *Build, name_raw: []const u8) error{OutOfMemory}!bool { |
| 1536 | 1542 | const graph = b.graph; |
| 1537 | 1543 | const name = graph.dupeString(name_raw); |
| ... | ... | @@ -1592,6 +1598,7 @@ fn markInvalidUserInput(b: *Build) void { |
| 1592 | 1598 | b.invalid_user_input = true; |
| 1593 | 1599 | } |
| 1594 | 1600 | |
| 1601 | /// Build system implementation detail. |
| 1595 | 1602 | pub fn validateUserInputDidItFail(b: *Build) bool { |
| 1596 | 1603 | // Make sure all args are used. |
| 1597 | 1604 | var it = b.user_input_options.iterator(); |
| ... | ... | @@ -2178,6 +2185,7 @@ pub inline fn lazyImport( |
| 2178 | 2185 | comptime unreachable; // Bad @dependencies source |
| 2179 | 2186 | } |
| 2180 | 2187 | |
| 2188 | /// Build system implementation detail. |
| 2181 | 2189 | pub fn dependencyFromBuildZig( |
| 2182 | 2190 | b: *Build, |
| 2183 | 2191 | /// The build.zig struct of the dependency, normally obtained by `@import` of the dependency. |
| ... | ... | @@ -2334,6 +2342,7 @@ fn dependencyInner( |
| 2334 | 2342 | return dep; |
| 2335 | 2343 | } |
| 2336 | 2344 | |
| 2345 | /// Build system implementation detail. |
| 2337 | 2346 | pub fn runBuild(b: *Build, build_zig: anytype) anyerror!void { |
| 2338 | 2347 | switch (@typeInfo(@typeInfo(@TypeOf(build_zig.build)).@"fn".return_type.?)) { |
| 2339 | 2348 | .void => build_zig.build(b), |
| ... | ... | @@ -2710,7 +2719,10 @@ pub fn systemIntegrationOption( |
| 2710 | 2719 | |
| 2711 | 2720 | test { |
| 2712 | 2721 | _ = Cache; |
| 2722 | _ = Configuration; |
| 2723 | _ = Module; |
| 2713 | 2724 | _ = Step; |
| 2714 | 2725 | _ = Configuration; |
| 2715 | 2726 | _ = &findProgram; |
| 2727 | _ = abi; |
| 2716 | 2728 | } |