aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Build/Step/ConfigHeader.zig
AgeCommit message (Collapse)Author
2023-08-20AstGen: add result location analysis passmlugg
The main motivation for this change is eliminating the `block_ptr` result location and corresponding `store_to_block_ptr` ZIR instruction. This is achieved through a simple pass over the AST before AstGen which determines, for AST nodes which have a choice on whether to provide a result location, which choice to make, based on whether the result pointer is consumed non-trivially. This eliminates so much logic from AstGen that we almost break even on line count! AstGen no longer has to worry about instruction rewriting based on whether or not a result location was consumed: it always knows what to do ahead of time, which simplifies a *lot* of logic. This also incidentally fixes a few random AstGen bugs related to result location handling, leading to the changes in `test/` and `lib/std/`. This opens the door to future RLS improvements by making them much easier to implement correctly, and fixes many bugs. Most ZIR is made more compact after this commit, mainly due to not having redundant `store_to_block_ptr` instructions lying around, but also due to a few bugs in the old system which are implicitly fixed here.
2023-08-10Build.ConfigHeader: render identifiersAli Chraghi
2023-07-30build system: follow-up enhancements regarding LazyPathAndrew Kelley
* introduce LazyPath.cwd_relative variant and use it for --zig-lib-dir. closes #12685 * move overrideZigLibDir and setMainPkgPath to options fields set once and then never mutated. * avoid introducing Build/util.zig * use doc comments for deprecation notices so that they show up in generated documentation. * introduce InstallArtifact.Options, accept it as a parameter to addInstallArtifact, and move override_dest_dir into it. Instead of configuring the installation via Compile step, configure the installation via the InstallArtifact step. In retrospect this is obvious. * remove calls to pushInstalledFile in InstallArtifact. See #14943 * rewrite InstallArtifact to not incorrectly observe whether a Compile step has any generated outputs. InstallArtifact is meant to trigger output generation. * fix child process evaluation code handling of `-fno-emit-bin`. * don't store out_h_filename, out_ll_filename, etc., pointlessly. these are all just simple extensions appended to the root name. * make emit_directory optional. It's possible to have nothing outputted, for example, if you're just type-checking. * avoid passing -femit-foo/-fno-emit-foo when it is the default * rename ConfigHeader.getTemplate to getOutput * deprecate addOptionArtifact * update the random number seed of Options step caching. * avoid using `inline for` pointlessly * avoid using `override_Dest_dir` pointlessly * avoid emitting an executable pointlessly in test cases Removes forceBuild and forceEmit. Let's consider these additions separately. Nearly all of the usage sites were suspicious.
2023-07-30Build.zig rename orgy (aka: #16353). Renames FileSource to LazyPath and ↵Felix (xq) Queißner
removes functions that take literal paths instead of LazyPath.
2023-06-26std.Build: omit newline from last lineJan200101
2023-06-21std.Build: implement variable substitutionJan200101
2023-06-21std.Build: correctly implement cmakedefine and cmakedefine01Jan200101
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-10std.Build: support #cmakedefine01 patternAli Chraghi
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