| Age | Commit message (Collapse) | Author |
|
I've been wanting to do this for along time.
|
|
|
|
This is a breaking change that makes the API for creating build
artifacts no longer have any period of time where the target and
optimization mode are not set.
|
|
* introduce the concept of maps to user input options, but don't
implement it for command line arg parsing yet.
* remove setPreferredReleaseMode and standardReleaseOptions in favor of
standardOptimizeOption which has a future-proof options parameter.
|
|
|
|
This function is needed when a library exposes one of its own library
dependency's headers as part of its own public API.
Also, improve error message when a file system error occurs during
install file step.
|
|
|
|
Rename the full_pdb_path variable to full_h_path, in the
InstallArtifactStep.make method.
|
|
|
|
* no longer repeat -lc on the linker line redundantly
* when using linkLibrary() with a static library, it will now also put
the static library's static library dependencies on the linker line,
recursively.
* refactor out a common pattern to an addFlag function
|
|
Now it always takes a dest_rel_path parameter, making it slightly more
verbose, and much more useful.
|
|
It's not fully implemented yet, for example `@FOO@` syntax is not
handled.
|
|
For when you need options such as excluding certain extensions.
|
|
This one is useful for when the C library has a "include" directory but
it needs to get renamed to, e.g. "lame" when being installed.
|
|
|
|
This branch makes WriteFileStep use the same hashing algorithm as our
cache system, reducing the divergence between zig build and the cache
system.
|
|
|
|
This API converts a config.h.in file into config.h. This is useful when
introducing a build.zig file to an existing C/C++ project that is
configured with autotools or cmake.
The cmake syntax is not implemented yet.
|
|
These linker flags are required to build static ELF binaries that
can run under the Blink emulator:
https://github.com/jart/blink/issues/14
|
|
WebAssembly: remove unconditional --allow-undefined flag
|
|
This hack was initially introduced as we would export all symbols
unconditionally, including non-function definitions. This would cause
an error from the Wasmtime runtime engine, which this flag would
suppress. As we now properly export symbols, this flag is no longer
needed and any user running into this error can manually include it.
This commit also adds the `--import-symbols` ability to build.zig
|
|
|
|
Support more operators when running simple arithmetic tests, and
allow for int literals in the program spec.
|
|
|
|
This commit moves the logic from `std.build.InstallRawStep` into `zig
objcopy`. The options here are limited, but we can add features as
needed.
closes #9261
New issues can be opened for specific objcopy flag support.
|
|
|
|
|
|
There are intended to be no functional changes in this commit.
|
|
This matches the language reference.
|
|
There are still a few occurrences of "stage1" in the standard library
and self-hosted compiler source, however, these instances need a bit
more careful inspection to ensure no breakage.
|
|
After this commit, the self-hosted compiler does not offer the option to
use stage1 as a backend anymore.
|
|
This would only fail to compile when building *on* WASI.
|
|
strings (#13526)
* Export invalidFmtErr
To allow consistent use of "invalid format string" compile error
response for badly formatted format strings.
See https://github.com/ziglang/zig/pull/13489#issuecomment-1311759340.
* Replace format compile errors with invalidFmtErr
- Provides more consistent compile errors.
- Gives user info about the type of the badly formated value.
* Rename invalidFmtErr as invalidFmtError
For consistency. Zig seems to use “Error” more often than “Err”.
* std: add invalid format string checks to remaining custom formatters
* pass reference-trace to comp when building build file; fix checkobjectstep
|
|
|
|
When an object file or binary contains the target_features section
we can now parse and then dump its contents in string format so
we can use them in our linker tests to verify the features section.
|
|
std: CheckObject - correctly depend on its own step when creating an EmulatableRunStep
|
|
When creating an `EmulatableRunStep`, it now correctly depends
on its own step rather than only the executable that was created.
This means we do not need to add extra `dependOn` statements on
both the emulatable step as well as the check object step.
|
|
|
|
* Sema: implement linksection on functions
* Implement function linksection in Sema.
* Don't clobber function linksection/align/addrspace in Sema.
* Fix copy-paste typo in tests.
* Add a bunch of missing test_step.dependOn.
* Fix checkInSymtab match.
Closes #12546
|
|
|
|
|
|
Before, native glibc and dynamic linker detection attempted to use the
executable's own binary if it was dynamically linked to answer both the
C ABI question and the dynamic linker question. However, this could be
problematic on a system that uses a RUNPATH for the compiler binary,
locking it to an older glibc version, while system binaries such as
/usr/bin/env use a newer glibc version. The problem is that libc.so.6
glibc version will match that of the system while the dynamic linker
will match that of the compiler binary. Executables with these versions
mismatching will fail to run.
Therefore, this commit changes the logic to be the same regardless of
whether the compiler binary is dynamically or statically linked. It
inspects `/usr/bin/env` as an ELF file to find the answer to these
questions, or if there is a shebang line, then it chases the referenced
file recursively. If that does not provide the answer, then the function
falls back to defaults.
This commit also solves a TODO to remove an Allocator parameter to the
detect() function.
|
|
projects using stage1 and manual TranslateC
|
|
Fixes a compilation error when using the `EmulatableRunStep`
that is being generated from a step directly using `runEmulatable`.
|
|
|
|
gitrev a2c32e972f8c5adfcda8ed2d99379ae868f59c24
https://github.com/kubkon/zld/commit/a2c32e972f8c5adfcda8ed2d99379ae868f59c24
|
|
|
|
|
|
Renamed to better convery the intention of the step
|
|
Implements running and verifying the expected output when a binary is run.
Also adds warnings when a binary is skipped because of incompatibility.
This warning can be hidden by either setting the option manually through build.zig,
or by providing the option `-Dhide_foreign_warnings`.
|