Skip to content

Releases: uber/hermetic_cc_toolchain

v2.2.0

11 Jan 08:22

Choose a tag to compare

What's New

  • zig sdk: bump to 0.12.0-dev.2127+fcc0c5ddc in #140 and #141

Zig upgrade brings in the following changes:

  • bump glibc support from 2.34 to 2.38
  • fix integration with some glibc symbols: ziglang/zig#17702
  • mitigat error: AccessDenied, which, according to Noah Santschi-Cooney, also mitigates/fixes the dreaded error: FileNotFound which we sometimes see when setting up Bazel worksace. Relevant commit in Zig: ziglang/zig@6b27096
  • linker: support --(no-)undefined-version: ziglang/zig#18486. This will unbreak some Rust users.
  • LLVM16 -> LLVM17, which now defaults to -Wl,--undefined-version, which can result in failure to link some C code (but easy to mitigate). Example in zlib and the specific workaround.

Full Changelog: v2.1.3...v2.2.0

WORKSPACE boilerplate

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

HERMETIC_CC_TOOLCHAIN_VERSION = "v2.2.0"

http_archive(
    name = "hermetic_cc_toolchain",
    sha256 = "5c97ec998e982742ff32902517acad29a856006a6476ae28e62575fabba2a23c",
    urls = [
        "https://mirror.bazel.build/github.com/uber/hermetic_cc_toolchain/releases/download/{0}/hermetic_cc_toolchain-{0}.tar.gz".format(HERMETIC_CC_TOOLCHAIN_VERSION),
        "https://github.com/uber/hermetic_cc_toolchain/releases/download/{0}/hermetic_cc_toolchain-{0}.tar.gz".format(HERMETIC_CC_TOOLCHAIN_VERSION),
    ],
)

load("@hermetic_cc_toolchain//toolchain:defs.bzl", zig_toolchains = "toolchains")

# Plain zig_toolchains() will pick reasonable defaults. See
# toolchain/defs.bzl:toolchains on how to change the Zig SDK version and
# download URL.
zig_toolchains()

v2.1.3

09 Nov 13:38

Choose a tag to compare

Highlights

Upgrading is highly recommended for MacOS, as #125 solves many issues due to lack of hermeticity when compiling the zig launcher.

What's Changed

  • Strip the zig-builder binary for reproducibility by @dzbarsky in #124
  • zig-wrapper: compile with explicit -target by @motiejus-wix in #125

New Contributors

  • @dzbarsky made their first contribution in #124
  • @motiejus-wix made their first contribution in #125

Full Changelog: v2.1.2...v2.1.3

WORKSPACE snippet

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

HERMETIC_CC_TOOLCHAIN_VERSION = "v2.1.3"

http_archive(
    name = "hermetic_cc_toolchain",
    sha256 = "a5caccbf6d86d4f60afd45b541a05ca4cc3f5f523aec7d3f7711e584600fb075",
    urls = [
        "https://mirror.bazel.build/github.com/uber/hermetic_cc_toolchain/releases/download/{0}/hermetic_cc_toolchain-{0}.tar.gz".format(HERMETIC_CC_TOOLCHAIN_VERSION),
        "https://github.com/uber/hermetic_cc_toolchain/releases/download/{0}/hermetic_cc_toolchain-{0}.tar.gz".format(HERMETIC_CC_TOOLCHAIN_VERSION),
    ],
)

load("@hermetic_cc_toolchain//toolchain:defs.bzl", zig_toolchains = "toolchains")

# Plain zig_toolchains() will pick reasonable defaults. See
# toolchain/defs.bzl:toolchains on how to change the Zig SDK version and
# download URL.
zig_toolchains()

v2.1.2

25 Sep 04:17

Choose a tag to compare

This is the first version hermetic_cc_toolchain is published to Bazel Central Repository

What's Changed

Full Changelog: v2.1.1...v2.1.2

WORKSPACE snippet

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

HERMETIC_CC_TOOLCHAIN_VERSION = "v2.1.2"

http_archive(
    name = "hermetic_cc_toolchain",
    sha256 = "28fc71b9b3191c312ee83faa1dc65b38eb70c3a57740368f7e7c7a49bedf3106",
    urls = [
        "https://mirror.bazel.build/github.com/uber/hermetic_cc_toolchain/releases/download/{0}/hermetic_cc_toolchain-{0}.tar.gz".format(HERMETIC_CC_TOOLCHAIN_VERSION),
        "https://github.com/uber/hermetic_cc_toolchain/releases/download/{0}/hermetic_cc_toolchain-{0}.tar.gz".format(HERMETIC_CC_TOOLCHAIN_VERSION),
    ],
)

load("@hermetic_cc_toolchain//toolchain:defs.bzl", zig_toolchains = "toolchains")

