fixes for core dependencies on std c lib
This commit is contained in:
parent
2e2ab68178
commit
7aa70eb5d5
|
|
@ -169,12 +169,12 @@ pub fn init(backingAllocator: std.mem.Allocator, settings: SetupSettings) @This(
|
||||||
core.engine_logs("[dmt] Enabling Detailed Memory Tracking");
|
core.engine_logs("[dmt] Enabling Detailed Memory Tracking");
|
||||||
}
|
}
|
||||||
|
|
||||||
const stackCompactor = if (EnableMemoryTimeline) core.StackCompactor.create(std.heap.c_allocator) catch null else null;
|
const stackCompactor = if (EnableMemoryTimeline) core.StackCompactor.create(std.heap.smp_allocator) catch null else null;
|
||||||
|
|
||||||
return .{
|
return .{
|
||||||
.backingAllocator = backingAllocator,
|
.backingAllocator = backingAllocator,
|
||||||
.stackCompactor = stackCompactor,
|
.stackCompactor = stackCompactor,
|
||||||
.timeline = if (EnableMemoryTimeline) EventTimeline.init(std.heap.c_allocator) catch null else null,
|
.timeline = if (EnableMemoryTimeline) EventTimeline.init(std.heap.smp_allocator) catch null else null,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,9 @@ test "simple systems setup for core" {
|
||||||
defer core.shutdown_module(allocator);
|
defer core.shutdown_module(allocator);
|
||||||
|
|
||||||
engine_logs("systems started, shutting down");
|
engine_logs("systems started, shutting down");
|
||||||
|
|
||||||
|
engine_logs("this is a new print added to the test function");
|
||||||
|
engine_logs("this is a new print added to the test function");
|
||||||
memory.MTPrintStatsDelta();
|
memory.MTPrintStatsDelta();
|
||||||
|
|
||||||
try test_loadingConfigs();
|
try test_loadingConfigs();
|
||||||
|
|
|
||||||
|
|
@ -21,8 +21,8 @@ pub fn build(b: *std.Build) void {
|
||||||
.target = target,
|
.target = target,
|
||||||
.optimize = optimize,
|
.optimize = optimize,
|
||||||
.root_source_file = b.path("tracy.zig"),
|
.root_source_file = b.path("tracy.zig"),
|
||||||
.link_libc = true,
|
.link_libc = tracy_enabled,
|
||||||
.link_libcpp = true,
|
.link_libcpp = tracy_enabled,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (tracy_enabled) {
|
if (tracy_enabled) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue