Commit Graph

7 Commits

Author SHA1 Message Date
Andrew Kelley
6164801efb update install_raw_hex test case
LLVM 14 optimizes differently, so it's reasonable to have there be a
binary difference here.
2022-07-06 11:52:21 -07:00
Meghan
c08b190c69
lint: duplicate import (#10519) 2022-01-07 00:06:06 -05:00
Jonathan Marler
7659229edc std.build.InstallRawStep: allow custom dest_dir
I'm working on a build.zig file where I'm leveraging InstallRawStep but I'd like to change the install dir.  This allows the install dir to be changd and also enhances InstallRawStep to add more options in the future by putting them into a struct with default values.  This also removes the need for an extra addInstallStepWithFormat function in build.zig.
2021-12-03 12:56:49 -08:00
Andrew Kelley
20cc7af8e6 stage2: support LLD -O flags on ELF
In 7e23b3245a I made -O flags to the
linker emit a warning that the argument does nothing. That was not
correct however; LLD does have some logic that does different things
depending on -O0, -O1, and -O2. It defaults to -O1, and it does less
optimizations with -O0 and more with -O2.

With this commit, e.g. `-Wl,-O1` is supported by the `zig cc` frontend,
and by default we pass `-O0` to LLD in debug mode, and `-O3` in release
modes.

I also fixed a bug in the LLD ELF linker line which was incorrectly
passing `-O` flags instead of `--lto-O` flags for LTO.
2021-11-24 18:46:32 -07:00
Andrew Kelley
6115cf2240 migrate from std.Target.current to @import("builtin").target
closes #9388
closes #9321
2021-10-04 23:48:55 -07:00
Andrew Kelley
1f653b7f8e update install_raw_hex standalone test for llvm13 2021-09-15 17:33:18 -07:00
Evan Haas
742fe65f3e
stdlib: Add test for generating HEX files.
Co-authored-by: Akbar Dhanaliwala <akbar.dhanaliwala@gmail.com>
2021-09-01 12:21:30 -07:00