diff options
author | 2023-08-28 04:39:16 -0700 | |
---|---|---|
committer | 2023-08-28 04:39:16 -0700 | |
commit | e2a17344dc543c9c652cfe2b14cd2709dd6cfd22 (patch) | |
tree | fe93965d39886494aee12dca71bdcf2a991d806f /build.zig | |
parent | efe987e8d12e824dde840b56cbb704feabe26ed1 (diff) | |
download | bun-e2a17344dc543c9c652cfe2b14cd2709dd6cfd22.tar.gz bun-e2a17344dc543c9c652cfe2b14cd2709dd6cfd22.tar.zst bun-e2a17344dc543c9c652cfe2b14cd2709dd6cfd22.zip |
just kernel32 things (#4354)
* just kernel32 things
* more
* Update linux_c.zig
* Update windows_c.zig
* Add workaround
Workaround https://github.com/ziglang/zig/issues/16980
* Rename http.zig to bun_dev_http_server.zig
* Rename usages
* more
* more
* more
* thanks tigerbeetle
* Rename `JSC.Node.Syscall` -> `bun.sys`
* more
* woops
* more!
* hmm
* it says there are only 37 errors, but that's not true
* populate argv
* it says 32 errors!
* 24 errors
* fix regular build
* 12 left!
* Still 12 left!
* more
* 2 errors left...
* 1 more error
* Add link to Tigerbeetle
* Fix the remainign error
* Fix test timeout
* Update syscall.zig
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
Diffstat (limited to 'build.zig')
-rw-r--r-- | build.zig | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -34,6 +34,10 @@ fn addInternalPackages(b: *Build, step: *CompileStep, _: std.mem.Allocator, _: [ break :brk b.createModule(.{ .source_file = FileSource.relative("src/io/io_linux.zig"), }); + } else if (target.isWindows()) { + break :brk b.createModule(.{ + .source_file = FileSource.relative("src/io/io_windows.zig"), + }); } break :brk b.createModule(.{ @@ -132,6 +136,16 @@ const Module = std.build.Module; const fs = std.fs; pub fn build(b: *Build) !void { + build_(b) catch |err| { + if (@errorReturnTrace()) |trace| { + std.debug.dumpStackTrace(trace.*); + } + + return err; + }; +} + +pub fn build_(b: *Build) !void { // Standard target options allows the person running `zig build` to choose // what target to build for. Here we do not override the defaults, which // means any target is allowed, and the default is native. Other options @@ -206,6 +220,8 @@ pub fn build(b: *Build) !void { .main_pkg_path = .{ .cwd_relative = b.pathFromRoot(".") }, }); + b.reference_trace = 16; + var default_build_options: BunBuildOptions = brk: { const is_baseline = arch.isX86() and (target.cpu_model == .baseline or !std.Target.x86.featureSetHas(target.getCpuFeatures(), .avx2)); |