1
Fork 0
Commit Graph

532 Commits

Author SHA1 Message Date
Motiejus Jakštys b1b66ce88c Merge tag 'v2.0.0-rc1'
This is a whoops of me forgetting to push the main branch after the
release.
2023-04-25 09:39:53 +03:00
Motiejus Jakštys 46289440a3 releaser: add MODULE.bazel
To make bzlMod work.

Test:

    $ tar -tvf hermetic_cc_toolchain-v99.0.0.tar.gz | grep MODULE.bazel
    -rw-rw-r-- root/root       561 2023-04-24 21:03 MODULE.bazel
2023-04-24 21:37:48 +03:00
Motiejus Jakštys c2701497d0 update mailing list archive
There will be no more emails coming in there.
2023-04-24 21:07:53 +03:00
Motiejus Jakštys fa951e262e
Merge pull request #33 from jvolkman/dev/linkopts
Re-add linkopts and set -Wl,-headerpad_max_install_names on macos
2023-04-24 20:41:44 +03:00
Jeremy Volkman cff2b2660b Re-add linkopts and set -Wl,-headerpad_max_install_names on macos 2023-04-24 09:48:27 -07:00
Motiejus Jakštys 9e7efd9a1b remaining linker_version_scripts cleanup
This was missed in #30
2023-04-24 16:16:00 +03:00
Motiejus Jakštys 1f50f76cc6 bump zig sdk to 0.11.0-dev.2619+bd3e248c7
From https://github.com/marler8997/zig-unofficial-releases

I also updated the "Release Process" wiki instructing how to use it.
Long live Mr. Marler!

The launcher got a facelift because of this error:

    /code/zig-linux-x86_64-0.11.0-dev.2619+bd3e248c7/lib/std/fmt.zig:2013:9: error: function called at runtime cannot return value at comptime
            return &buf;
            ^~~~~~~~~~~
    referenced by:
        test.launcher:parseArgs: toolchain/launcher.zig:334:31
        remaining reference traces hidden; use '-freference-trace' to see all reference traces

Zig gets confused by the requirement in that test in a runtime context.
2023-04-24 15:48:07 +03:00
Motiejus Jakštys 491144c721 remove rules/rules_go
1. Go needed quite a few hacks to be made work with Go. From
   https://github.com/ziglang/zig/pull/15060 less hacks are needed (but
   still not zero, though now documented).
2. This file was never meant to be exposed as part of
   `hermetic_cc_toolchain`. I probably broke someone. Sorry.
2023-04-24 14:59:15 +03:00
Motiejus Jakštys 3e07f72a8b bump zig sdk to 0.11.0-dev.2619+bd3e248c7
From https://github.com/marler8997/zig-unofficial-releases

I also updated the "Release Process" wiki instructing how to use it.
Long live Mr. Marler!

The launcher got a facelift because of this error:

    /code/zig-linux-x86_64-0.11.0-dev.2619+bd3e248c7/lib/std/fmt.zig:2013:9: error: function called at runtime cannot return value at comptime
            return &buf;
            ^~~~~~~~~~~
    referenced by:
        test.launcher:parseArgs: toolchain/launcher.zig:334:31
        remaining reference traces hidden; use '-freference-trace' to see all reference traces

Zig gets confused by the requirement in that test in a runtime context.
2023-04-24 14:46:23 +03:00
Motiejus Jakštys cb46744cb8 launcher: use `-mcpu=baseline`
This log message has been seen in a Github Actions worker:

      running <...>/c++ failed: signal: illegal instruction (core dumped)

I conclude that the launcher was compiled on a newer CPU than used on
the worker at the time.

Reported-by: mp@edgeless.systems

Fixes #22
2023-04-24 12:38:23 +03:00
Motiejus Jakštys 765fd04587 README: bring the compat name of http_archive #40
The recent repository rename broke the assumption about the repository
name.

We will soon (hopefully next week) release v2 with all the occurrences
of `bazel-zig-cc` removed, and all of this will be over. Sorry for the
confusion/mess until that happens.

Fixes #39
2023-04-24 12:12:34 +03:00
Motiejus Jakštys ef820f5e59 README.md: use the correct badge 2023-04-24 12:10:33 +03:00
Goni Zahavy f164afe89a Removed leftovers of `compiler_extra_includes` 2023-04-24 12:09:35 +03:00
Goni Zahavy 19c735c41a remove glibc hacks and update Zig SDK 2023-04-24 12:09:35 +03:00
Motiejus Jakštys 6ba4b61d05 Update MODULE.bazel
Signed-off-by: Motiejus Jakštys <motiejus@jakstys.lt>
2023-04-24 12:07:33 +03:00
zplin 3569fbd0fd dev_dependency 2023-04-24 12:07:33 +03:00
zplin fa7a3d8e9f Adding MODULE.bazel 2023-04-24 12:07:33 +03:00
Motiejus Jakštys 92067b5d85 remove @bazel_skylib dependency (again)
This was accidentally included in
d61aab183e434d48783dbaa2fdb9e39714217637
2023-04-24 12:02:35 +03:00
Motiejus Jakštys 0e12e84103 replace run_shell with run 2023-04-24 10:13:53 +03:00
Motiejus Jakštys 3630f62053 rules/ remove run_under
rules/ were never meant to be added to the release. Now that we are not
*running* multi-arch binaries, we can remove the infrastructure that was
necessary to do so.

