{"id":13606614,"url":"https://github.com/ziglang/zig-bootstrap","last_synced_at":"2025-05-15T13:08:17.039Z","repository":{"id":42655787,"uuid":"250696858","full_name":"ziglang/zig-bootstrap","owner":"ziglang","description":"take off every zig","archived":false,"fork":false,"pushed_at":"2025-05-09T07:30:05.000Z","size":339035,"stargazers_count":458,"open_issues_count":12,"forks_count":97,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-05-09T08:34:55.318Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ziglang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["ziglang"]}},"created_at":"2020-03-28T02:27:10.000Z","updated_at":"2025-05-09T07:30:08.000Z","dependencies_parsed_at":"2025-05-09T08:38:26.372Z","dependency_job_id":null,"html_url":"https://github.com/ziglang/zig-bootstrap","commit_stats":{"total_commits":511,"total_committers":28,"mean_commits":18.25,"dds":"0.15851272015655582","last_synced_commit":"1ad232c5a2e1ebbdad2cfbb86ad8fe7f73c7e4d4"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ziglang%2Fzig-bootstrap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ziglang%2Fzig-bootstrap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ziglang%2Fzig-bootstrap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ziglang%2Fzig-bootstrap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ziglang","download_url":"https://codeload.github.com/ziglang/zig-bootstrap/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254346624,"owners_count":22055808,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T19:01:10.671Z","updated_at":"2025-05-15T13:08:12.031Z","avatar_url":"https://github.com/ziglang.png","language":"C","readme":"# bootstrap-zig\n\nThe purpose of this project is to start with minimum system dependencies and\nend with a fully operational Zig compiler for any target.\n\n## Version Information\n\nThis repository copies sources from upstream. Patches listed below. Use git\nto find and inspect the patch diffs.\n\n * LLVM, LLD, Clang 19.1.7\n * zlib 1.3.1\n * zstd 1.5.2\n * zig 0.14.0-dev.3299+31f353cd9\n\nFor other versions, check the git tags of this repository.\n\n### Patches\n\n * all: Deleted unused files.\n * LLVM: Support .lib extension for static zstd.\n * LLVM: Portable handling of .def linker flag\n * Clang: Disable building of libclang-cpp.so.\n * LLD: Added additional include directory to Zig's libunwind.\n * LLD: Respect `LLD_BUILD_TOOLS=OFF`\n * zlib: Delete the ability to build a shared library.\n * [LLVM: Fix crash when FREEZE a half(f16) type on loongarch](https://github.com/llvm/llvm-project/pull/107791)\n\n## Host System Dependencies\n\n * C++ compiler capable of building LLVM, Clang, and LLD from source (GCC 5.1+\n   or Clang)\n * CMake 3.19 or later\n * make, ninja, or any other build system supported by CMake\n * POSIX system (bash, mkdir, cd)\n * Python 3\n\n## Build Instructions\n\n```\n./build \u003carch\u003e-\u003cos\u003e-\u003cabi\u003e \u003cmcpu\u003e\n```\n\nAll parameters are required:\n\n * `\u003carch\u003e-\u003cos\u003e-\u003cabi\u003e`: Replace with one of the Supported Triples below, or use\n   `native` for the `\u003carch\u003e` value (e.g. `native-linux-gnu`) to use the native\n   architecture.\n * `\u003cmcpu\u003e`: Replace with a `-mcpu` parameter of Zig. `baseline` is recommended\n   and means it will target a generic CPU for the target. `native` means it\n   will target the native CPU. See the Zig documentation for more details.\n\nPlease be aware of the following two CMake environment variables that can\nsignificantly affect how long it takes to build:\n\n * `CMAKE_GENERATOR` can be used to select a different generator instead of the\n   default. For example, `CMAKE_GENERATOR=Ninja`.\n * `CMAKE_BUILD_PARALLEL_LEVEL` can be used to introduce parallelism to build\n   systems (such as make) which do not default to parallel builds. This option\n   is irrelevant when using Ninja.\n\nWhen it succeeds, output can be found in `out/zig-\u003ctriple\u003e-\u003ccpu\u003e/`.\n\n## Windows Build Instructions\n\nBootstrapping on Windows with MSVC is also possible via `build.bat`, which\ntakes the same arguments as `build` above.\n\nThis script requires that the \"C++ CMake tools for Windows\" component be\ninstalled via the Visual Studio installer.\n\nThe script must be run within the `Developer Command Prompt for VS 2019` shell:\n\n```\nbuild.bat \u003carch\u003e-\u003cos\u003e-\u003cabi\u003e \u003cmcpu\u003e\n```\n\nTo build for x86 Windows, run the script within the `x86 Native Tools Command Prompt for VS 2019`.\n\n### Supported Triples\n\nIf you try a \"not tested\" one and find a problem please file an issue,\nand a pull request linking to the issue in the table.\n\nIf you try a \"not tested\" one and find that it works, please file a pull request\nchanging the status to \"OK\".\n\nIf you try an \"OK\" one and it does not work, please check if there is an existing\nissue, and if not, file an issue.\n\nNote: Generally, for Linux targets, we prefer the musl libc builds over the\nglibc builds here, because musl builds end up producing a static binary, which\nis more portable across Linux distributions.\n\n| triple                      | support status |\n|-----------------------------|----------------|\n| `aarch64-linux-gnu`         | OK             |\n| `aarch64-linux-musl`        | OK             |\n| `aarch64-macos-none`        | OK             |\n| `aarch64-windows-gnu`       | OK             |\n| `aarch64_be-linux-gnu`      | OK             |\n| `aarch64_be-linux-musl`     | OK             |\n| `arm-linux-gnueabi`         | OK             |\n| `arm-linux-gnueabihf`       | OK             |\n| `arm-linux-musleabi`        | OK             |\n| `arm-linux-musleabihf`      | OK             |\n| `armeb-linux-gnueabi`       | OK             |\n| `armeb-linux-gnueabihf`     | OK             |\n| `armeb-linux-musleabi`      | OK             |\n| `armeb-linux-musleabihf`    | OK             |\n| `loongarch64-linux-gnu`     | OK             |\n| `loongarch64-linux-gnusf`   | OK             |\n| `loongarch64-linux-musl`    | OK             |\n| `mips-linux-gnueabi`        | OK             |\n| `mips-linux-gnueabihf`      | OK             |\n| `mips-linux-musleabi`       | OK             |\n| `mips-linux-musleabihf`     | OK             |\n| `mips64-linux-gnuabi64`     | OK             |\n| `mips64-linux-gnuabin32`    | OK             |\n| `mips64-linux-muslabi64`    | OK             |\n| `mips64-linux-muslabin32`   | OK             |\n| `mips64el-linux-gnuabi64`   | OK             |\n| `mips64el-linux-gnuabin32`  | OK             |\n| `mips64el-linux-muslabi64`  | OK             |\n| `mips64el-linux-muslabin32` | OK             |\n| `mipsel-linux-gnueabi`      | OK             |\n| `mipsel-linux-gnueabihf`    | OK             |\n| `mipsel-linux-musleabi`     | OK             |\n| `mipsel-linux-musleabihf`   | OK             |\n| `powerpc-linux-gnueabi`     | OK             |\n| `powerpc-linux-gnueabihf`   | OK             |\n| `powerpc-linux-musleabi`    | OK             |\n| `powerpc-linux-musleabihf`  | OK             |\n| `powerpc64-linux-gnu`       | [#113](https://github.com/ziglang/zig-bootstrap/issues/113) |\n| `powerpc64-linux-musl`      | OK             |\n| `powerpc64le-linux-gnu`     | OK             |\n| `powerpc64le-linux-musl`    | OK             |\n| `riscv32-linux-gnu`         | OK             |\n| `riscv32-linux-musl`        | OK             |\n| `riscv64-linux-gnu`         | OK             |\n| `riscv64-linux-musl`        | OK             |\n| `s390x-linux-gnu`           | OK             |\n| `s390x-linux-musl`          | OK             |\n| `sparc-linux-gnu`           | [#117](https://github.com/ziglang/zig-bootstrap/issues/117) |\n| `sparc64-linux-gnu`         | [#172](https://github.com/ziglang/zig-bootstrap/issues/172) |\n| `thumb-linux-musleabi`      | OK             |\n| `thumb-linux-musleabihf`    | OK             |\n| `thumb-windows-gnu`         | OK             |\n| `thumbeb-linux-musleabi`    | OK             |\n| `thumbeb-linux-musleabihf`  | OK             |\n| `x86-linux-gnu`             | OK             |\n| `x86-linux-musl`            | OK             |\n| `x86-windows-gnu`           | OK             |\n| `x86_64-freebsd-none`       | [#45](https://github.com/ziglang/bootstrap/issues/45) |\n| `x86_64-linux-gnu`          | OK             |\n| `x86_64-linux-gnux32`       | OK             |\n| `x86_64-linux-musl`         | OK             |\n| `x86_64-linux-muslx32`      | OK             |\n| `x86_64-macos-none`         | OK             |\n| `x86_64-netbsd-none`        | [#71](https://github.com/ziglang/zig-bootstrap/issues/71) |\n| `x86_64-windows-gnu`        | OK             |\n\n#### Other Notable Targets Known to Work\n\n * `arm-linux-musleabi` with mcpu value of `generic+v6kz`. This produces a\n   build of Zig that runs on the RPi 1 and RPi Zero.\n   - If you want to produce a build for this CPU exactly, use `arm1176jzf_s`.\n","funding_links":["https://github.com/sponsors/ziglang"],"categories":["C","Batchfile"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fziglang%2Fzig-bootstrap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fziglang%2Fzig-bootstrap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fziglang%2Fzig-bootstrap/lists"}