mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-18 01:36:08 +03:00
update to stage3 zig with -fstage1
This commit is contained in:
6
.github/workflows/test.yml
vendored
6
.github/workflows/test.yml
vendored
@ -38,7 +38,7 @@ jobs:
|
|||||||
# Cross-compile the binary. We always use static building for this
|
# Cross-compile the binary. We always use static building for this
|
||||||
# because its the only way to access the headers.
|
# because its the only way to access the headers.
|
||||||
- name: Test Build
|
- name: Test Build
|
||||||
run: nix develop -c zig build -Dstatic=true -Dtarget=${{ matrix.target }}
|
run: nix develop -c zig build -fstage1 -Dstatic=true -Dtarget=${{ matrix.target }}
|
||||||
|
|
||||||
test:
|
test:
|
||||||
strategy:
|
strategy:
|
||||||
@ -58,8 +58,8 @@ jobs:
|
|||||||
nix_path: nixpkgs=channel:nixos-unstable
|
nix_path: nixpkgs=channel:nixos-unstable
|
||||||
|
|
||||||
- name: test
|
- name: test
|
||||||
run: nix develop -c zig build test
|
run: nix develop -c zig build test -fstage1
|
||||||
|
|
||||||
- name: Test Dynamic Build
|
- name: Test Dynamic Build
|
||||||
run: nix develop -c zig build -Dstatic=false
|
run: nix develop -c zig build -fstage1 -Dstatic=false
|
||||||
|
|
||||||
|
2
Makefile
2
Makefile
@ -5,7 +5,7 @@ init:
|
|||||||
|
|
||||||
# Slightly cursed way that we setup a dev version of this locally on NixOS.
|
# Slightly cursed way that we setup a dev version of this locally on NixOS.
|
||||||
dev/install:
|
dev/install:
|
||||||
zig build -Dcpu=baseline -Drelease-fast
|
zig build -fstage1 -Dcpu=baseline -Drelease-fast
|
||||||
if [ -f "/etc/NIXOS" ]; then patchelf --set-rpath "${LD_LIBRARY_PATH}" zig-out/bin/ghostty; fi
|
if [ -f "/etc/NIXOS" ]; then patchelf --set-rpath "${LD_LIBRARY_PATH}" zig-out/bin/ghostty; fi
|
||||||
mkdir -p ${HOME}/bin
|
mkdir -p ${HOME}/bin
|
||||||
cp zig-out/bin/ghostty ${HOME}/bin/devtty
|
cp zig-out/bin/ghostty ${HOME}/bin/devtty
|
||||||
|
@ -75,12 +75,16 @@ on the [Zig downloads page](https://ziglang.org/download/).
|
|||||||
With Zig installed, a binary can be built using `zig build`:
|
With Zig installed, a binary can be built using `zig build`:
|
||||||
|
|
||||||
```shell-session
|
```shell-session
|
||||||
$ zig build
|
$ zig build -fstage1
|
||||||
...
|
...
|
||||||
|
|
||||||
$ zig-out/bin/ghostty
|
$ zig-out/bin/ghostty
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**Important: you must specify the `-fstage1` flag.** Ghostty can't yet be
|
||||||
|
built with the self-hosted Zig backend, so we have to use "stage1" (the
|
||||||
|
C++ LLVM backend).
|
||||||
|
|
||||||
This will build a binary for the currently running system (if supported).
|
This will build a binary for the currently running system (if supported).
|
||||||
You can cross compile by setting `-Dtarget=<target-triple>`. For example,
|
You can cross compile by setting `-Dtarget=<target-triple>`. For example,
|
||||||
`zig build -Dtarget=aarch64-macos` will build for Apple Silicon macOS. Note
|
`zig build -Dtarget=aarch64-macos` will build for Apple Silicon macOS. Note
|
||||||
|
6
flake.lock
generated
6
flake.lock
generated
@ -109,11 +109,11 @@
|
|||||||
"nixpkgs": "nixpkgs_2"
|
"nixpkgs": "nixpkgs_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1662000959,
|
"lastModified": 1662668669,
|
||||||
"narHash": "sha256-2wW8/BWusCtDYiHkF4/o4Se16qc/EbtMsZuQspTW4lY=",
|
"narHash": "sha256-91R5xjCt1cLJBbYygtiQwXCex596/2cxsTneKUdnVwc=",
|
||||||
"owner": "mitchellh",
|
"owner": "mitchellh",
|
||||||
"repo": "zig-overlay",
|
"repo": "zig-overlay",
|
||||||
"rev": "9c8e4148bdc806397900cb95c7d2b3f844ac7aff",
|
"rev": "6ed17531becf61347f4f30b62ad22d21e14fc4da",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -13,8 +13,8 @@ final: prev: rec {
|
|||||||
wraptest = prev.callPackage ./wraptest.nix { };
|
wraptest = prev.callPackage ./wraptest.nix { };
|
||||||
|
|
||||||
# zig we want to be the latest nightly since 0.9.0 is not released yet.
|
# zig we want to be the latest nightly since 0.9.0 is not released yet.
|
||||||
# NOTE: we are pinned to this master version because it broke at a certain
|
zig = final.zigpkgs.master;
|
||||||
# point due to the self-hosted compiler. We'll fix this ASAP.
|
|
||||||
#zig = final.zigpkgs.master;
|
# last known working stage1 build, the rest in the future are stage3
|
||||||
zig = final.zigpkgs.master-2022-08-19;
|
#zig = final.zigpkgs.master-2022-08-19;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user