# Plain zig_toolchains() will pick reasonable defaults. See
# toolchain/defs.bzl:toolchains on how to change the Zig SDK version and
# download URL.
zig_toolchains()

MODULE.bazel snippet

bazel_dep(name = "hermetic_cc_toolchain", version = "2.1.2")

zig_toolchains = use_extension("@hermetic_cc_toolchain//toolchain:ext.bzl", "toolchains")
use_repo(zig_toolchains, "zig_sdk")

v2.1.1

05 Sep 00:00

Choose a tag to compare

v2.1.1 Pre-release
Pre-release

This is a patch release to fix CI builds in Bazel Central Registry

What's Changed

  • Include bzlmod example in release archive by @linzhp in #114

Full Changelog: v2.1.0...v2.1.1

WORKSPACE snippet

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

HERMETIC_CC_TOOLCHAIN_VERSION = "v2.1.1"

http_archive(
    name = "hermetic_cc_toolchain",
    sha256 = "86ace5cd211d0ae49a729a11afb344843698b64464f2095a776c57ebbdf06698",
    urls = [
        "https://mirror.bazel.build/github.com/uber/hermetic_cc_toolchain/releases/download/{0}/hermetic_cc_toolchain-{0}.tar.gz".format(HERMETIC_CC_TOOLCHAIN_VERSION),
        "https://github.com/uber/hermetic_cc_toolchain/releases/download/{0}/hermetic_cc_toolchain-{0}.tar.gz".format(HERMETIC_CC_TOOLCHAIN_VERSION),
    ],
)

load("@hermetic_cc_toolchain//toolchain:defs.bzl", zig_toolchains = "toolchains")

# Plain zig_toolchains() will pick reasonable defaults. See
# toolchain/defs.bzl:toolchains on how to change the Zig SDK version and
# download URL.
zig_toolchains()

v2.1.0

02 Sep 23:55

Choose a tag to compare

v2.1.0 Pre-release
Pre-release

This is the first version where hermetic_cc_toolchain becomes a Bazel module.

What's Changed

New Contributors

Full Changelog: v2.0.0...v2.1.0

WORKSPACE snippet

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

HERMETIC_CC_TOOLCHAIN_VERSION = "v2.1.0"

http_archive(
    name = "hermetic_cc_toolchain",
    sha256 = "892b0dd7aa88c3504a8821e65c44fd22f32c16afab12d89e9942fff492720b37",
    urls = [
        "https://mirror.bazel.build/github.com/uber/hermetic_cc_toolchain/releases/download/{0}/hermetic_cc_toolchain-{0}.tar.gz".format(HERMETIC_CC_TOOLCHAIN_VERSION),
        "https://github.com/uber/hermetic_cc_toolchain/releases/download/{0}/hermetic_cc_toolchain-{0}.tar.gz".format(HERMETIC_CC_TOOLCHAIN_VERSION),
    ],
)

load("@hermetic_cc_toolchain//toolchain:defs.bzl", zig_toolchains = "toolchains")

# Plain zig_toolchains() will pick reasonable defaults. See
# toolchain/defs.bzl:toolchains on how to change the Zig SDK version and
# download URL.
zig_toolchains()

v2.0.0

30 May 11:21

Choose a tag to compare

Top level

See https://github.com/uber/hermetic_cc_toolchain/releases/tag/v2.0.0-rc1 for changes since v1.0.1. If you are migrating from v1.0.1, this is worth a read.

Changelog since v2.0.0-rc1, which will be not repeated here: https://github.com/uber/hermetic_cc_toolchain/releases/tag/v2.0.0-rc2

Since v2.0.0-rc2:

  • New command: @zig_sdk//:tools/zig-wrapper. It is a "zig" wrapper that sets cache and lib directories, which users are encouraged to use instead of @zig_sdk//:zig, which is the plain Zig binary.
  • --strip is now respected.
  • Windows improvements:
    • bazel build ... now works on Windows for this repository.
    • add Windows-specific aliases to commands in @zig_sdk//:tools/*

Workspace snippet

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

HERMETIC_CC_TOOLCHAIN_VERSION = "v2.0.0"

http_archive(
    name = "hermetic_cc_toolchain",
    sha256 = "57f03a6c29793e8add7bd64186fc8066d23b5ffd06fe9cc6b0b8c499914d3a65",
    urls = [
        "https://mirror.bazel.build/github.com/uber/hermetic_cc_toolchain/releases/download/{0}/hermetic_cc_toolchain-{0}.tar.gz".format(HERMETIC_CC_TOOLCHAIN_VERSION),
        "https://github.com/uber/hermetic_cc_toolchain/releases/download/{0}/hermetic_cc_toolchain-{0}.tar.gz".format(HERMETIC_CC_TOOLCHAIN_VERSION),
    ],
)

