Open gptlang opened 2 weeks ago
0.14.0-dev.1798+148b5b4c7
const std = @import("std"); pub fn build(b: *std.Build) void { const target = b.standardTargetOptions(.{ .default_target = .{ .ofmt = .c } }); const optimize = b.standardOptimizeOption(.{}); const exe = b.addExecutable(.{ .name = "LightChase", .target = target, .optimize = optimize, }); exe.addCSourceFile(.{ .file = b.path("src/main.cxx"), .flags = &.{"-std=c++20"} }); exe.linkLibCpp(); b.installArtifact(exe); }
Not error?
$ zig build install └─ install LightChase └─ zig build-exe LightChase Debug native failure error: the following command terminated unexpectedly: /home/acheong/.zvm/master/zig build-exe -ofmt=c -cflags -std=c++20 -- /home/acheong/Projects/huawei/LightChase/src/main.cxx -ODebug -target native -mcpu native -Mroot -lc++ --cache-dir /home/acheong/Projects/huawei/LightChase/.zig-cache --global-cache-dir /home/acheong/.cache/zig --name LightChase --zig-lib-dir /home/acheong/.zvm/master/lib/ --listen=- Build Summary: 0/3 steps succeeded; 1 failed install transitive failure └─ install LightChase transitive failure └─ zig build-exe LightChase Debug native failure error: the following build command failed with exit code 1: /home/acheong/Projects/huawei/LightChase/.zig-cache/o/fd303a8b3608b22b313bd10a7f69bf9c/build /home/acheong/.zvm/master/zig /home/acheong/.zvm/master/lib /home/acheong/Projects/huawei/LightChase /home/acheong/Projects/huawei/LightChase/.zig-cache /home/acheong/.cache/zig --seed 0x885fd524 -Z0e6b505e4c6f0b71
$ zig build-exe -ofmt=c -cflags -std=c++20 -- /home/acheong/Projects/huawe i/LightChase/src/main.cxx -ODebug -target native -mcpu native -Mroot -lc++ --cache-dir /home/acheong/Projects/huawei/LightChase/.zig-cache - -global-cache-dir /home/acheong/.cache/zig --name LightChase --zig-lib-dir /home/acheong/.zvm/master/lib/ fish: Job 1, '/home/acheong/.zvm/master/zig b…' terminated by signal SIGSEGV (Address boundary error)
Rather than SIGSEGV maybe return an error message saying it's not meant to be possible.
Zig Version
0.14.0-dev.1798+148b5b4c7
Steps to Reproduce and Observed Behavior
Expected Behavior
Not error?
Actual behavior