aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Build
AgeCommit message (Collapse)Author
2023-07-27test: add a test that verifies no debug handlers get pulled into compiler_rtkcbanner
build: fix CheckObject checkNotPresent only checking a single line of the haystack
2023-07-24std.Build.Step.Compile: getEmittedDocs API enhancementsAndrew Kelley
* Allow calling it multiple times. * Rename it. Sorry, this is to coincide with #16353.
2023-07-24CLI: delete dead option -femit-analysisAndrew Kelley
This used to do something with the old autodocs system. Now it does nothing.
2023-07-23test: test for issues starting codegen on many targetsJacob Young
Specifically this is to make sure llvm data layout generation doesn't regress. The no emit bin is to allow testing targets that can't currently be linked. The commented out targets are ones that fail in the linker anyway when no emit bin is passed.
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-20check-object: allow for multiple extractions within one checkJakub Konka
2023-07-20check-object: format known OS-specific types before doing generic formatJakub Konka
2023-07-20check-object: dump PT flags when dumping program headersJakub Konka
2023-07-20check-object: remove wildcard matchers as they are too clunkyJakub Konka
Instead, we now have a looser helper called `checkContains(...)` that will match on any occurrence similarly to `std.mem.indexOf()`. While at it, I have cleaned up other combinators to make the entire API more consistent, and so: * `checkStart(phrase)` is now `checkStart()` followed by `checkExact(phrase)` * `checkNext(phrase)` if matching exactly is now `checkExact(phrase)` * `checkNext(phrase)` if matching loosely is now `checkContains(phrase)` * `checkNext(phrase)` if matching exactly with var extractors is now `checkExtract(phrase)` Finally, `ElfDumper` is now dumping contents of `.symtab` and `.dynsym` symbol tables. I have also removed dumping of symtabs as optional - they are now always dumped which cleaned up the implementation even more.
2023-07-20check-object: dump contents of .dynamic sectionJakub Konka
2023-07-19test/link: add shared-memory test for WebAssemblyLuuk de Gram
2023-07-14Merge pull request #16398 from ziglang/check-object-elfJakub Konka
std: add ELF parse'n'dump functionality to std.Build.Step.CheckObject
2023-07-13check-object: dump info on PHDRsJakub Konka
2023-07-13check-object: dump more info on SHDRsJakub Konka
2023-07-13check-object: dump some info on SHDRsJakub Konka
2023-07-13check-object: dump ELF headerJakub Konka
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-11std.Build: Add methods for creating modules from a TranslateC object.Michael Buckley
2023-07-09Changed Step.Run's stdin to accept FileSource (#16358)Krzysztof Wolicki
2023-07-06std: add prefixed versions of addFileSource and addDirectorySource to Step.RunJakub Konka
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-26std.Build: omit newline from last lineJan200101
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-21std.Build: implement variable substitutionJan200101
2023-06-21std.Build: correctly implement cmakedefine and cmakedefine01Jan200101
2023-06-19all: zig fmt and rename "@XToY" to "@YFromX"Eric Joldasov
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
2023-06-17std: replace builtin.Version with SemanticVersionr00ster91
2023-06-16migration: std.math.{min, min3, max, max3} -> `@min` & `@max`r00ster91
2023-06-16std.Build.Step.Run: add stdin to cache manifestIsaac Freund
2023-06-13Merge pull request #15957 from BratishkaErik/deprecated-Andrew Kelley
std.*: remove stuff that was deprecated in older versions
2023-06-13allow run step to skip foreign binary execution if executor failsLee Cannon
2023-06-13Remove CheckObjectStep.runAndCompare (#15973)Zapolsky Anton
Closes #14969
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-30cache: handle 0-length prefix paths in findPrefixResolvedkcbanner
2023-05-25std.fs.file: Rename File.Lock enum values to snake caseLinus Groh
2023-05-25std.fs.file: Rename File.Kind enum values to snake caseLinus Groh
2023-05-24Fixes `WriteFile.getFileSource` failure on Windows (#15730)Mason Remaley
2023-05-24std: Move std.debug.{TTY.Config,detectTTYConfig} to std.io.ttyLinus Groh
Also get rid of the TTY wrapper struct, which was exlusively used as a namespace - this is done by the tty.zig root struct now. detectTTYConfig has been renamed to just detectConfig, which is enough given the new namespace. Additionally, a doc comment had been added.
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-11Merge pull request #15641 from jacobly0/cache-raceAndrew Kelley
Cache: fix race condition
2023-05-11Merge pull request #15519 from dweiller/issue-15482Andrew Kelley
Optimize lowering of `s[start..][0..len]`
2023-05-11Cache: fix unnecessary cache missesJacob Young
With the old logic, it was possible for a bunch of processes to queue up to update a cache entry, and then each to do so one at a time. Now, it rechecks whether there still a cache miss or another process has completed the work in the interim.
2023-05-11Cache: fix race conditionJacob Young
When checking a cache entry with no input files for a hit, if `createFile` returned `error.WouldBlock` we would forget about the fact that the file has been created, and all future checks will assume that a cache hit has happened, even though one never has or does, leading to rare `FileNotFound` errors trying the access the protected files. This fix works by writing an extra byte to the manifest file to distinguish hits and misses when there no input files to write.
2023-05-10std.Build: support #cmakedefine01 patternAli Chraghi