LLVM destroys the string that we use to test if LLVM deleted the
inlined function.
Also fixed forgetting to initialize a buffer in std lib path detection.
LLVM's CodeViewDebug pass misparses the version string when it contains
a git revision so stop doing that. This only affected Windows builds.
closes#898
'zig run file.zig' builds a file and stores the artifacts in the global
cache. On successful compilation the binary is executed.
'zig run file.zig -- a b c' does the same, but passes the arguments a,
b and c as runtime arguments to the program. Everything after an '--' are
treated as runtime arguments.
On a posix system, a shebang can be used to run a zig file directly. An
example shebang would be '#!/usr/bin/zig run'. You may not be able pass
extra compile arguments currently as part of the shebang. Linux for example
treats all arguments after the first as a single argument which will result
in an 'invalid command'.
Currently there is no customisability for the cache path as a compile
argument. For a posix system you can use `TMPDIR=. zig run file.zig` to
override, in this case using the current directory for the run cache.
The input file is always recompiled, even if it has changed. This is
intended to be cached but further discussion/thought needs to go into
this.
Closes#466.
this removes the following configure options:
* ZIG_LIBC_LIB_DIR
* ZIG_LIBC_STATIC_LIB_DIR
* ZIG_LIBC_INCLUDE_DIR
* ZIG_DYNAMIC_LINKER
* ZIG_EACH_LIB_RPATH
* zig's reliance on CMAKE_INSTALL_PREFIX
these options are still available as command line options, however,
the default will attempt to execute the system's C compiler to
collect system defaults for these values.
closes#870
* instead of `async(allocator) call()`, now it is
`async<allocator> call()`.
* Fixes syntax ambiguity when leaving off the allocator
* Fixes parse failure when call is a field access
This sets a precedent for using `<` to pass arguments
to a keyword. This will affect `enum`, `union`, and
`fn` (see #661)
* fix comptime slice of slice not preserving mutatibility
of the comptime data
* fix comptime slice of pointer not preserving mutability
of the comptime data
closes#826
coro return was reading from a value that coro await was
writing to. that wasn't how it was designed to work, it
was an implementation mistake.
this commit also has some work-in-progress code for fixing
error return traces across suspend points.
* @panic generates an error return trace
* printing an error return trace no longer interferes with
normal stack traces.
* instead of ignore_frame_count, we look at the return address
when you call panic, and that's the first stack trace function
makes stack traces much cleaner - the error return trace
flows gracefully into the stack trace