| Age | Commit message (Collapse) | Author |
|
* add `@intCast`
* add `@floatCast`
* add `@floatToInt`
* add `@intToFloat`
See #1061
|
|
now the docs can't get out of date for this
See #367
|
|
this provides a workaround for #896
until valgrind adds support for clang/LLD
(equivalent to gcc/gold -rosegment)
|
|
|
|
introduced in 1999f0daad505
|
|
Revise self-hosted command line interface
|
|
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.
|
|
|
|
'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
|
|
Make the stage 1 compiler exit with a non-zero status code
when `zig build --init` cannot create a new build.zig file.
|
|
|
|
See #748
|
|
to help track down accidentally linking against a library
|
|
improve color scheme of docs
make docs depend on no external files
fix broken example code in docs
closes #465
|
|
|
|
llvm-config.exe does not handle diaguids.lib for us so we have to
duplicate the work.
|
|
|
|
In the CMakeLists.txt file. And then we communicate the list
to the zig build.
|
|
|
|
Now the self-hosted compiler re-uses the same C++ code for interfacing
with LLVM as the C++ code.
It also links against the same LLD library files.
|
|
|
|
I started working on #465 and made some corresponding std.io
API changes.
New structs:
* std.io.FileInStream
* std.io.FileOutStream
* std.io.BufferedOutStream
* std.io.BufferedInStream
Removed:
* std.io.File.in_stream
* std.io.File.out_stream
Now instead of &file.out_stream or &file.in_stream to get access to
the stream API for a file, you get it like this:
var file_in_stream = io.FileInStream.init(&file);
const in_stream = &file_in_stream.stream;
var file_out_stream = io.FileOutStream.init(&file);
const out_stream = &file_out_stream.stream;
This is evidence that we might not need any OOP features -
See #130.
|
|
Add emit command-line option
|
|
|
|
Disclaimer: Forgive me if my format sucks, I've never submitted a PR before!
Fixes: #517
I added a few things to allow zig to link with the CRT properly both statically and dynamically. In Visual Studio 2017, Microsoft changed how the c-runtime is factored again. With this change, they also added a COM interface to allow you to query the respective Visual Studio instance for two of them. This does that and also falls back on a registry query for 2015 support. If you're using a Visual Studio instance older than 2015, you'll have to use the existing options available with the zig compiler. Changes are listed below along with a general description of the changes.
all_types.cpp:
The separate variables for msvc/kern32 have been removed and all win32 libc directory paths have been combined into a ZigList since we're querying more than two directories and differentiating one from another doesn't matter to lld.
analyze.cpp:
The existing functions were extended to support querying libc libs & libc headers at runtime.
codegen.cpp/hpp:
Microsoft uses the new 'Universal C Runtime' name now. Doesn't matter from a functionality standpoint. I left the compiler switches as is to not introduce any breaking changes.
link.cpp:
We're linking 4 libs and generating another in order to support the UCRT.
Dynamic: msvcrt/d, vcruntime/d, ucrt/d, legacy_stdio_definitions.lib
Static: libcmt/d, libvcruntime/d libucrt/d, legacy_stdio_definitions.lib
main.cpp:
Update function call names.
os.cpp/hpp:
COM/Registry interface for querying Windows UCRT/SDK.
Sources:
[Windows CRT](https://docs.microsoft.com/en-us/cpp/c-runtime-library/crt-library-features)
[VS 2015 Breaking Changes](https://msdn.microsoft.com/en-us/library/bb531344.aspx)
|
|
|
|
|
|
|
|
See #539
before we close the issue we should also detect MSVC 2017
but this gets us started with supporting MSVC 2015
|
|
|
|
|
|
closes #463
See #302
|
|
see #463
|
|
branch and phi instead of select instruction
fixes division test for windows. See #302
|
|
|
|
|
|
only prints the link line
|
|
useful for debugging crashes in llvm optimizer
|
|
|
|
|
|
|
|
some tests still failing
|
|
cross-compiling hello world with no libc for windows is working
|
|
|
|
|
|
|
|
|
|
|
|
|