Merge pull request #22 from Sashiri/builtin_migration
Migrate from std.builtin to @import("builtin")
This commit is contained in:
commit
a14bfe64c3
@ -6,7 +6,7 @@ pub fn build(b: *Builder) void {
|
||||
const build_mode = b.standardReleaseOptions();
|
||||
|
||||
// use a different cache folder for macos arm builds
|
||||
b.cache_root = if (std.builtin.os.tag == .macos and std.builtin.arch == std.builtin.Arch.aarch64) "zig-arm-cache" else "zig-cache";
|
||||
b.cache_root = if (builtin.os.tag == .macos and builtin.arch == builtin.Arch.aarch64) "zig-arm-cache" else "zig-cache";
|
||||
|
||||
const examples = [_][2][]const u8{
|
||||
[_][]const u8{ "view_vs_group", "examples/view_vs_group.zig" },
|
||||
|
@ -1,4 +1,5 @@
|
||||
const std = @import("std");
|
||||
const builtin = @import("builtin");
|
||||
const utils = @import("utils.zig");
|
||||
|
||||
const Registry = @import("registry.zig").Registry;
|
||||
@ -156,7 +157,7 @@ pub const OwningGroup = struct {
|
||||
}
|
||||
|
||||
fn validate(self: OwningGroup, comptime Components: anytype) void {
|
||||
if (std.builtin.mode == .Debug and self.group_data.owned.len > 0) {
|
||||
if (builtin.mode == .Debug and self.group_data.owned.len > 0) {
|
||||
std.debug.assert(@typeInfo(Components) == .Struct);
|
||||
|
||||
inline for (@typeInfo(Components).Struct.fields) |field| {
|
||||
|
@ -1,4 +1,5 @@
|
||||
const std = @import("std");
|
||||
const builtin = @import("builtin");
|
||||
const assert = std.debug.assert;
|
||||
const utils = @import("utils.zig");
|
||||
|
||||
@ -506,7 +507,7 @@ pub const Registry = struct {
|
||||
var new_group_data = GroupData.initPtr(self.allocator, self, hash, owned_arr[0..], includes_arr[0..], excludes_arr[0..]);
|
||||
|
||||
// before adding the group we need to do some checks to make sure there arent other owning groups with the same types
|
||||
if (std.builtin.mode == .Debug and owned.len > 0) {
|
||||
if (builtin.mode == .Debug and owned.len > 0) {
|
||||
for (self.groups.items) |grp| {
|
||||
if (grp.owned.len == 0) continue;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user