aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
AgeCommit message (Collapse)Author
2019-02-01introduce --single-threaded build optionAndrew Kelley
closes #1764 This adds another boolean to the test matrix; hopefully it does not inflate the time too much. std.event.Loop does not work with this option yet. See #1908
2018-12-26fixupsAndrew Kelley
2018-12-24fixed formatting in options displaynebulaeonline
2018-12-23fixed stricmp/strcasecmp between windows/posixnebulaeonline
2018-12-23msvc subsystem option handling; added uefi os typenebulaeonline
2018-11-19fix incorrect --help textAndrew Kelley
2018-11-02support building static self hosted compiler on macosAndrew Kelley
* add a --system-linker-hack command line parameter to work around poor LLD macho code. See #1535 * build.zig correctly handles static as well as dynamic dependencies when building the self hosted compiler. - no more unnecessary libxml2 dependency - a static build on macos produces a completely static self-hosted compiler for macos (except for libSystem as intended).
2018-10-09more efficient builtin library code generationAndrew Kelley
* introduce --disable-pic option which can generally be allowed to be the default. compiler_rt.a and builtin.a get this option when you build a static executable. * compiler_rt and builtin libraries are not built for build-lib --static * posix_spawn instead of fork/execv * disable the error limit on LLD. Fixes the blank lines printed
2018-09-30Fixes --emit asm on windows and makes C header file generation explicit. (#1612)Sahnvour
* build: only do codegen_link when emitting an actual binary. Fixes #1371 * build: only output C header file when explicitely asked to
2018-09-28zig build: use os_self_exe_path to determine exe path not arg0Andrew Kelley
2018-09-25stage1: Added `zig help` to show usage on stdoutJay Weisskopf
This will make it easier to do things like `zig help | grep something`. Invalid arguments will now display a short notice for `zig help` instead of showing the full usage information. This will make it easier to see the actual error.
2018-09-17remove `zig build --init`. add `zig init-lib` and `zig init-exe`Andrew Kelley
init-lib creates a working static library with tests, and init-exe creates a working hello world with a `run` target. both now have test coverage with the new "cli tests" file. closes #1035
2018-09-12fix zig build cache dir pathAndrew Kelley
2018-09-11rename --enable-timing-info to -ftime-report to match clangAndrew Kelley
and have it print llvm's internal timing info
2018-09-11bring back zig-cacheAndrew Kelley
we need somewhere to put .o files and leave them while the user executes their program, so that stack traces on MacOS can find the .o files and get at the DWARF info. if we try to clean up old global tmp dir files, first of all that's a hard and complicated problem, and secondly it's not clear how that is better than dumping the .o file inside zig-cache locally.
2018-09-11stage1: clean up timing report in test modeAndrew Kelley
2018-09-11ability to disable cache. off by default except for...Andrew Kelley
...zig run, zig build, compiler_rt.a, and builtin.a
2018-09-10stage1 caching: zig no longer uses zig-cacheAndrew Kelley
2018-09-10caching is workingAndrew Kelley
* add almost all the input parameter state to the hash - missing items are the detected MSVC installation on Windows and detected libc installation on POSIX - also missing are C files and .h files that libclang finds * artifacts are created in global cache directory instead of zig-cache. - exception: builtin.zig is still in zig-cache * zig run uses the new cache correctly * zig run uses execv on posix systems
2018-09-10stage1: always optimize blake and softfloat even in debug modeAndrew Kelley
2018-09-09`zig id` commandAndrew Kelley
2018-09-09basic compiler id hash workingAndrew Kelley
2018-09-05start creating a hash of input parametersAndrew Kelley
See #1416
2018-09-04port std.os.path.resolve to stage1Andrew Kelley
2018-07-10self-hosted: first passing testAndrew Kelley
* introduce std.atomic.Int * add src-self-hosted/test.zig which is tested by the main test suite - it fully utilizes the multithreaded async/await event loop so the tests should Go Fast * `stage2/bin/zig build-obj test.zig` is able to spit out an error if 2 exported functions collide * ability for `zig test` to accept `--object` and `--assembly` arguments * std.build: TestStep supports addLibPath and addObjectFile
2018-06-29support --emit in 'test' commandBen Noordhuis
Support the `--emit` switch in `zig --emit asm test file.zig`. The command fails because no tests run (no executable is created) but it emits the requested file. That seems like a good tradeoff.
2018-06-17remove integer and float casting syntaxAndrew Kelley
* add `@intCast` * add `@floatCast` * add `@floatToInt` * add `@intToFloat` See #1061
2018-06-07langref: automatic update of builtin.zigAndrew Kelley
now the docs can't get out of date for this See #367
2018-04-18add --no-rosegment cli optionAndrew Kelley
this provides a workaround for #896 until valgrind adds support for clang/LLD (equivalent to gcc/gold -rosegment)
2018-04-16Added ReleaseSmall modeAlexandros Naskos
2018-04-13fix regression with zig install dirAndrew Kelley
introduced in 1999f0daad505
2018-04-13Merge pull request #915 from zig-lang/self-hosted-cliAndrew Kelley
Revise self-hosted command line interface
2018-04-13fix undefined behavior triggered by fn inline testAndrew Kelley
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.
2018-04-12remove --zig-install-prefix arg now that we find std at runtimeAndrew Kelley
2018-04-01Add run compiler commandMarc Tiehuis
'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.
2018-03-30find libc and zig std lib at runtimeAndrew Kelley
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
2018-03-28non-zero exit when build.zig cannot be createdBen Noordhuis
Make the stage 1 compiler exit with a non-zero status code when `zig build --init` cannot create a new build.zig file.
2018-02-08Merge remote-tracking branch 'origin/master' into error-setsAndrew Kelley
2018-02-07improve behavior of `zig build` (#754)Jeff Fowler
See #748
2018-02-04add --forbid-libraryAndrew Kelley
to help track down accidentally linking against a library
2018-01-19all doc code examples are now testedAndrew Kelley
improve color scheme of docs make docs depend on no external files fix broken example code in docs closes #465
2018-01-06Darwin -> MacOSX, added Zen. See #438Andrea Orru
2018-01-04update windows build to llvm 5.0.1Andrew Kelley
llvm-config.exe does not handle diaguids.lib for us so we have to duplicate the work.
2018-01-03self-hosted build: use llvm-config from stage1Andrew Kelley
2018-01-03build: std files and c header files are only specified onceAndrew Kelley
In the CMakeLists.txt file. And then we communicate the list to the zig build.
2018-01-03fix self hosted compiler on windowsAndrew Kelley
2017-12-26self-hosted: build against zig_llvm and embedded LLDAndrew Kelley
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.
2017-11-24rename "parsec" to "translate-c"Andrew Kelley
2017-11-07std.io: introduce buffered I/O and change APIAndrew Kelley
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.
2017-11-03Add emit command-line option (#580)Marc Tiehuis
Add emit command-line option