Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add basic Nix flake; handle DWARFv5 in MachO; misc fixes for MachO as Go linker #158

Merged
merged 13 commits into from
Oct 21, 2024
Merged
5 changes: 5 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# If we are a computer with nix-shell available, then use that to setup
# the build environment with exactly what we need.
if has nix; then
use nix
fi
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- uses: actions/checkout@v3
- uses: mlugg/setup-zig@v1
with:
version: master
version: 0.13.0
- run: zig version
- run: zig fmt --check src
- run: zig build test -Dhas-static -Dhas-zig -Dhas-objc-msgsend-stubs
Expand All @@ -28,7 +28,7 @@ jobs:
- uses: actions/checkout@v3
- uses: mlugg/setup-zig@v1
with:
version: master
version: 0.13.0
- uses: ilammy/msvc-dev-cmd@v1
- run: zig version
- run: zig fmt --check src
Expand All @@ -41,7 +41,7 @@ jobs:
- uses: actions/checkout@v3
- uses: mlugg/setup-zig@v1
with:
version: master
version: 0.13.0
- run: sudo apt-get install -y musl-tools
- run: zig version
- run: CC=musl-gcc zig build test -Dhas-static -Dmusl
Expand All @@ -53,7 +53,7 @@ jobs:
- uses: actions/checkout@v3
- uses: mlugg/setup-zig@v1
with:
version: master
version: 0.13.0
- run: sudo apt-get install -y clang
- run: zig version
- run: CC=clang zig build test -Dhas-static -Dsystem-compiler=clang
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

### Building

You will need latest Zig in your path. You can get nightly binaries from [here](https://ziglang.org/download/).
You will need Zig 0.13.0 in your path. You can download it from [here](https://ziglang.org/download/).

```
$ zig build
Expand Down
3 changes: 1 addition & 2 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,7 @@ const CreateSymlinksStep = struct {
return self;
}

fn make(step: *std.Build.Step, options: std.Build.Step.MakeOptions) anyerror!void {
const prog_node = options.progress_node;
fn make(step: *std.Build.Step, prog_node: std.Progress.Node) anyerror!void {
const self: *CreateSymlinksStep = @fieldParentPtr("step", step);
const install_path = self.install.artifact.getEmittedBin().getPath(self.builder);
const rel_source = fs.path.basename(install_path);
Expand Down
8 changes: 4 additions & 4 deletions build.zig.zon
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

.dependencies = .{
.@"zig-yaml" = .{
.url = "https://github.com/kubkon/zig-yaml/archive/a551d00ab041f4799420ab224cdc3efdf978092c.tar.gz",
.hash = "12208398e1393f83a39d03f3ef4893607650b6227dc7f1eee3db4d163fbc2c0c37ca",
.url = "https://github.com/kubkon/zig-yaml/archive/325dbdd276604dccf184c32fef9600b0ac48343d.tar.gz",
.hash = "1220e8870ca83e47b98807e89b5b636072413f6c09f9b26037e4c98c55e4960ac55a",
},
.@"zig-dis-x86_64" = .{
.url = "https://github.com/kubkon/zig-dis-x86_64/archive/53b2e2dae9e824d7b4994e767c2cbb4f39e443a9.tar.gz",
.hash = "1220f2b9588352067d5b6f3b68d5461cea52f4425c9144f6757db775cf2f19cb5d26",
.url = "https://github.com/kubkon/zig-dis-x86_64/archive/5203b9affc5045e000ae7963d988e155e98e396d.tar.gz",
.hash = "12207252f0592e53e8794d5a41409791d5c8c70e0de67bfba48844406619847cc971",
},
},

Expand Down
Loading
Loading