aboutsummaryrefslogtreecommitdiff
path: root/src/os.cpp
AgeCommit message (Collapse)Author
2019-01-31os.cpp: fix regression on Windows from 59c050e7Andrew Kelley
2019-01-30collapse os_file_mtime into os_file_open_r and check for directoryAndrew Kelley
This is a manual merge of kristate's pull request #1754, due to conflicts + a couple fixups. closes #1754
2018-12-12freebsd: fix os_self_exe_path function and update std libAndrew Kelley
2018-11-27Merge branch 'master' into freebsd2Andrew Kelley
2018-11-26stage1: better file path handlingAndrew Kelley
* better message printed when cache hash fails * better handling of '/' as root source file * os_path_split parses '/' and '/a' correctly closes #1693 closes #1746
2018-11-19Merge branch 'freebsd-up' of https://github.com/myfreeweb/zig into freebsd2Andrew Kelley
2018-11-18src/os.cpp: os_file_read: return ErrorIsDir on case EISDIR;kristopher tate
2018-11-16Fixed typosVallentin
2018-11-08made colored output more consistent (#1706)emekoi
* made colored output more consistent * added os.supportsAnsiEscapeCodes
2018-11-06limit integer types to maximum bit width of 65535Andrew Kelley
closes #1541
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-20Add FreeBSD support to os.cppGreg V
2018-10-09stage1 os: workaround for macos not having environ variableAndrew Kelley
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-10-06Merge pull request #1429 from shawnl/arm64Andrew Kelley
initial arm64 support
2018-10-06arm64: respond to code reviewShawn Landden
2018-09-22rm extraneous macroJeff Fowler
2018-09-18minor cleanups from 68c1d05917Andrew Kelley
2018-09-18compiling on mingw is now supported (#1542)emekoi
* compiles on mingw-w64 * fixed error in os_file_overwrite on windows * fixed windows hello_world example
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-12windows os.cpp implementationsAndrew Kelley
2018-09-11darwin fixupsAndrew Kelley
2018-09-11Merge remote-tracking branch 'origin/master' into stage1-cachingAndrew Kelley
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-09`zig id` commandAndrew Kelley
2018-09-09basic compiler id hash workingAndrew Kelley
2018-09-08Fixes a path corruption when compiling on windows.Sahnvour
2018-09-08use vfork in stage1 compiler to avoid OOMShawn Landden
2018-09-04port std.os.path.resolve to stage1Andrew Kelley
2018-07-20self-hosted: share C++ code for finding libc on windowsAndrew Kelley
2018-06-26Fix os_path_join for case where dirname is emptyIsaac Hier
2018-06-18stage1: update darwin code to workaround old libc bugAndrew Kelley
See #1128
2018-06-18adjust logic for finding the path to zig executable on darwinAndrew Kelley
2018-06-18Fix 1117: Revise realpath scratch logicBodie Solomon
2018-06-18Fix 1117: Tweak realpath logic to use out_path as scratch spaceBodie Solomon
2018-06-18Fix 1117: Use realpath in stage1 Darwin os_self_exe_pathBodie Solomon
Issue: https://github.com/ziglang/zig/issues/1117 The macOS stage1 Zig compiler should look in Zig's real absolute path for the Zig stdlib, but os_self_exe_path looks in its path as returned by _NSGetExecutablePath, which may be a symlink. This means that a symlinked Zig cannot find the Zig stdlib. This patch fixes the issue by resolving the _NSGetExecutablePath result to the real path using realpath() before copying the result to the output path.
2018-04-22exit(1) instead of abort() for file not foundAndrew Kelley
2018-04-22fix windows build broken by previous commitAndrew Kelley
fixes build failure from 1c41f1ca6252faaa7750936c67562f1866a48075
2018-04-22better error reporting for missing libc on windowsAndrew Kelley
closes #931
2018-04-15fix linux implementation of self exe pathAndrew Kelley
closes #894
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-31implement os_self_exe_path in the c++ compiler for darwinAndrew Kelley
ported from the zig std lib this fixes looking for zig std lib at runtime on darwin
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-01-20remove unused function, fixes mingw buildAndrew Kelley
2018-01-19fix docgen on windowsAndrew Kelley
2018-01-19os_rename uses MoveFileEx on windowsAndrew Kelley
2018-01-19windows-compatible os_rename functionAndrew Kelley
windows libc rename() requires destination file path to not exist
2018-01-05workaround for microsoft releasing windows SDK with wrong versionAndrew Kelley
2017-12-04Fix the color of compiler messages for light-themed terminal.MIURA Masahiro