1
Fork 0
Commit Graph

379 Commits

Author SHA1 Message Date
Motiejus Jakštys 771fcc5bc6 bump to go 1.19
Removing --no-gc-sections, because that's now in Go. Whoo!
2022-08-12 05:21:24 +03:00
Motiejus Jakštys 5240246cab ci/test: simplify the script even more 2022-07-28 14:13:53 -07:00
Motiejus Jakštys 09ebb03d47 ci/lint: more verbose output 2022-07-28 14:10:11 -07:00
Luis Holanda 8b5c41e409 misc: use /usr/bin/env in scripts
This patch continues the work to support NixOS and others non-FHS
distributions by replacing instances of `/bin/bash` with
`/usr/bin/env bash`, which works correctly in more systems than the
former.

Signed-off-by: Luis Holanda <luiscmholanda@gmail.com>
2022-07-28 12:44:57 -07:00
Luis Holanda c4125cf13b Support NixOS and others non-FHS Linux distros
As it expects Bash to be at `/bin/bash`, the current implementation
fails to execute on NixOS, given that there bash is in a non-standard
path (i.g. `/nix/store/<hash>-bash-interactive-<version>/bin/bash`).

This patch specifically changes `/bin/bash` paths to use `/usr/bin/env bash`,
which should give the correct path in every Unix system.

Signed-off-by: Luis Holanda <luiscmholanda@gmail.com>
2022-07-28 12:44:57 -07:00
Motiejus Jakštys c122a0d1c7 WORKSPACE: bump rules_go to v0.34.0 2022-07-20 08:50:29 +03:00
Motiejus Jakštys 911ac3ef6f contrib/makerel: use x86_64_v3 and chmod +x 2022-07-18 15:42:09 +03:00
Motiejus Jakštys 64a7007a23 fastbuild: remove -O0
this is the default in zig cc now
2022-07-12 14:53:02 +03:00
Motiejus Jakštys bfa994e2ee upgrade bazelisk and buildifier 2022-07-12 14:29:54 +03:00
Motiejus Jakštys 0048fa3679 bump .bazelversion to 5.2.0 2022-07-12 14:25:23 +03:00
Motiejus Jakštys 107727b0c8 upgrade rules_go to v0.33 2022-07-12 14:24:03 +03:00
Motiejus Jakštys 2423759d7d readme: update clang and glibc versions 2022-07-12 14:23:12 +03:00
Motiejus Jakštys df11a2af38 bump zig to 0.10.0-dev.2977+7d2e14267"
changes:
- upgrade from llvm 13 to llvm 14
- add --compress-debug-sections=zlib
2022-07-12 14:09:11 +03:00
Motiejus Jakštys 0818e20167 bump zig upstream 2022-07-04 15:39:41 +03:00
Motiejus Jakštys c6e7927bc7 Update release notes for v0.8.2 2022-07-04 15:32:54 +03:00
Motiejus Jakštys de0350405d lint 2022-07-04 15:32:36 +03:00
Motiejus Jakštys d3cd4d81f1 Update release notes for v0.8.1 2022-07-04 15:31:17 +03:00
Motiejus Jakštys 527ebbc863 fastbuild: replace -gmlt with -O0
- -gmlt is a noop in zig, because -g is a default anyway.
- -O0 was fixed in ziglang/zig 02ba3cb25cc8ee2637c6fb7bcb935722490ba05c
2022-07-01 13:54:03 +03:00
Motiejus Jakštys 956711690f [contrib/] zig sdk test instructions 2022-06-28 13:59:51 +03:00
Motiejus Jakštys db2f187aa9 ci/test: switch to proper fastbuild
turns out this was overwritten in .bazelrc from a long time ago.
2022-06-28 13:34:02 +03:00
Motiejus Jakštys fe1949388f [ci/test] set -c fastbuild
Seems like it's not the default, unlike the docs say. Will investigate
on why is that later.
2022-06-28 12:48:31 +03:00
Motiejus Jakštys b7da83e13e upgrade zig sdk
Also fix darwin zigtarget to none; see 5b813f1a2acdc1668e39008b02a234f3da724552 of zig
2022-06-28 12:47:23 +03:00
Motiejus Jakštys 4cfc30dd1c [fastbuild] use -fno-lto
This is very cache-unfriendly, because quite a lot of work is done
during the final linking stage. Let's see how this improves performance
of fastbuild.
2022-06-21 08:45:03 +03:00
laurynasl b73d167c6c Support bazel compilation_mode
Bazel has a special command line option (--compilation_mode) for specifying how
c artifacts should be compiled. Copy over the implementation without too much
thought on whether they make sense.

See https://docs.bazel.build/versions/main/user-manual.html#flag--compilation_mode.

!!! Due to a regression in zig-cc, debug symbols are available under --compilation_mode opt

