aboutsummaryrefslogtreecommitdiff
path: root/tools
AgeCommit message (Collapse)Author
2021-10-04migrate from `std.Target.current` to `@import("builtin").target`Andrew Kelley
closes #9388 closes #9321
2021-09-30Merge remote-tracking branch 'origin/master' into llvm13Andrew Kelley
2021-09-16zig cc: support -S and -emit-llvm CLI parametersAndrew Kelley
closes #6425
2021-09-15Merge remote-tracking branch 'origin/master' into llvm13Andrew Kelley
Conflicts: * cmake/Findclang.cmake * cmake/Findlld.cmake * cmake/Findllvm.cmake In master branch, more search paths were added to these files with "12" in the path. In this commit I updated them to "13". * src/stage1/codegen.cpp * src/zig_llvm.cpp * src/zig_llvm.h In master branch, ZigLLVMBuildCmpXchg is improved to add `is_single_threaded`. However, the LLVM 13 C API has this already, and in the llvm13 branch, ZigLLVMBuildCmpXchg is deleted in favor of the C API. In this commit I updated stage2 to use the LLVM 13 C API rather than depending on an improved ZigLLVMBuildCmpXchg. Additionally, src/target.zig largestAtomicBits needed to be updated to include the new m68k ISA.
2021-09-01stage2: update for new usingnamespace semanticsAndrew Kelley
2021-08-28Merge remote-tracking branch 'origin/master' into llvm13Andrew Kelley
Conflicts: lib/libcxx/include/__config d57c0cc3bfeff9af297279759ec2b631e6d95140 added support for DragonFlyBSD to libc++ by updating some ifdefs. This needed to be synced with llvm13.
2021-08-24remove redundant license headers from zig standard libraryAndrew Kelley
We already have a LICENSE file that covers the Zig Standard Library. We no longer need to remind everyone that the license is MIT in every single file. Previously this was introduced to clarify the situation for a fork of Zig that made Zig's LICENSE file harder to find, and replaced it with their own license that required annual payments to their company. However that fork now appears to be dead. So there is no need to reinforce the copyright notice in every single file.
2021-08-16add m68k musl (1.2.2) headersAndrew Kelley
This commit also corrects a mistake from commit 6dc2236054dfcf911ce848f67a4078740a90783a which did not properly delete files when upgrading to the 1.2.2 musl headers.
2021-08-15update target CPU features with LLVM 13 rc1 dataAndrew Kelley
2021-08-12update_cpu_features tool: work around stage1 bugAndrew Kelley
This works around a stage1 compiler bug resulting in a segfault when trying to use the tool.
2021-08-12compiler-rt: do not depend on `usingnamespace`Andrew Kelley
The idea is to depend on this language feature as little as possible with the hopes that it can be adjusted to be less of an anti-pattern. This also helps self-hosted, which does not yet implement `usingnamespace`, get closer to being able to build compiler-rt.
2021-08-06Update all usages of mem.split/mem.tokenize for generic versionRyan Liptak
2021-06-30zig fmtkprotty
2021-06-30changes to accomodate std.Thread updatekprotty
2021-06-21fix code broken from previous commitJacob G-W
2021-06-17Fix `lakemont` CpuModel (#9099)d18g
Lakemont has no x86, no MMX, no SSE and no way of handling any fp-math. In theory LLVM is able to implicitly use the soft-float emulation library calls to legalize any such operation but, given Zig's use of many non-standard features, sometimes we hit a weak spot in the X86 codegen backend. Consider this as a work-around for this LLVM problem, fixing the problem in LLVM is not so high in my todo list as the target is pretty niche and Intel axed it in '19. (Commit message by @LemonBoy)
2021-06-13tools: Unbreak many toolsLemonBoy
Many tools were broken after the recent hash-table refactorings, fix them and ensure they won't silently break again.
2021-06-11zig cc: recognize more pie flagsAndrew Kelley
This is a bug fix.
2021-06-11better awareness of unwind tablesAndrew Kelley
* stage1 backend allows configuring the uwtables function attr via a flag rather than its own logic. * stage2 defaults to enabling uwtable attr when linking libunwind, or always on windows * stage2 makes link_eh_frame_hdr true automatically if uwtable attr is set to be on for zig functions * CLI: add -funwind-tables and -fno-unwind-tables to allow the user to override the defaults. * hook it up to `zig cc` closes #9046
2021-06-10zig fmtAndrew Kelley
2021-06-09cc,wasi: support WASI reactors via -mexec-model flag.Takeshi Yoneda
Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io>
2021-06-08tools: fix update_clang_options.zig for ArrayHashMap's Separated Key/Value ↵Rejean Loyer
Storage breaking change.
2021-06-03Breaking hash map changes for 0.8.0Martin Wickham
- hash/eql functions moved into a Context object - *Context functions pass an explicit context - *Adapted functions pass specialized keys and contexts - new getPtr() function returns a pointer to value - remove functions renamed to fetchRemove - new remove functions return bool - removeAssertDiscard deleted, use assert(remove(...)) instead - Keys and values are stored in separate arrays - Entry is now {*K, *V}, the new KV is {K, V} - BufSet/BufMap functions renamed to match other set/map types - fixed iterating-while-modifying bug in src/link/C.zig
2021-05-15Merge remote-tracking branch 'origin/master' into stage2-whole-file-astgenAndrew Kelley
Conflicts: * build.zig * src/Compilation.zig * src/codegen/spirv/spec.zig * src/link/SpirV.zig * test/stage2/darwin.zig - this one might be problematic; start.zig looks for `main` in the root source file, not `_main`. Not sure why there is an underscore there in master branch.
2021-05-14SPIR-V: Don't parse/render in gen_spirv_spec.zig, just emit in the right formatRobin Voetter
2021-05-14SPIR-V: SPIR-V feature generation toolRobin Voetter
There is a lot left to be desired for this tool, as currently dependencies of extensions and dependencies of capabilities on extensions are not included: - There is no machine-readable definition of dependencies of extensions. - A capability may depend on either of a multitude of extensions, which as of yet cannot be properly modelled in the target system.
2021-05-14SPIR-V: Split out registry from gen_spirv_spec.zigRobin Voetter
2021-05-14SPIR-V: Adapt spec generator to new render apiRobin Voetter
2021-05-14SPIR-V: Begin generating typesRobin Voetter
2021-05-03std: Add two more ARM CPUs to the known CPU listLemonBoy
Modeled after GCC's description.
2021-04-20target: drop `ppc32` and prefer `ppc`Michael Dusan
- original PR #7949 (incorrectly) patched a generated-file and changes have subsequently been lost/overwritten - fix #7947 in a different way: drop `ppc32` because `ppc` already exists
2021-04-04glibc: add support for csky architectureAndrew Kelley
2021-03-28Merge remote-tracking branch 'origin/master' into llvm12Andrew Kelley
2021-03-14macho: fix various linker flagsMichael Dusan
fix drivers: zig {cc,c++} - `-dynamiclib` is an alias to `-shared` - associate `-dynamiclib` with zig `.shared` semantics fix drivers: zig {cc,c++,build-lib,build-exe} - use `-dynamic` for {exe,dylib} - for dylib this fixes a regression - for exe this replaces incorrect use of `-static`
2021-03-12Merge remote-tracking branch 'origin/master' into llvm12Andrew Kelley
2021-03-07std: Deprecate the B and Bi format specifiersLemonBoy
Following #8007 and #8137 let's get rid of the last weird format.
2021-03-04Merge remote-tracking branch 'origin/master' into llvm12Andrew Kelley
Syncing with master branch because I want to re-run update_clang_options.zig in the llvm12 branch.
2021-03-04zig cc: fix handling of -MM flagAndrew Kelley
Clang docs say: > Like -MMD, but also implies -E and writes to stdout by default. Previously, Zig handled this option by forwarding it directly to Clang, and disabling depfiles. However this did not adhere to Clang's documented behavior of these flags. Now, in addition to being forwarded directly to Clang, `-MM` also sets c_out_mode = .preprocessor, just like `-E`. Another issue I noticed is that Zig did not recognize the aliases for -MG, -MM, or -MMD. The aliases are now recognized.
2021-03-02update to latest std Thread APIAndrew Kelley
2021-03-01Merge remote-tracking branch 'origin/master' into llvm12Andrew Kelley
2021-02-28tools/update_cpu_features: fix usage()Michael Dusan
2021-02-27update ARM target CPU featuresAndrew Kelley
This completes the process. All target CPU features are now auto-generated by the tools/update_cpu_features.zig script, which contains all the overrides. Invoking this tool against LLVM 12rc2 now produces an empty git diff.
2021-02-27tools/update_cpu_features: add a "flatten" featureAndrew Kelley
and use it to clean up aarch64 target CPU features
2021-02-27tools/update_cpu_features: better patching APIAndrew Kelley
With this change, added & modified cpus & features participate in the same pruning system, and sorting takes into account the zig name, not the pre-modified llvm name. The modified target files in this commit are due to the improved sorting and pruning. The script now fully supports extra cpus & features.
2021-02-27HashMap.put returns !void, not a !booldaurnimator
2021-02-27tools/update_cpu_features: consistent naming of neoverse cpusAndrew Kelley
2021-02-27update amdgpu target CPU featuresAndrew Kelley
2021-02-27update RISC-V target CPU featuresAndrew Kelley
2021-02-27tools/update_cpu_features: prune redundant featuresAndrew Kelley
When a CPU feature implies that another one must be present, avoid redundantly specifying the other one.
2021-02-26tools/update_cpu_features: handle ISAs with no featuresAndrew Kelley
These are represented by not having a file for them.