1
Fork 0
Commit Graph

21 Commits

Author SHA1 Message Date
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 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 7b0de33070 work-around res_search on older glibcs
`res_search` became a proper symbol only in glibc 2.34. Until that it
was re-defined in headers, hitting the (in-)famous
https://github.com/ziglang/zig/issues/9485

glibc 2.34+:

    resolv/resolv.h:int             res_search (const char *, int, int, unsigned char *, int)

Old glibc:

    resolv/resolv.h:#define res_search              __res_search

Also, remove the toplevel includes, as they should never be included in
the first place: the headers are included explicitly when needed.
2023-01-18 15:45:47 +02:00
Motiejus Jakštys 70ef4dd54e remove zig_include_root
It is now consistent across all 5 platforms we support:

    $ for x in *324*.tar.xz; do tar -tf $x | grep libc/ | head -5; done
    zig-0.11.0-dev.324+f61c5f3f5/lib/libc/
    zig-0.11.0-dev.324+f61c5f3f5/lib/libc/mingw/
    zig-0.11.0-dev.324+f61c5f3f5/lib/libc/mingw/libsrc/
    zig-0.11.0-dev.324+f61c5f3f5/lib/libc/mingw/libsrc/ntddstor-uuid.c
    zig-0.11.0-dev.324+f61c5f3f5/lib/libc/mingw/libsrc/bth-uuid.c
    zig-linux-aarch64-0.11.0-dev.324+f61c5f3f5/lib/libc/
    zig-linux-aarch64-0.11.0-dev.324+f61c5f3f5/lib/libc/mingw/
    zig-linux-aarch64-0.11.0-dev.324+f61c5f3f5/lib/libc/mingw/libsrc/
    zig-linux-aarch64-0.11.0-dev.324+f61c5f3f5/lib/libc/mingw/libsrc/ntddstor-uuid.c
    zig-linux-aarch64-0.11.0-dev.324+f61c5f3f5/lib/libc/mingw/libsrc/bth-uuid.c
    zig-linux-x86_64-0.11.0-dev.324+f61c5f3f5/lib/libc/
    zig-linux-x86_64-0.11.0-dev.324+f61c5f3f5/lib/libc/mingw/
    zig-linux-x86_64-0.11.0-dev.324+f61c5f3f5/lib/libc/mingw/libsrc/
    zig-linux-x86_64-0.11.0-dev.324+f61c5f3f5/lib/libc/mingw/libsrc/ntddstor-uuid.c
    zig-linux-x86_64-0.11.0-dev.324+f61c5f3f5/lib/libc/mingw/libsrc/bth-uuid.c
    zig-macos-aarch64-0.11.0-dev.324+f61c5f3f5/lib/libc/
    zig-macos-aarch64-0.11.0-dev.324+f61c5f3f5/lib/libc/mingw/
    zig-macos-aarch64-0.11.0-dev.324+f61c5f3f5/lib/libc/mingw/libsrc/
    zig-macos-aarch64-0.11.0-dev.324+f61c5f3f5/lib/libc/mingw/libsrc/ntddstor-uuid.c
    zig-macos-aarch64-0.11.0-dev.324+f61c5f3f5/lib/libc/mingw/libsrc/bth-uuid.c
    zig-macos-x86_64-0.11.0-dev.324+f61c5f3f5/lib/libc/
    zig-macos-x86_64-0.11.0-dev.324+f61c5f3f5/lib/libc/mingw/
    zig-macos-x86_64-0.11.0-dev.324+f61c5f3f5/lib/libc/mingw/libsrc/
    zig-macos-x86_64-0.11.0-dev.324+f61c5f3f5/lib/libc/mingw/libsrc/ntddstor-uuid.c
    zig-macos-x86_64-0.11.0-dev.324+f61c5f3f5/lib/libc/mingw/libsrc/bth-uuid.c
    $ for x in *324*.zip; do unzip -l $x | grep libc/ | head -5; done
            0  2022-11-28 19:26   zig-windows-x86_64-0.11.0-dev.324+f61c5f3f5/lib/libc/
            0  2022-11-28 19:26   zig-windows-x86_64-0.11.0-dev.324+f61c5f3f5/lib/libc/darwin/
       301018  2022-11-28 19:26   zig-windows-x86_64-0.11.0-dev.324+f61c5f3f5/lib/libc/darwin/libSystem.11.tbd
       309693  2022-11-28 19:26   zig-windows-x86_64-0.11.0-dev.324+f61c5f3f5/lib/libc/darwin/libSystem.12.tbd
       326079  2022-11-28 19:26   zig-windows-x86_64-0.11.0-dev.324+f61c5f3f5/lib/libc/darwin/libSystem.13.tbd
2022-12-07 12:17:44 +02:00
Motiejus Jakštys 88e7e47ed2 zig_include_root: fixes
- do not pass where it's unnecessary
- remove trailing slash. That conflicts with ziglang/zig/pull/13596
2022-11-21 06:08:22 +02:00
Motiejus Jakštys 08b02cb7d2 rename absolute_path to zig_path
this is not an absolute path.
2022-09-27 15:37:28 +03:00
Ken Micklas ab59c18d60 WIP: use relative paths for tools 2022-09-27 10:14:59 +03:00
Fabian Hahn 4a6eef7945 added Windows host support 2022-06-02 05:27:22 +03:00
laurynasl 4d65b80903 Add libc constraint and libc aware toolchains
- Also get rid of @bazel_skylib dependency
2022-04-14 14:29:06 +00:00
laurynasl 723e6f051d Move toolchainss under @zig_sdk//platform: 2022-04-07 12:43:34 +03:00
Motiejus Jakštys 005f87a26d more robust toolchain selection 2021-08-05 09:47:34 +03:00
Motiejus Jakštys 13cba6c244 rework toolchain registration
- support specifying the glibc version.
- support picking the default of musl or glibc.
- create both zig and go conventions for `--extra_toolchains`.
2021-08-04 15:04:14 +03:00
Motiejus Jakštys 5bf03915be implement fcntl64 hack
glibc overrides fcntl with a macro to fcntl64; implement some trickery
to bring back fcntl on older toolchain.
2021-07-28 23:44:06 +03:00
Motiejus Jakštys 44da7f7f46 remove obsolete comments and code 2021-07-28 19:13:40 +03:00
Motiejus Jakštys 1fa90818cb quote strings properly 2021-07-12 09:45:23 +03:00
Motiejus Jakštys be168480a7 downgrade bazel to 3.7.0
that's our target for now.
2021-06-28 12:52:20 +03:00
Motiejus Jakštys ea14601308 fix workspace name #2 2021-06-11 09:03:47 +03:00
Motiejus Jakštys dbff5afa75 buildifier 2021-06-10 13:12:54 +03:00
Motiejus Jakštys 100c1e3727 remove `.2.19` from toolchain params
Only the default toolchain can be exposed.
2021-06-10 13:02:35 +03:00
Motiejus Jakštys 1df5b4004d move BUILD template to a file 2021-06-10 09:42:26 +03:00