I may get back to this -- but we need to dust quite a bit off before
that happens.
2023-04-24 10:13:53 +03:00
Motiejus Jakštys 9779650a78 Work around a known race in Zig build system
More information in the commit message and
https://github.com/ziglang/zig/issues/14815
2023-04-24 10:10:58 +03:00
Motiejus Jakštys 97a4846b58 remove `@bazel_skylib` dependency
We are using only a single trivial function `paths`, which can be
bundled. Makes things like test-zigcc[1] easier: less dependencies to
worry about.

[1]: https://git.jakstys.lt/motiejus/test-zig-cc/
2023-04-24 10:10:30 +03:00
Motiejus Jakštys 62f6b80479 README: fix the download URL
We need to preserve the old mirror URL until the new release is cut.
2023-04-21 19:40:16 +03:00
Motiejus Jakštys e0e7a4ca46
Rename bazel-zig-cc to hermetic_cc_toolchain (#36)
As it says on the tin.

Long live hermetic_cc_toolchain!
2023-04-21 10:00:03 -04:00
Motiejus Jakštys 73a9ceccfb
revert "Re-license portions of the code to Apache 2.0" (#35)
This (partially) reverts commit dfdb1f2680
2023-04-19 20:23:25 -04:00
Motiejus Jakštys 4ddd3b7a62
Make Project Origin more prominent (#34)
The link to the historic email threads seems to be a good spot for it.
2023-04-19 20:22:48 -04:00
Zhongpeng Lin 041d7f26ab
Fixing the url template in readme (#27) 2023-03-24 14:10:17 -04:00
Jonathan Baker 477f3d3690
Fixed release URL in readme (#26) 2023-03-24 09:47:42 -04:00
Motiejus Jakštys 6d2ee8cad0 replace zopfli with encoding/gzip 2023-03-14 20:25:57 +02:00
Motiejus Jakštys d3a2d43356 releaser
This is a work in progress. Next steps:

1. Add instructions to the wiki.
2. Try the new tarball on a real repository.
3. Cut the actual release.

Test output for an upcoming `v1.0.2`:

    $ bazel run //tools/releaser -- -skip_upgrades=true -tag v1.0.2
    INFO: Analyzed target //tools/releaser:releaser (1 packages loaded, 29 targets configured).
    INFO: Found 1 target...
    Target //tools/releaser:releaser up-to-date:
      bazel-bin/tools/releaser/releaser_/releaser
    INFO: Elapsed time: 1.978s, Critical Path: 1.81s
    INFO: 3 processes: 1 internal, 2 linux-sandbox.
    INFO: Build completed successfully, 3 total actions
    INFO: Running command line: bazel-bin/tools/releaser/releaser_/releaser '-skip_upgrades=true' -tag v1.0.2
    Running pre-release checks:
    - SKIPPING: go update commands
    - gazelle
    - checking if repository is clean
    Creating tag v1.0.2
    Creating archive bazel-zig-cc-v1.0.2.tar
    Compressing bazel-zig-cc-v1.0.2.tar
    Written /code/bazel-zig-cc/bazel-zig-cc-v1.0.2.tar.gz
    Release boilerplate:
    -----
    load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

    http_archive(
        name = "bazel-zig-cc",
        sha256 = "b0e857f8b32062a112305931437c5a7e1762287e27379c6d2d7173f0fa74e270",
        urls = [
            "https://mirror.bazel.build/github.com/uber/bazel-zig-cc/releases/download/v1.0.2/bazel-zig-cc-v1.0.2.tar.gz",
            "https://github.com/uber/bazel-zig-cc/releases/download/v1.0.2/bazel-zig-cc-v1.0.2.tar.gz",
        ],
    )

    load("@bazel-zig-cc//toolchain:defs.bzl", zig_toolchains = "toolchains")

    # Argument-free will pick reasonable defaults.
    zig_toolchains()

    # version, url_formats and host_platform_sha256 are can be set for those who
    # wish to control their Zig SDK version and where it is downloaded from
    zig_toolchains(
        version = "<...>",
        url_formats = [
            "https://example.org/zig/zig-{host_platform}-{version}.{_ext}",
        ],
        host_platform_sha256 = { ... },
    )
2023-03-14 20:25:57 +02:00
Motiejus Jakštys 4a42b46a99 launcher miscompilation workaround
Sometimes the launcher fails to compile with the following error
messsage:

```
error: FileNotFound
```

We cannot reproduce this in a controlled environment, but see it
happening in the wild often enough to receive repeated questions.

Since this has been escalated to Zig Software Foundation, the most
meaningful thing we can ask our users to do is apply a workaround and
wait. Let's do just that.
2023-03-14 13:52:13 +02:00
Motiejus Jakštys 5cccfb1ce1 move bin/ to tools/
The directories are not that different now. Also, clean up .bazelrc
2023-03-10 10:37:43 +02:00
Motiejus Jakštys 9b68f5ff1e
Add the mailing list archive (#8)
I will be shutting down ~motiejus/bazel-zig-cc@lists.sr.ht within days.
Now that comms are in Slack and github issues/PRs, let's add the
archive for historical reference.

It can be opened and read through like this:

  mutt -R -f mailing-list-archive.mbox
2023-03-08 09:16:22 -08:00
Motiejus Jakštys 3a204583f3
all commands: use /tmp/bazel-zig-cc (#6)
Different Bazel instances can share the zig cache all right.
2023-03-08 17:33:59 +02:00
Motiejus Jakštys f239f467a0
go mod tidy (#7) 2023-03-07 21:06:56 -08:00
Motiejus Jakštys 95ee5b0d3a
update README (#5)
- remove mentions of wine and aarch64
- contributions are now straightforward
- update maintainers (do we need this section at all?)
2023-03-07 06:15:51 +02:00
Motiejus Jakštys 3f4b4ef88e
remove contrib/ (#4)
dead code; our release and testing processes changed quite a
bit.
2023-03-06 07:37:32 -08:00
Motiejus Jakštys af9360366b
More CI (#3)
- ci only: use a separate zig cache dir for each run
- use `tools/bazel` everywhere.
- remove arm64 tests. They don't give enough value to be worth the
  brittle environment.
- remove windows execution, except for launcher. Ditto. I will probably
  bring them back.
2023-03-06 17:32:48 +02:00
Zhongpeng Lin fef28b9706 Enable Lint on CI (#2) 2023-03-06 11:46:02 +02:00
zplin a1b1be2303 Setup buildkite 2023-03-06 11:13:33 +02:00
Motiejus Jakštys e08cf8e6bf Update release notes for v1.0.1 2023-03-06 11:11:55 +02:00
Motiejus Jakštys b92dc6a533 release: sort the RC versions correctly 2023-03-06 11:11:44 +02:00
Motiejus Jakštys dfdb1f2680
Re-license portions of the code to Apache 2.0
Your old version of the software released under the old license can
still be used under the terms of the old license.

I have received the following statement from the past contributors
Luis Holanda, Jeremy Volkman and Fabian Hahn:

  I hereby confirm that I am the copyright holder or authorized by the
  copyright holder of this contribution. As such I hereby confirm that
  all contributions made to bazel-zig-cc by me or on behalf of me,
  hereby is licensed under the Apache 2.0 License
  [http://www.apache.org/licenses/LICENSE-2.0]. I am aware that my
  previous contributions will still be available under the MIT license
  as well. I confirm that I am aware of the bazel-zig-cc teams intention
  to release bazel-zig-cc under the Apache 2.0 License from release
  [1.0] and onwards, and that the bazel-zig-cc no longer will accept
  contributions made under the MIT and that any future submissions from
  myself will be considered to be licensed under Apache 2.0 unless I
  expressly state otherwise.

Copyright and re-licensing for Google and Uber employees has been
resolved internally.

Since not all contributors took action to re-license the code yet,
portions of bazel-zig-cc remain licensed as MIT.

I have started this project during my personal time with my personal
resources. I am now handing over all copyrights to this code to Uber
Technologies, Inc.
2023-03-06 11:05:13 +02:00
Motiejus Jakštys 9621da8ad6 zig sdk: use mirror.bazel.build
The current version of Zig SDK was uploaded to mirror.bazel.build via
https://github.com/bazelbuild/bazel/issues/17635 . Thanks Google!
2023-03-01 16:25:16 +02:00
Motiejus Jakštys 0d0441b9c7 ci/test: show how bad the artifact situation is 2023-02-24 12:41:32 +02:00
Motiejus Jakštys 4647e8436c launcher: remove --color=on 2023-02-24 12:01:49 +02:00
Motiejus Jakštys 28b46bfb96 ci/launcher: check fmt 2023-02-24 11:53:10 +02:00
Motiejus Jakštys 6ebe4747ae upgrade zig 2023-02-24 11:50:41 +02:00
Motiejus Jakštys 52b4f4b436 Merge branch 'motiejus_go1.20' 2023-02-24 11:43:00 +02:00
Motiejus Jakštys b4d067adbe launcher: support multi-for loop syntax
At the moment we need both old and new zig, so doing a way that's
compatible with both.
2023-02-23 09:50:53 +02:00