| Age | Commit message (Collapse) | Author |
|
Use `PassBuilder::buildO0DefaultPipeline` to build pipeline for -O0
in replacement of `PassBuilder::buildPerModuleDefaultPipeline`. This
affects both normal and LTO settings.
Two redundant Passes - which were added by accident - were also removed
from LTO pipeline.
|
|
This reverts commit 09008125e7944ae01bb907f2eb8dbff41d7a0715.
|
|
The missing initializer for a single field in the TargetOptions class
was enough to turn the stack protectors into hot garbage.
Fixes #8408
|
|
See #8418
This reverts commit ba1bea2fe87b73a53a3ecd729789853dcc56affe.
This reverts commit 94383d14df77fa638dac14f4b2bda5a2e3f21c5c.
This reverts commit 0d53a2bff01750f9220bcc861d662b2c5f304506.
|
|
|
|
- Enable MergeFunctionsPass in non-debug build.
- Verify input and output IR when the assertion is turned on.
- Add AlwaysInlinePass in debug build.
- Add more comments.
|
|
Now zig will use new PM for optimization by default.
|
|
Without this, the LLVM IR that zig generates cannot be compiled by LLVM.
|
|
LLVM12 deprecated `sret` and replaced it with the `sret(<Ty>)` form.
Closes #8075
|
|
This reverts commit 685b5c26b703d54381a74b71361816ad85ec8584.
@LemonBoy has a better patch, so reverting this to merge that one.
|
|
LLVM 12 requires sret attributes to have the struct type as a parameter,
and provides no C function for supplying it. Therefore, we must add
another C++ wrapper API for adding the sret attribute.
Fixes ability to build from source in the llvm12 branch.
|
|
Conflicts:
* src/clang.zig
* src/llvm.zig
- this file got moved to src/llvm/bindings.zig in master branch so I
had to put the new LLVM arch/os enum tags into it.
* lib/std/target.zig, src/stage1/target.cpp
- haiku had an inconsistency with its default target ABI, gnu vs
eabi. In this commit we make it gnu in both places to match the
latest changes by @hoanga.
* src/translate_c.zig
|
|
|
|
The CLI gains -flto and -fno-lto options to override the default.
However, the cool thing about this is that the defaults are great! In
general when you use build-exe in release mode, Zig will enable LTO if
it would work and it would help.
zig cc supports detecting and honoring the -flto and -fno-lto flags as
well. The linkWithLld functions are improved to all be the same with
regards to copying the artifact instead of trying to pass single objects
through LLD with -r. There is possibly a future improvement here as
well; see the respective TODOs.
stage1 is updated to support outputting LLVM bitcode instead of machine
code when lto is enabled. This allows LLVM to optimize across the Zig and
C/C++ code boundary.
closes #2845
|
|
|
|
Include updates to corresponding zig sources
llvm commit b2851aea80e5a8f0cfd6c3c5a56a6b00fb28c6b6
|
|
Closes #3825
|
|
Conflicts:
lib/std/dynamic_library.zig (fixed in this commit)
src/all_types.hpp
src/codegen.cpp
src/link.cpp
src/main.cpp
Will manually apply the diffs to these deleted files to the new zig
code in a followup commit.
|
|
This was brought to the horizon when using zig-bootstrap to cross compile
Zig for windows-gnu.
|
|
This mimics clang's default behavior.
|
|
|
|
|
|
|
|
Conflicts:
cmake/Findllvm.cmake
The llvm11 branch changed 10's to 11's and master branch added the
"using LLVM_CONFIG_EXE" help message, so the resolution was to merge
these changes together.
I also added a check to make sure LLVM is built with AVR enabled, which
is no longer an experimental target.
|
|
The builtin folds a Vector(N,T) into a scalar T using a specified
operator.
Closes #2698
|
|
The changes to install_files.h needed to put into src/libcxx.zig
|
|
|
|
|
|
Before, this would cause a link failure when mixing Zig and C code for
RISC-V targets.
Now, the ABIs match and Zig and C code can be mixed successfully.
I will file a follow-up issue for the ability to deal more explicitly
with ABIs.
closes #4863
|
|
|
|
|
|
example: zig build-obj test.zig -femit-llvm-ir -femit-asm
this will generate all three: test.o test.s test.ll
|
|
|
|
|
|
tests use older sub-arch that works in the older qemu
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Fixes #3645
|
|
closes #3732
|
|
Don't need no patched lld --kill-at behaviour now.
|
|
|
|
|
|
|
|
The comment added by this commit is copied here:
For macOS stack traces, we want to avoid having to parse the compilation unit debug
info. As long as each debug info file has a path independent of the compilation unit
directory (DW_AT_comp_dir), then we never have to look at the compilation unit debug
info. If we provide an absolute path to LLVM here for the compilation unit debug info,
LLVM will emit DWARF info that depends on DW_AT_comp_dir. To avoid this, we pass "."
for the compilation unit directory. This forces each debug file to have a directory
rather than be relative to DW_AT_comp_dir. According to DWARF 5, debug files will
no longer reference DW_AT_comp_dir, for the purpose of being able to support the
common practice of stripping all but the line number sections from an executable.
closes #2700
|
|
|
|
Occasionally LLVM headers generate warnings with newer gcc versions and
since we use -Werror this has to be worked around.
|