aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
AgeCommit message (Collapse)Author
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
2017-11-01windows: use the same libc search within a compilation unitAndrew Kelley
2017-11-01WIN32: Linking with the CRT at runtime. (#570)Dimenus
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)
2017-10-27Merge branch 'master' into self-hostedAndrew Kelley
2017-10-25cleaner verbose flags and zig build prints failed commandAndrew Kelley
2017-10-24wip self hosted codeAndrew Kelley
2017-10-16look for libc at runtime on windowsAndrew Kelley
See #539 before we close the issue we should also detect MSVC 2017 but this gets us started with supporting MSVC 2015
2017-10-15clean up some resourcesAndrew Kelley
2017-10-01fix regression from previous commitAndrew Kelley
2017-10-01implement standard library path searchAndrew Kelley
closes #463 See #302
2017-10-01fix implementation of --zig-std-dirAndrew Kelley
see #463
2017-09-30better divTrunc codegenAndrew Kelley
branch and phi instead of select instruction fixes division test for windows. See #302
2017-09-30zig test on 64-bit windows runs 32-bit testsAndrew Kelley
2017-09-30better output for cross platform zig test on windowsAndrew Kelley
2017-09-18add --verbose-link optionAndrew Kelley
only prints the link line
2017-09-17add -mllvm supportAndrew Kelley
useful for debugging crashes in llvm optimizer
2017-09-17add option to run tests in LLDB and turn it on for macos travisAndrew Kelley
2017-09-17Add dash arguments for cliMarc Tiehuis
2017-09-05rename parseh to parsecAndrew Kelley
2017-09-02rewrite parseh to use AST instead of direct typesAndrew Kelley
some tests still failing
2017-08-31add windows to test targetsAndrew Kelley
cross-compiling hello world with no libc for windows is working
2017-08-30test suite cross-compile builds tests for other targetsAndrew Kelley
2017-08-28remove remnants of depending on darwin system linkerAndrew Kelley
2017-08-20move docs to websiteAndrew Kelley
2017-08-20more zenAndrew Kelley
2017-08-20move zen of zig to a sub commandAndrew Kelley
2017-06-14progress toward windows hello world workingAndrew Kelley
2017-05-02add safe release build modeAndrew Kelley
closes #288
2017-05-01basic support for specifying packages at the command lineAndrew Kelley
See #226
2017-05-01`@import("builtin")` instead of `@compileVar`Andrew Kelley
See #226 Closes #220
2017-04-30zig build: organize build artifactsAndrew Kelley
closes #328
2017-04-28zig puts temporary object files in zig-cache folderAndrew Kelley
See #298
2017-04-27zig test no longer requires a separate test_runner.o fileAndrew Kelley
See #298
2017-04-26build system: consolidate duplicate code and moreAndrew Kelley
* add ability to add assembly files when building an exe, obj, or lib * add implicit cast from `[N]T` to `?[]const T` (closes #343) * remove link_exe and link_lib in favor of allowing build_exe and build_lib support no root zig source file
2017-04-25add some timing diagnosticsAndrew Kelley
pass --enable-timing-info to print a nice table like this: ``` Name Start End Duration Percent Initialize 0.0000 0.0000 0.0000 0.0001 Semantic Analysis 0.0000 0.0421 0.0420 0.2109 Code Generation 0.0421 0.0620 0.0200 0.1003 LLVM Emit Object 0.0620 0.1852 0.1231 0.6180 Build Dependencies 0.1852 0.1974 0.0122 0.0615 LLVM Link 0.1974 0.1993 0.0018 0.0093 Generate .h 0.1993 0.1993 0.0000 0.0000 Total 0.0000 0.1993 0.1993 1.0000 ```
2017-04-24better stack traces for ELF x86_64Andrew Kelley
2017-04-23make undefined as a constant value lazyAndrew Kelley
closes #268
2017-04-21zig build system supports building a libraryAndrew Kelley
See #329 Supporting work: * move std.cstr.Buffer0 to std.buffer.Buffer * add build.zig to example/shared_library/ and add an automated test for it * add std.list.List.resizeDown * improve std.os.makePath - no longer recursive - takes into account . and .. * add std.os.path.isAbsolute * add std.os.path.resolve * reimplement std.os.path.dirname - no longer requires an allocator - handles edge cases correctly
2017-04-19test framework supports name prefix and filter argumentAndrew Kelley
rename self hosted tests to behavior tests
2017-04-19update zig build help text when no build.zig foundAndrew Kelley
2017-04-19convert compare-output tests to use zig build systemAndrew Kelley
2017-04-17improvements to zig build system and unwrap error safetyAndrew Kelley
* zig build system: create standard dynamic library sym links * unwrapping an error results in a panic message that contains the error name * rename error.SysResources to error.SystemResources * add std.os.symLink * add std.os.deleteFile
2017-04-13zig build system understands the concept of dependenciesAndrew Kelley
See #204
2017-04-11zig build system writes template build.zig file when none existsAndrew Kelley
see #204
2017-04-06Update zig build system to support user defined optionsAndrew Kelley
* Fix assertion failure when switching on type. Closes #310 * Update zig build system to support user defined options. See #204 * fmt.format supports {sNNN} to set padding for a buffer arg. * add std.fmt.bufPrint and std.fmt.allocPrint * std.hash_map.HashMap.put returns the previous value * add std.mem.startsWith
2017-04-05add support to use zig as a linker driverAndrew Kelley
closes #243 I also added --grep to ./run_tests if you want to single out some specific tests
2017-04-05ability to use zig as an assemblerAndrew Kelley
see #243
2017-04-04zig build system: delete ./build file on successAndrew Kelley
see #204
2017-04-04zig build system improvements, add some std APIAndrew Kelley
* add std.buf_map.BufMap * add std.buf_set.BufSet * add std.mem.split * zig build system improvements (See #204) - automatically parses NIX_CFLAGS_COMPILE and NIX_LDFLAGS - add builder.addCIncludePath - add builder.addRPath - add builder.addLibPath - add exe.linkLibrary