aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Build/Step/Compile.zig
AgeCommit message (Collapse)Author
2023-07-22move installation logic to the build script where it belongsAndrew Kelley
* build.zig: introduce `-Dflat` option which makes the installation match what we want to ship for our download tarballs. This allows deleting a bunch of shell script logic from the CI. - for example it puts the executable directly in prefix/zig rather than prefix/bin/zig and it additionally includes prefix/LICENSE. * build.zig: by default also install std lib documentation to doc/std/ - this can be disabled by `-Dno-autodocs` similar to how there is already `-Dno-langref`. * build.zig: add `std-docs` and `langref` steps which build and install the std lib autodocs and langref to prefix/doc/std and prefix/doc/langref.html, respectively. * std.Build: implement proper handling of `-femit-docs` using the LazyPath system. This is a breaking change. - this is a partial implementation of #16351 * frontend: fixed the handling of Autodocs with regards to caching and putting the artifacts in the proper location to integrate with the build system. - closes #15864 * CI: delete the logic for autodocs since it is now handled by build.zig and is enabled by default. - in the future we should strive to have nearly all the CI shell script logic deleted in favor of `zig build` commands. * CI: pass `-DZIG_NO_LIB=ON`/`-Dno-lib` except for the one command where we want to actually generate the langref and autodocs. Generating the langref takes 14 minutes right now (why?!) so we don't want to do that more times than necessary. * Autodoc: fixed use of a global variable. It works fine as a local variable instead. - note that in the future we will want to make Autodoc run simultaneously using the job system, but for now the principle of YAGNI dictates that we don't have an init()/deinit() API and instead simply call the function that does the things. * Autodoc: only do it when there are no compile errors
2023-07-19test/link: add shared-memory test for WebAssemblyLuuk de Gram
2023-07-11build: avoid repeating objects when linking a static libraryXavier Bouchoux
Don't pass the object files from a static library to the linker invocation. The lib.a file already contains them. Avoids "duplicate symbol" errors (and useless work by the linker)
2023-07-04std.Build.Step.Compile: fix clearing logic for empty cflagsAndrew Kelley
Commit c0b774fbc65e3e406a38d37b02fffda7c5d3df26 originally added this logic but it did not properly clear the C command line flags to empty when a previous positional argument had command line flags, because it never set the "previous" flag to true. This fixes C compiler flags not being reset to empty when using the build system and a second positional argument has no arguments after a first positional argument has arguments. Thanks to @squeek502 for finding this.
2023-06-26Build: make `InstallDirStep` use a `FileSource`Ian Johnson
Closes #16187
2023-06-24all: migrate code to new cast builtin syntaxmlugg
Most of this migration was performed automatically with `zig fmt`. There were a few exceptions which I had to manually fix: * `@alignCast` and `@addrSpaceCast` cannot be automatically rewritten * `@truncate`'s fixup is incorrect for vectors * Test cases are not formatted, and their error locations change
2023-06-17std: replace builtin.Version with SemanticVersionr00ster91
2023-06-13std.Build.Step.Compile: remove `addSystemIncludeDir`, `addIncludeDir`, ↵Eric Joldasov
`addLibPath`, and `addFrameworkDir` (deprecated in 0.10) Followup to d3d24874c91054a70c706fed47278c81c9ce890a. Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
2023-06-03Merge pull request #15579 from squeek502/mem-delimitersAndrew Kelley
Split `std.mem.split` and `tokenize` into `sequence`, `any`, and `scalar` versions
2023-06-03Build: fix producesPdbFile logic (#15756)xEgoist
Fixes bug causing ReleaseSmall to fail on Windows. Due to the change in default behavior of ReleaseSmall, debug info are stripped by default. However because `Compile.create` still defaults to null, `producesPdbFile` will report true for `lib/std/Build/Step/InstallArtifact.zig` causing it to fail on copying a file that does not exist. This commit change the default of strip depending on `optimize`.
2023-05-16tweaks to --build-idAndrew Kelley
* build.zig: the result of b.option() can be assigned directly in many cases thanks to the return type being an optional * std.Build: make the build system aware of the std.Build.Step.Compile.BuildId type when used as an option. - remove extraneous newlines in error logs * simplify caching logic * simplify hexstring parsing tests and use a doc test * simplify hashing logic. don't use an optional when the `none` tag already provides this meaning. * CLI: fix incorrect linker arg parsing
2023-05-16stage2: implement --build-id stylesMotiejus Jakštys
2023-05-13Update all std.mem.split calls to their appropriate functionRyan Liptak
Everywhere that can now use `splitScalar` should get a nice little performance boost.
2023-05-13Update all std.mem.tokenize calls to their appropriate functionRyan Liptak
Everywhere that can now use `tokenizeScalar` should get a nice little performance boost.
2023-05-03std.Build: use Step.* instead of *StepVeikka Tuominen
Follow up to 13eb7251d37759bd47403db304c6120c706fe353
2023-05-03build: rename std.Build.*Step to std.Build.Step.*Nicolas Sterchele
Follow-up actions from #14647 Fixes #14947