aboutsummaryrefslogtreecommitdiff
path: root/tools
AgeCommit message (Collapse)Author
2023-04-20fixes to the previous commitAndrew Kelley
* CompileStep: Avoid calling producesPdbFile() to determine whether the option should be respected. If the user asks for it, put it on the command line and let the Zig CLI deal with it appropriately. * Make the namespace of `std.dwarf.Format.dwarf32` no longer have a redundant "dwarf" in it. * Add `zig cc` integration for `-gdwarf32` and `-gdwarf64`. * Toss in a bonus bug fix for `-gdwarf-2`, `-gdwarf-3`, etc. * Avoid using default init values for struct fields unnecessarily. * Add missing cache hash addition for the new option.
2023-04-18std.target.riscv: fix baseline_rv32 missing feature "32bit"serg
2023-04-09spirv: make IdResultType and IdRef weak aliases of IdResultRobin Voetter
Previously they were strong aliases, but as these types are used quite intermittendly it resulted in a lot of toRef() calls. Removing them improves readability a bit.
2023-04-08zig cc: handle the -r flagAndrew Kelley
This makes -r treated the same as -c which is to output an object file. Zig's ELF linker code already handles multiple object files into an object file with the -r flag to LLD. closes #11683
2023-04-05Merge remote-tracking branch 'origin/master' into llvm16Andrew Kelley
2023-04-01link: handle -u flag in all linkersJakub Konka
Also clean up parsing of linker args - reuse `ArgsIterator`. In MachO, ensure we add every symbol marked with `-u` as undefined before proceeding with symbol resolution. Additionally, ensure those symbols are never garbage collected. MachO entry_in_dylib test: pass `-u _my_main` when linking executable so that it is not incorrectly garbage collected by the linker.
2023-03-30Update GDB pretty printersSilver
2023-03-24x86_64: canonicalize each br of a blockJacob Young
2023-03-16Merge remote-tracking branch 'origin/master' into llvm16Andrew Kelley
2023-03-15tools: fix typo in lldb commandJacob Young
2023-03-06tools: add lldb pretty printer for std.MultiArrayList.SliceJacob Young
2023-03-03Merge remote-tracking branch 'origin/master' into llvm16Andrew Kelley
2023-02-27tools: revert sharing of stage2 pretty printer infoJacob Young
Partial revert of 1e963053d0ff67361b587b046a917375e963d5e9. Now that lldb has a new method for accessing this data that does not require manual updating, there is no longer any reason to share this data.
2023-02-27tools: implement more lldb pretty printersJacob Young
2023-02-19Merge remote-tracking branch 'origin/master' into llvm16Andrew Kelley
2023-02-18update std lib and compiler sources to new for loop syntaxAndrew Kelley
2023-02-18Merge remote-tracking branch 'origin/master' into llvm16Andrew Kelley
2023-02-12compiler_rt: add __powihf2, __powisf2, __powidf2, __powitf2, __powixf2Jan Philipp Hafer
Implementation and tests ported from LLVM release 80. Tests of __powihf2 created from __powisf2 tests with minor adjustments.
2023-02-11compiler_rt: __divmodti4 for libgcc symbol compatibilitymatu3ba
- Copy and adjust __divmodsi4 tests for __divmoddi4 and __divmodti4. - Assuming d = a/b does not overflow (MIN/-1) or uses div by 0, then tmp = (d * b) = (a/b * b) = a does not overflow. => Remove wraparound for remainder in applicable routines.
2023-02-11compiler_rt: __ashlsi3, __ashrsi3, __lshrsi3 for symbol compatibilitymatu3ba
These are unused in LLVM, but in gcc used for example by rl78. Move test files into common file, add tests for aforementioned routines and missing ones for __lshrti3.
2023-02-05Update Linux syscall list for 6.1, support Mips64Stephen Gregoratto
Follow up for #14541.
2023-02-04langref, tools: rename --single-threaded to -fsingle-threadedee7
Commit 40f5e5dfc60e ("CLI: introduce -fsingle-threaded/ -fno-single-threaded", 2021-12-01) removed the `--single-threaded` option, but didn't update all mentions of it. $ zig version 0.11.0-dev.1568+c9b957c93 $ zig build-exe --help | grep single -fsingle-threaded Code assumes there is only one thread -fno-single-threaded Code may not assume there is only one thread $ zig build-exe --single-threaded foo.zig error: unrecognized parameter: '--single-threaded'
2023-01-26update clang options data to LLVM 16Andrew Kelley
2023-01-26update CPU features to LLVM 16Andrew Kelley
2023-01-22Rewrite update_crc_catalog in zig and move tests to separate filefn ⌃ ⌥
2023-01-21std.hash.crc: implement algorithms listed in CRC RevEng catalogfn ⌃ ⌥
2023-01-13zig run/cc: recognize "-x language"Motiejus Jakštys
This commit adds support for "-x language" for a couple of hand-picked supported languages. There is no reason the list of supported languages to not grow (e.g. add "c-header"), but I'd like to keep it small at the start. Alternative 1 ------------- I first tried to add a new type "Language", and then add that to the `CSourceFile`. But oh boy what a change it turns out to be. So I am keeping myself tied to FileExt and see what you folks think. Alternative 2 ------------- I tried adding `Language: ?[]const u8` to `CSourceFile`. However, the language/ext, whatever we want to call it, still needs to be interpreted in the main loop: one kind of handling for source files, other kind of handling for everything else. Test case --------- *standalone.c* #include <iostream> int main() { std::cout << "elho\n"; } Compile and run: $ ./zig run -x c++ -lc++ standalone.c elho $ ./zig c++ -x c++ standalone.c -o standalone && ./standalone elho Fixes #10915
2023-01-06tools: build all tools in ci to prevent bitrotJan Philipp Hafer
No LLVM assertions were triggered for me. Closes #12015 Closes #12022 Closes #12223
2023-01-03add -fopt-bisect-limitGuillaume Wenzek
2022-12-30parser: ensure the documented grammar matches grammar.yManlio Perillo
Move the parsing of Root from the parse function to the Parser.parseRoot method. Add an empty line between each rule, for consistency with grammar.y. Ensure that normal doc-comments are always on the top, for consistency. Add extract-grammar.zig to the tools directory; it is used to extract the PEG grammar from parse.zig, so that it can be compared with grammar.y.
2022-12-22compiler-rt: implement __udivei4 and __umodei4 (#14023)Frank Denis
Allows dividing and formatting arbitrary-large unsigned integers.
2022-12-18Add missing clang opts: -install_name and -undefinedJakub Konka
2022-11-23adapt update_spriv_features to changed std patternRobin Voetter
2022-11-23spirv: assemblerRobin Voetter
spirv: introduce SpvModule.Fn to generate function code into spirv: assembler error message setup spirv: runtime spec info spirv: inline assembly tokenizer spirv: inline assembly lhs result/opcode parsing spirv: forgot to fmt spirv: tokenize opcodes and assigned result-ids spirv: operand parsing setup spirv: assembler string literals spirv: assembler integer literals spirv: assembler value enums spirv: assembler bit masks spirv: update assembler to new asm air format spirv: target 1.5 for now Current vulkan sdk version (1.3.204) ships spirv tools targetting 1.5, and so these do not work with binaries targetting 1.6 yet. In the future, this version number should be decided by the target. spirv: store operands in flat arraylist. Instead of having dedicated Operand variants for variadic operands, just flatten them and store them in the normal inst.operands list. This is a little simpler, but is not easily decodable in the operand data representation. spirv: parse variadic assembly operands spirv: improve assembler result-id tokenization spirv: begin instruction processing spirv: only remove decl if it was actually allocated spirv: work around weird miscompilation Seems like there are problems with switch in anonymous struct literals. spirv: begin resolving some types in assembler spirv: improve instruction processing spirv: rename some types + process OpTypeInt spirv: process OpTypeVector spirv: process OpTypeMatrix and OpTypeSampler spirv: add opcode class to spec, remove @exclude'd instructions spirv: process more type instructions spirv: OpTypeFunction spirv: OpTypeOpaque spirv: parse LiteralContextDependentNumber operands spirv: emit assembly instruction into right section spirv: parse OpPhi parameters spirv: inline assembly inputs spirv: also copy air types spirv: inline assembly outputs spirv: spir-v address spaces spirv: basic vector constants/types and shuffle spirv: assembler OpTypeImage spirv: some stuff spirv: remove spirv address spaces for now
2022-11-21outline atomics: ret instead of jump to retAndrew Kelley
After this, the machine code generated by zig matches identically to gcc's after the differences in loading the have_lse flag.
2022-11-21simplify outline atomicsAndrew Kelley
* Rely on libSystem when targeting macOS. * Make tools/gen_outline_atomics.zig more idiomatic. * Remove the CPU detection / auxval checking from compiler_rt. This functionality belongs in a different component. Zig's compiler_rt must not rely on constructors. Instead it will export a symbol for setting the value, and start code can detect and activate it. * Remove the separate logic for inline assembly when the target does or does not have lse support. `.inst` works in both cases.
2022-11-21compiler_rt: add outlined lse atomics for aarch64Devin Singh
2022-11-18run zig fmt on everything checked by CIStevie Hryciw
2022-11-04all: rename i386 to x86Ali Chraghi
2022-10-20add m68k target CPU featuresAndrew Kelley
2022-10-18Revert "adding `static` and `dynamic` ZigEquivalentAndrew Kelley
enums so that we can branch to set `link_mode` properly when we iterate over the clang arguments. also replaced `dynamic` flag in clang_options_data.zig with proper definition similarly to `static`." This reverts commit 6af0eeb58d1d220d407ce4c463eaeb25b35f2761. This change needs more careful consideration. It regressed zig-bootstrap due to cmake passing `-static -lkernel32` and zig failing with error.UnableToStaticLink. See https://github.com/ziglang/zig-bootstrap/issues/134
2022-10-17tools: add lldb stage2 pretty printersJacob Young
* Fix untagged struct names in debug info for llvm. * Factor out common stage2 pretty printer data. * Add lldb version of stage2 pretty printers.
2022-10-13adding `static` and `dynamic` ZigEquivalent enums so that we can branch to ↵cod1r
set `link_mode` properly when we iterate over the clang arguments. also replaced `dynamic` flag in clang_options_data.zig with proper definition similarly to `static`.
2022-08-29Merge remote-tracking branch 'origin/master' into llvm15Andrew Kelley
2022-08-22stage2+stage1: remove type parameter from bit builtinsVeikka Tuominen
Closes #12529 Closes #12511 Closes #6835
2022-08-19stage2: implement stack protectorsAndrew Kelley
This is one of the final remaining TODOs for the LLVM backend.
2022-08-08cc: add support for -M flagJakub Konka
2022-08-08update update_clang_options.zig to latest formatting changesJakub Konka
2022-08-02update clang CLI options to LLVM 15Andrew Kelley
2022-08-02update target CPU features for LLVM 15Andrew Kelley