```
laurynasl@laurynasl ~/bazel-zig-cc
 % bazel build -c opt //test/c:which_libc 2>/dev/null && bazel-bin/test/c/which_libc && gdb -batch --ex 'info line main' bazel-bin/test/c/which_libc
glibc_2.19
Line 4 of "test/c/main.c" starts at address 0x2014f0 <main> and ends at 0x2014f1 <main+1>.
laurynasl@laurynasl ~/bazel-zig-cc
 % bazel build -c dbg //test/c:which_libc 2>/dev/null && bazel-bin/test/c/which_libc && gdb -batch --ex 'info line main' bazel-bin/test/c/which_libc
glibc_2.19
Line 4 of "test/c/main.c" starts at address 0x201500 <main> and ends at 0x201504 <main+4>.
laurynasl@laurynasl ~/bazel-zig-cc
 % bazel build -c fastbuild //test/c:which_libc 2>/dev/null && bazel-bin/test/c/which_libc && gdb -batch --ex 'info line main' bazel-bin/test/c/which_libc
glibc_2.19
Function "main" not defined.
```
2022-06-17 14:46:13 +00:00
Motiejus Jakštys ef5d2b5069 README: maintainers section 2022-06-09 08:49:19 +03:00
Motiejus Jakštys 3823cbdbf8 README: remove mention of wine-binfmt 2022-06-08 23:29:27 +03:00
Motiejus Jakštys 0f888c458d README: short and long container versions 2022-06-08 23:27:04 +03:00
Motiejus Jakštys 8ce003edec README: add qemu-user-static to the prereqs 2022-06-08 23:21:37 +03:00
Motiejus Jakštys 623430d0bb README: update gc-sections 2022-06-08 23:17:50 +03:00
Motiejus Jakštys c904fc7d7d README: spaces 2022-06-08 23:12:22 +03:00
Motiejus Jakštys 9569702e27 README: an upstream issue fixed 2022-06-08 23:12:00 +03:00
Motiejus Jakštys 4486c2feed fix README.md url 2022-06-08 23:03:33 +03:00
Motiejus Jakštys 92084a60b2 Update release notes for v0.8.0 2022-06-08 23:00:07 +03:00
Motiejus Jakštys d263686ec4 Merge branch 'motiejus_windows' 2022-06-08 22:59:06 +03:00
Motiejus Jakštys cefae49ecc WORKSPACE: upgrade to go 1.18.3 2022-06-08 11:55:07 +03:00
Motiejus Jakštys 3ac217e2cc windows tests: move tests, get rid of wine-binfmt
This removes all other Bazel test commands, so all tests can be again
tested with `bazel test ...`.

Also, fixes linux-arm64 glibc tests. Until now they've worked only in
CI. Now they work everywhere I tried.
2022-06-06 10:33:46 +03:00
Motiejus Jakštys 86ae317685 zig sdk: rename {ext} to {_ext}
Also update README and release scripts
2022-06-06 10:32:42 +03:00
Motiejus Jakštys 91ef17196b windows: add dynamic_library_linkopts
The patchset was created before
921fda9260, which added an option to
zig_cc_toolchain_config, causing a "soft merge conflict" after merging.
2022-06-06 10:30:39 +03:00
Fabian Hahn 6f2ae838cd added Windows target testing 2022-06-02 05:27:22 +03:00
Fabian Hahn 72475ee012 added support for Windows targets 2022-06-02 05:27:22 +03:00
Fabian Hahn 4a6eef7945 added Windows host support 2022-06-02 05:27:22 +03:00
Motiejus Jakštys 8b7597f4a1 Update release notes for v0.7.3 2022-06-01 11:51:40 +03:00
Jeremy Volkman a0511ca5ee Pass "-Wl,-undefined=dynamic_lookup" for dynamic libraries on darwin.
This linker flag causes undefined symbols to be ignored, which is the
default behavior on linux but not macos. This is required when building
shared libraries to use as e.g. Python modules. This also matches what
Bazel's built-in macos cc toolchain does.
2022-06-01 11:49:13 +03:00
Jeremy Volkman 921fda9260 Adds dynamic_library_linkopts to zig_cc_toolchain_config
If specified, the flags in dynamic_library_linkopts are included in
cpp_link_dynamic_library and cpp_link_nodeps_dynamic_library actions.
2022-06-01 11:49:13 +03:00
Motiejus Jakštys f6440f8cf0 README: clarify video link 2022-05-25 15:20:12 +03:00
Motiejus Jakštys 1f8b1e4dd8 README: publicity section 2022-05-25 15:18:28 +03:00
Motiejus Jakštys 583ef5e55b README: update `darwin_amd64` description 2022-05-18 10:45:22 +03:00
Motiejus Jakštys 8fec0e3441 zig sdk: download from zig upstream as well as jakstys.lt
Now that the toolchain supports multiple mirrors, we can have more
robust defaults: try ziglang.org first, then dl.jakstys.lt when that one
removes the build we rely on.

This will make builds less prone to inevitable failures of my home
server.
2022-05-18 10:42:51 +03:00
Motiejus Jakštys 7d5fb880c8 Update release notes for v0.7.2 2022-05-17 15:05:50 +03:00
Motiejus Jakštys 59057c06f3 upgrade rules_go and bazel_gazelle 2022-05-17 14:43:40 +03:00