aboutsummaryrefslogtreecommitdiff
path: root/tools
AgeCommit message (Collapse)Author
2022-07-28std: rename std.Target.systemz to .s390xMeghan Denny
2022-07-25std.mem: add `first` method to `SplitIterator` and `SplitBackwardsIterator`r00ster
2022-07-19delete the stage1 implementation of autodocAndrew Kelley
2022-07-15std.fs: split `Dir` into `IterableDir`Veikka Tuominen
Also adds safety check for attempting to iterate directory not opened with `iterate = true`.
2022-07-11stage2: cleanups to --compress-debug-sectionsAndrew Kelley
* make the setting in the linker backend be non-optional; by this time all defaults are supposed to be resolved. * integrate with `zig cc` * change the CLI parsing to match C compiler parsing, allowing `--compress-debug-sections` alone to choose a default encoding of zlib.
2022-07-05CLI: add support for -fno-builtinAndrew Kelley
2022-07-03Merge remote-tracking branch 'origin/master' into llvm14Andrew Kelley
2022-07-03clang: parse --verbose flag as -vJakub Konka
2022-07-01update CPU features to LLVM 14Andrew Kelley
Notable changes: `_i386`, `_i486`, and `_i686` are renamed to `i386`, `i486`, and `i686` respectively. `std.zig.fmtId` is enhanced to support formatting `i386` as `@"i386"`. Some CPU features which are actually CPU models have been properly flattened, such as `apple_a12`, `apple_a13`, `apple_a7`, `cortex_a78c`, `exynos_m4`, `neoverse_e1`, `neoverse_n1`, `neoverse_n2`, `neoverse_v1`. Some CPU features have been added and some have been removed, following LLVM's lead. CSky CPU features support is added.
2022-06-29clang: add Zig equivalent for -headerpad_max_install_names cli flagJakub Konka
2022-06-28clang: update cmdline options to include weak libs and frameworksJakub Konka
Clang accepts `-weak-lx`, `-weak_library x` and `-weak_framework x`.
2022-06-06tools: fix update-linux-headers.zig and process_headers.zigBratishkaErik
Signed-off-by: BratishkaErik <bratishkaerik@getgoogleoff.me>
2022-05-16Generate linux syscalls via. the linux source treeStephen Gregoratto
Previously, updating the `SYS` enum for each architecture required manually looking at the syscall tables and inserting any new additions. This commit adds a tool, `generate_linux_syscalls.zig`, that automates this process using the syscall tables in the Linux source tree. On architectures without a table, it runs `zig cc` as a pre-processor to extract the system-call numbers from the Linux headers.
2022-05-13target: Rename sparcv9 -> sparc64Koakuma
Rename all references of sparcv9 to sparc64, to make Zig align more with other projects. Also, added new function to convert glibc arch name to Zig arch name, since it refers to the architecture as sparcv9. This is based on the suggestion by @kubkon in PR 11847. (https://github.com/ziglang/zig/pull/11487#pullrequestreview-963761757)
2022-05-04tools/gen_stubs: sort output by section/symbol nameIsaac Freund
This will make future diffs smaller and easier to review.
2022-05-04musl: update to 1.2.3Isaac Freund
This was a bit trickier than it should be due to symbol conflicts with zig's compiler-rt implementation. We attempt to use weak linkage in our compiler-rt, but this does not seem to be working in all cases. I manually disabled export of the problematic compiler-rt math functions in order to cross compile musl's libc.so for all targets as input to `tools/gen_stubs.zig`. Other than that, this update went fairly smoothly. Quite a few additional symbols were added to the blacklist in `tools/gen_stubs.zig` due to recent reorganization of zig's compiler-rt.
2022-03-20tools: fix gdb pretty printersAndrew Kelley
needed after merging 5c3325588ef4e85e85cb201ad9328fe26bbb8dca.
2022-03-16gdb: restructure pretty printers into different filesRobin Voetter
2022-03-16gdb: add printer for selfhosted ValueRobin Voetter
2022-03-16gdb: add printer for selfhosted TypeRobin Voetter
2022-03-16gdb: add slice, multi array list, and array hash map printersRobin Voetter
2022-03-16gdb: add arraylist and hashmap printerRobin Voetter
2022-03-04zig cc: integrate with -fstack-check, -fno-stack-checkAndrew Kelley
2022-02-24spirv spec: do not align packed struct fieldsVeikka Tuominen
2022-02-08update more API usage of std.ProgressAndrew Kelley
fixes regression introduced in 5a00e249632716b86edac088f69d19d82e307a28
2022-01-28spirv: improve generatorRobin Voetter
The spirv spec generator now also generates some support information: Opcode gains a function to query a Zig type representing the operands of the opcode. The idea is that this will enable a richer interface for emitting spirv instructions.
2022-01-26[linux headers] rename arm64 to aarch64Motiejus Jakštys
Zig calls it aarch64. Linux calls it arm64. Currently lib/libc/include has both arm64 and aarch64, which is quite confusing. tools/update-linux-headers.zig was executed against the latest stable linux patch version, therefore some other minor header updates. I will update the wiki on how to do it once this PR is accepted.
2022-01-19stage2: improvements to entry point handlingAndrew Kelley
* rename `entry` to `entry_symbol_name` for the zig build API * integrate with `zig cc` command line options * integrate with COFF linking with LLD * integrate with self-hosted ELF linker * don't put it in the hash for MachO since it is ignored
2022-01-11zig cc: integration with sysroot arg (#10568)Jakub Konka
Prior to this change, even if the use specified the sysroot on the compiler line like so ``` zig cc --sysroot=/path/to/sdk ``` it would only be used as a prefix to include paths and not as a prefix for `zig ld` linker.
2021-12-16glibc: fix inconsistency of powerpc ABI mappingAndrew Kelley
See the commit message of 5b6d26e97bb97d79782f3c77b02a997e361a1497 for an explanation. This is the same thing but for powerpc instead of mips.
2021-12-15glibc: fix inconsistency of mips ABI mappingAndrew Kelley
Before this commit, glibc headers did the following mapping: * (zig) mipsel-linux-gnu => (glibc) mipsel-linux-gnu * (zig) mipsel-linux-gnu-soft => (glibc) (none) * (zig) mips-linux-gnu => (glibc) mips-linux-gnu * (zig) mips-linux-gnu-soft => (glibc) (none) While the glibc ABI stubs used the (zig) gnueabi and gnueabihf ABIs, and the stage2 available_libcs array listed: * (zig) mipsel-linux-gnu * (zig) mips-linux-gnu The problem is the mismatch between the ABI component of the headers and the stubs. This commit makes the following clarifications: * (zig) mips-linux-gnueabi means soft-float * (zig) mipsel-linux-gnueabi means soft-float * (zig) mips-linux-gnueabihf means hard-float * (zig) mipsel-linux-gnueabihf means hard-float Consequently, the glibc headers now do this mapping: * (zig) mips-linux-gnueabihf => (glibc) mips-linux-gnu * (zig) mipsel-linux-gnueabihf => (glibc) mipsel-linux-gnu * (zig) mips-linux-gnueabi => (glibc) mips-linux-gnu-soft * (zig) mipsel-linux-gnueabi => (glibc) mipsel-linux-gnu-soft The glibc ABI stubs are unchanged, and the stage2 available_libcs array's 2 entries are modified and it gains 2 more: * (zig) mipsel-linux-gnueabi * (zig) mipsel-linux-gnueabihf * (zig) mips-linux-gnueabi * (zig) mips-linux-gnueabihf Now everything is consistent. Zig no longer recognizes a `mips-linux-gnu` triple; one must use `mips-linux-gnueabi` (soft float) or `mips-linux-gnueabihf` (hard float).
2021-12-15glibc: remove duplicate files between generic-glibc/ and glibc/include/Andrew Kelley
2021-12-15tools/update_glibc: ignore some more filesAndrew Kelley
2021-12-15update glibc start files to 2.34Andrew Kelley
This commit introduces tools/update_glibc.zig to update the start files for next time. Some notable changes in recent glibc: * abi-note.S has been changed to abi-note.c but we resist the change to keep it easier to compile the start files. * elf-init.c has been deleted upstream. Further testing should be done to verify that binaries against glibc omitting elf-init.c still run properly on oldel glibc linux systems. Closes #4926
2021-12-14remove tools/update_glibc.zigAndrew Kelley
It has been replaced by https://github.com/ziglang/glibc-abi-tool/ and should have been removed in 1442aa7dc039fd77c483862e37b099fe6d43f369.
2021-12-09tools/gen_stubs: add aarch64 and output preprocessor directivesAndrew Kelley
Now it outputs libc.S which can be assembled with zig, and the small differences per-architecture are handled with preprocessor directives. There is also now a set of blacklisted symbols which contains compiler-rt.
2021-12-08tools/gen_stubs: consolidate symbol properties into MultiSymAndrew Kelley
2021-12-08improve musl dynamic stubs file libc.sAndrew Kelley
tools/gen_stubs.zig now cuts out the middle man and operates directly on the libc.so ELF file. it outputs accurate .size directives for objects. std.elf gains an STV enum.
2021-11-30allocgate: change resize to return optional instead of errorLee Cannon
2021-11-30allocgate: renamed getAllocator function to allocatorLee Cannon
2021-11-30allocgate: stage 1 and 2 buildingLee Cannon
2021-11-30allocgate: std Allocator interface refactorLee Cannon
2021-11-30remove linux header files that have case conflictsAndrew Kelley
similar commit from the past: c73cd05468fba4bba5762a654aacdd9d90ecd272 This also modifies tools/update-linux-headers.zig to remove these same files for next time to prevent a regression. closes #10249
2021-11-30std lib API deprecations for the upcoming 0.9.0 releaseAndrew Kelley
See #3811
2021-11-29update libc linux headers to v5.16-rc3Andrew Kelley
* Add missing Linux headers. Closes #9837 * Update existing headers to latest Linux. * Consolidate headers that are the same for multiple Zig target CPU architectures. For example, Linux has only an x86 directory for both x86_64 and x86 CPU architectures. Now Zig only ships an x86 directory for Linux headers, and will emit the proper corresponding -isystem flags. * tools/update-linux-headers.zig is now available for upgrading to newer Linux headers, and the update process is now documented on the wiki.
2021-11-26zig cc: honor all -m and -mno- CPU feature flagsAndrew Kelley
closes #9196
2021-11-21zig cc: add -fcolor-diagnostics and -fcaret-diagnostics integrationAndrew Kelley
Closes #6290
2021-11-21zig cc: add -ffunction-sections integrationAndrew Kelley
Also update to latest LLVM 13 command line options. See #6290
2021-11-08tools/gen_stubs.zig: better error message on invalid inputAndrew Kelley
2021-10-16Add build.zig and command line flagsLee Cannon