load("@hermetic_cc_toolchain//toolchain:defs.bzl", zig_toolchains = "toolchains")

# Plain zig_toolchains() will pick reasonable defaults. See
# toolchain/defs.bzl:toolchains on how to change the Zig SDK version and
# download URL.
zig_toolchains()
------------------------------------------------------------------------

What's Changed from v2.0.0-rc2

Full Changelog: v2.0.0-rc2...v2.0.0

v2.0.0-rc2

11 May 10:48

Choose a tag to compare

WORKSPACE snippet

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

HERMETIC_CC_TOOLCHAIN_VERSION = "v2.0.0-rc2"

http_archive(
    name = "hermetic_cc_toolchain",
    sha256 = "40dff82816735e631e8bd51ede3af1c4ed1ad4646928ffb6a0e53e228e55738c",
    urls = [
        "https://mirror.bazel.build/github.com/uber/hermetic_cc_toolchain/releases/download/{0}/hermetic_cc_toolchain-{0}.tar.gz".format(HERMETIC_CC_TOOLCHAIN_VERSION),
        "https://github.com/uber/hermetic_cc_toolchain/releases/download/{0}/hermetic_cc_toolchain-{0}.tar.gz".format(HERMETIC_CC_TOOLCHAIN_VERSION),
    ],
)

load("@hermetic_cc_toolchain//toolchain:defs.bzl", zig_toolchains = "toolchains")

# Plain zig_toolchains() will pick reasonable defaults. See
# toolchain/defs.bzl:toolchains on how to change the Zig SDK version and
# download URL.
zig_toolchains()

What's Changed

New Contributors

Full Changelog: v2.0.0-rc1...v2.0.0-rc2

v2.0.0-rc1

24 Apr 13:47

Choose a tag to compare

Top level

This is the first Release Candidate for hermetic_cc_toolchain v2. Highlights:

  1. Name change. It is now hermetic_cc_toolchain almost everywhere.
  2. The release process has changed; the http_archive flag will need to be adjusted. The released archive now skips internal tests, internal rules, and only contains what is necessary to use it by third-party projects.
  3. Remove fcntl64 and res_* hacks, as they have been fixed upstream.
  4. Add a workaround to a zig build-exe race in zig.
  5. Remove top-level folder rules/.
  6. Repository variable for Zig cache directory changed from BAZEL_ZIG_CC_CACHE_PREFIX to HERMETIC_CC_TOOLCHAIN_CACHE_PREFIX.
  7. Bump to Zig 0.11.0-dev.2619+bd3e248c7, see unofficial release note summary. Among other things, it bumps LLVM from 15.0.7 to 16.0.1.
  8. License change: roll back to MIT.

WORKSPACE snippet

HERMETIC_CC_TOOLCHAIN_VERSION = "v2.0.0-rc1"

http_archive(
    name = "hermetic_cc_toolchain",
    sha256 = "43a1b398f08109c4f03b9ba2b3914bd43d1fec0425f71b71f802bf3f78cee0c2",
    urls = [
        "https://mirror.bazel.build/github.com/uber/hermetic_cc_toolchain/releases/download/{0}/hermetic_cc_toolchain-{0}.tar.gz".format(HERMETIC_CC_TOOLCHAIN_VERSION),
        "https://github.com/uber/hermetic_cc_toolchain/releases/download/{0}/hermetic_cc_toolchain-{0}.tar.gz".format(HERMETIC_CC_TOOLCHAIN_VERSION),
    ],
)

load("@hermetic_cc_toolchain//toolchain:defs.bzl", zig_toolchains = "toolchains")

zig_toolchains()

Detailed Changes

New Contributors

Full Changelog: v1.0.1...v2.0.0-rc1

v1.0.1

23 Mar 20:48

Choose a tag to compare

bazel-zig-cc v1.0.1

Changelog since v1.0.0:
- [Motiejus Jakštys] release: sort the RC versions correctly
- [Motiejus Jakštys] Re-license portions of the code to Apache 2.0
- [Motiejus Jakštys] zig sdk: use mirror.bazel.build
- [Motiejus Jakštys] ci/test: show how bad the artifact situation is
- [Motiejus Jakštys] launcher: remove --color=on
- [Motiejus Jakštys] ci/launcher: check fmt
- [Motiejus Jakštys] upgrade zig
- [Motiejus Jakštys] Merge branch 'motiejus_go1.20'
- [Motiejus Jakštys] launcher: support multi-for loop syntax
- [Motiejus Jakštys] wip go 1.20
- [Motiejus Jakštys] ci/launcher: colors
- [Motiejus Jakštys] ci/launcher: make it go faster
- [Motiejus Jakštys] CI: fix tests
- [Motiejus Jakštys] update README
- [Motiejus Jakštys] launcher: formatting