nix: build with clang
All checks were successful
Test / Create distribution (push) Successful in 36s
Test / Sandbox (push) Successful in 41s
Test / Sandbox (race detector) (push) Successful in 41s
Test / Hakurei (push) Successful in 44s
Test / Hakurei (race detector) (push) Successful in 45s
Test / Hpkg (push) Successful in 42s
Test / Flake checks (push) Successful in 1m29s
All checks were successful
Test / Create distribution (push) Successful in 36s
Test / Sandbox (push) Successful in 41s
Test / Sandbox (race detector) (push) Successful in 41s
Test / Hakurei (push) Successful in 44s
Test / Hakurei (race detector) (push) Successful in 45s
Test / Hpkg (push) Successful in 42s
Test / Flake checks (push) Successful in 1m29s
Clang is better than gcc in various ways. This also pulls in clang-format which is very helpful. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
13
package.nix
13
package.nix
@@ -20,7 +20,7 @@
|
||||
|
||||
# for passthru.buildInputs
|
||||
go,
|
||||
gcc,
|
||||
clang,
|
||||
|
||||
# for check
|
||||
util-linux,
|
||||
@@ -81,8 +81,13 @@ buildGoModule rec {
|
||||
hsuPath = "/run/wrappers/bin/hsu";
|
||||
};
|
||||
|
||||
# nix build environment does not allow acls
|
||||
env.GO_TEST_SKIP_ACL = 1;
|
||||
env = {
|
||||
# use clang instead of gcc
|
||||
CC = "clang -O3 -Werror";
|
||||
|
||||
# nix build environment does not allow acls
|
||||
GO_TEST_SKIP_ACL = 1;
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
libffi
|
||||
@@ -135,7 +140,7 @@ buildGoModule rec {
|
||||
|
||||
passthru.targetPkgs = [
|
||||
go
|
||||
gcc
|
||||
clang
|
||||
xorg.xorgproto
|
||||
util-linux
|
||||
|
||||
|
||||
Reference in New Issue
Block a user