this is the build.zig
const std = @import("std");
pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
const cpp_flags: []const []const u8 = switch (optimize) {
.Debug => &.{ "-fsanitize=address,undefined", "-O0", "-ggdb" },
.ReleaseSmall => &.{ "-fno-sanitize=address,undefined", "-Oz" },
.ReleaseSafe => &.{ "-fsanitize=address,undefined", "-O3" },
.ReleaseFast => &.{ "-fno-sanitize=address,undefined", "-O3" },
};
const exe = b.addExecutable(.{
.name = "vine",
.root_module = b.createModule(.{
.target = target,
.optimize = optimize,
}),
.linkage = .dynamic,
});
exe.addCSourceFiles(.{
.files = &.{
"main.cpp",
"uci.cpp",
},
.flags = cpp_flags,
.language = .cpp,
.root = b.path("src/"),
});
exe.linkLibCpp();
b.installArtifact(exe);
const run_step = b.step("run", "Run the app");
const run_cmd = b.addRunArtifact(exe);
run_step.dependOn(&run_cmd.step);
run_cmd.step.dependOn(b.getInstallStep());
if (b.args) |args| {
run_cmd.addArgs(args);
}
}
```but when i run it in debug i get linker errors for address sanitizer, am i missing anything for getting asan to work?