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

update to work with zig master branch #2

Merged
merged 1 commit into from Sep 23, 2019
Merged

update to work with zig master branch #2

merged 1 commit into from Sep 23, 2019

Conversation

andrewrk
Copy link
Contributor

@andrewrk andrewrk commented Sep 23, 2019

I added pkg-config integration to Zig master branch to make your build
script simpler. This allowed me to remove most of the hard-coded paths
from build.zig.

I also took advantage of b.standardTargetOptions and b.setTheTarget.
This means that zig build will create a native executable - which will
look in standard system directories for libraries - and
zig build -Dtarget=x86_64-linux-gnu will create an executable suitable
for distributing.

I removed exe.setOutputDir and added exe.install(). This makes zig
build do better caching (try multiple zig builds in a row after this
patch), as well as be set up for doing a system install or creating a
distribution, with zig build install --prefix /your/install/path.

A default zig build will "install" to zig-cache, so for typical
development purposes you would run ./zig-cache/bin/zootdeck.

The formatting changes are due to having zig fmt enabled on save.

Hash maps are upgraded to std.StringHashMap to fix compilation errors.

Tested with zig ziglang/zig@53ae03e.

I added pkg-config integration to Zig master branch to make your build
script simpler. This allowed me to remove most of the hard-coded paths
from build.zig.

I also took advantage of `b.standardTargetOptions` and `b.setTheTarget`.
This means that `zig build` will create a native executable - which will
look in standard system directories for libraries - and
`zig build -Dtarget=x86_64-linux-gnu` will create an executable suitable
for distributing.

I removed `exe.setOutputDir` and added `exe.install()`. This makes zig
build do better caching (try multiple zig builds in a row after this
patch), as well as be set up for doing a system install or creating a
distribution, with `zig build install --prefix /your/install/path`.

A default `zig build` will "install" to `zig-cache`, so for typical
development purposes you would run `./zig-cache/bin/zootdeck`.

The formatting changes are due to having `zig fmt` enabled on save.

Hash maps are upgraded to `std.StringHashMap` to fix compilation errors.

Tested with zig 53ae03ebe9e0aa56bca1c9219a47d124b0435258.
@donpdonp donpdonp merged commit 22103ea into donpdonp:master Sep 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants