authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-10-26 18:17:49-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-10-26 18:17:49-07:00
log0b72965dbf545aa64eb9d9e33defc36af4e2e42c
treec74278fe741533cb6a4c6753c829c1c00a568549
parent7d0dc2fd75fd0e62cb842e00e82633a35509f12b

build: update Tracy integration

* Update for v0.9 * Enable the memory and callstack integrations by default

1 files changed, 6 insertions(+), 7 deletions(-)

build.zig+6-7
......@@ -122,8 +122,8 @@ pub fn build(b: *Builder) !void {
122122 return;
123123
124124 const tracy = b.option([]const u8, "tracy", "Enable Tracy integration. Supply path to Tracy source");
125 const tracy_callstack = b.option(bool, "tracy-callstack", "Include callstack information with Tracy data. Does nothing if -Dtracy is not provided") orelse false;
126 const tracy_allocation = b.option(bool, "tracy-allocation", "Include allocation information with Tracy data. Does nothing if -Dtracy is not provided") orelse false;
125 const tracy_callstack = b.option(bool, "tracy-callstack", "Include callstack information with Tracy data. Does nothing if -Dtracy is not provided") orelse (tracy != null);
126 const tracy_allocation = b.option(bool, "tracy-allocation", "Include allocation information with Tracy data. Does nothing if -Dtracy is not provided") orelse (tracy != null);
127127 const force_gpa = b.option(bool, "force-gpa", "Force the compiler to use GeneralPurposeAllocator") orelse false;
128128 const link_libc = b.option(bool, "force-link-libc", "Force self-hosted compiler to link libc") orelse (enable_llvm or only_c);
129129 const sanitize_thread = b.option(bool, "sanitize-thread", "Enable thread-sanitization") orelse false;
......@@ -378,7 +378,7 @@ pub fn build(b: *Builder) !void {
378378 if (tracy) |tracy_path| {
379379 const client_cpp = fs.path.join(
380380 b.allocator,
381 &[_][]const u8{ tracy_path, "TracyClient.cpp" },
381 &[_][]const u8{ tracy_path, "public", "TracyClient.cpp" },
382382 ) catch unreachable;
383383
384384 // On mingw, we need to opt into windows 7+ to get some features required by tracy.
......@@ -674,13 +674,12 @@ fn addCxxKnownPath(
674674 exe.addObjectFile(path_unpadded);
675675
676676 // TODO a way to integrate with system c++ include files here
677 // cc -E -Wp,-v -xc++ /dev/null
677 // c++ -E -Wp,-v -xc++ /dev/null
678678 if (need_cpp_includes) {
679679 // I used these temporarily for testing something but we obviously need a
680680 // more general purpose solution here.
681 //exe.addIncludePath("/nix/store/fvf3qjqa5qpcjjkq37pb6ypnk1mzhf5h-gcc-9.3.0/lib/gcc/x86_64-unknown-linux-gnu/9.3.0/../../../../include/c++/9.3.0");
682 //exe.addIncludePath("/nix/store/fvf3qjqa5qpcjjkq37pb6ypnk1mzhf5h-gcc-9.3.0/lib/gcc/x86_64-unknown-linux-gnu/9.3.0/../../../../include/c++/9.3.0/x86_64-unknown-linux-gnu");
683 //exe.addIncludePath("/nix/store/fvf3qjqa5qpcjjkq37pb6ypnk1mzhf5h-gcc-9.3.0/lib/gcc/x86_64-unknown-linux-gnu/9.3.0/../../../../include/c++/9.3.0/backward");
681 //exe.addIncludePath("/nix/store/2lr0fc0ak8rwj0k8n3shcyz1hz63wzma-gcc-11.3.0/include/c++/11.3.0");
682 //exe.addIncludePath("/nix/store/2lr0fc0ak8rwj0k8n3shcyz1hz63wzma-gcc-11.3.0/include/c++/11.3.0/x86_64-unknown-linux-gnu");
684683 }
685684}
686685