Commit Graph

2114 Commits

Author SHA1 Message Date
Andrew Kelley
95fdff3feb std.fs.updateFile: make path if necessary 2019-07-15 01:45:26 -04:00
Andrew Kelley
6096dc5f94 move some of the installation from cmake to zig build
This moves the installation of shipped source files from large
CMakeLists.txt lists to zig build recursive directory installation.

On my computer a cmake `make install` takes 2.4 seconds even when it has
to do nothing, and prints a lot of unnecessary lines to stdout that say
"up-to-date: [some file it is installing]".

After this commit, the default output of `make` is down to 1
second, and it does not print any junk to stdout. Further, a `make
install` is no longer required and `make` is sufficient.

This closes #2874.

It also closes #2585. `make` now always invokes `zig build` for
installing files and libuserland.a, and zig's own caching system makes
that go fast.
2019-07-15 01:45:26 -04:00
andersfr
69129c2e93 Intentional wraparound used + 2019-07-13 13:59:15 +02:00
andersfr
9684c99dd3 Proper use of @truncate instead of @intCast 2019-07-13 13:59:15 +02:00
andersfr
0619b525b9 Better testing and bugfix in hashUint* functions 2019-07-13 13:59:15 +02:00
andersfr
dfbe65e8cd Ported CityHash and Murmur hashing algorithms to native zig 2019-07-13 13:59:15 +02:00
Andrew Kelley
107e57484f Merge pull request #2868 from ziglang/windows-libc
provide a libc for windows using mingw-w64
2019-07-12 18:12:27 -04:00
Andrew Kelley
3621d54e57 handle mingw libc defs better
also zig build handles --verbose and linkSystemLibrary better
2019-07-12 17:25:25 -04:00
Andrew Kelley
2f8983e2f6 update zig build system for mingw static lib conventions 2019-07-12 15:10:32 -04:00
daurnimator
52f0300505 std: add new linux 5.2 constants 2019-07-12 11:52:32 -04:00
Andrew Kelley
3714d524c3 add some more windows defs 2019-07-10 19:40:46 -04:00
Andrew Kelley
67f3bc9101 mingw: building and linking msvcrt-os.lib 2019-07-10 16:19:51 -04:00
Andrew Kelley
ae2345b742 zig build: add standardTargetOptions and deprecate setTarget
in favor of setTheTarget
2019-07-09 13:31:42 -04:00
Andrew Kelley
eebb00193d zig build: install .pdb files along with binaries
closes #2848
2019-07-08 18:48:03 -04:00
Andrew Kelley
1d2fc446bd cap getdents length argument to INT_MAX
the linux syscall treats this argument as having type int, so passing
extremely long buffer sizes would be misinterpreted by the kernel.
since "short reads" are always acceptable, just cap it down.

patch based on musl commit 3d178a7e2b75066593fbd5705742c5808395d90d
2019-07-08 17:52:28 -04:00
Andrew Kelley
fc9e28ea37 std.os.getrandom does a libc version check
closes #397
2019-07-08 14:42:28 -04:00
Andrew Kelley
56d8185650 expose glibc version in builtin 2019-07-07 17:56:43 -04:00
Andrew Kelley
336ddb8011 add -target-glibc to cli help and zig build 2019-07-07 17:56:43 -04:00
Andrew Kelley
d39dcd6d9d zig build: add setLibCFile API 2019-07-07 11:31:07 -04:00
Andrew Kelley
38ba412729 Merge pull request #2837 from daurnimator/linux-AT_
std: improvements to linux constants
2019-07-07 09:53:05 -04:00
daurnimator
111e5ed0a2 std: MAP_FAILED is a libc concept on linux 2019-07-07 17:15:30 +10:00
daurnimator
e197968734 std: Make linux MAP_ definitions match kernel 2019-07-07 14:31:27 +10:00
daurnimator
7610d39413 std: Linux AT_ constants are the same across architectures 2019-07-07 14:11:43 +10:00
hryx
cce11a724c Make anyerror not a keyword 2019-07-06 15:57:32 -07:00
Andrew Kelley
21c60922e3 Merge pull request #2823 from hryx/unicode-escape
Unicode escapes: support u{N...}
2019-07-06 13:14:43 -04:00
hryx
7f618184ad Prevent unreachable when file ends with struct field 2019-07-06 13:09:07 -04:00
Andrew Kelley
9471f16c79 zig fmt ignores "zig fmt: off" directive for whitespace fixes 2019-07-05 15:09:22 -04:00
Andrew Kelley
4f43a4b30f zig fmt: fix whitespace
closes #2819
closes #2825
2019-07-05 14:46:21 -04:00
Andrew Kelley
5b42c76951 code formatting 2019-07-05 14:14:25 -04:00
Andrew Kelley
3ad9349f09 add std.os.windows.subsystem
The original issue that #2445 wanted to fix was solved in the previous
commit. However it also exposed the subsystem in the standard library,
which is still useful. So that's done in this commit, and #2445 can be
closed.
2019-07-05 14:08:56 -04:00
Andrew Kelley
0d84d52e37 std.os.abort no longer calls msvcrt abort() when linking libc
closes #2071
2019-07-05 12:53:36 -04:00
hryx
8365a7aab4 Unicode escapes: stage2 tokenizer and parser test 2019-07-04 14:48:23 -07:00
Andrew Kelley
72800f176e zig build: search upwards for build.zig file
closes #2587
2019-07-04 17:44:33 -04:00
Andrew Kelley
a8b3b5f11c zig build: install is now the default step; default prefix is zig-cache
closes #2817
2019-07-04 15:32:44 -04:00
emekoi
9e3189f1f4 forward error code on non-exits 2019-07-03 23:48:42 -05:00
emekoi
d8135c9e6e forward error code build.zig 2019-07-03 23:48:42 -05:00
Andrew Kelley
d1cda00b36 workaround for no equality operator for enum literal and tagged union 2019-07-03 18:41:52 -04:00
emekoi
53ca4118bd added segfault handler support for windows 2019-07-03 14:02:48 -04:00
Andrew Kelley
b84ff1dd32 update the default panic handler on freestanding
Now the infinite loop has a `@breakpoint()` in there.
2019-07-02 19:44:49 -04:00
emekoi
9d42a40a9f return FileNotFound for PATH_NOT_FOUND in DeleteFileW 2019-07-02 14:49:48 -04:00
Andrew Kelley
06733c3ff5 Merge pull request #2788 from emekoi/pdb-fix
fixed coff header parsing
2019-07-02 14:48:45 -04:00
Andrew Kelley
1a1598c58c stack traces on segfault by default for linux-x86_64
closes #2355
2019-07-02 13:41:16 -04:00
Marc Tiehuis
0dd2e93e4c Update for new fmt.zig formatting 2019-06-30 22:25:03 +12:00
emekoi
027517a0c9 added init function for Coff 2019-06-29 13:56:23 -05:00
emekoi
92b68c57b3 fix formatting 2019-06-29 13:21:27 -04:00
emekoi
b780dee3e8 initialize sections in openSelfDebugInfoWindows 2019-06-28 18:22:02 -05:00
emekoi
fbb0c8d639 fixed debug info on windows 2019-06-28 17:59:34 -05:00
Andrew Kelley
4b7e04f75a rename std/special/bootstrap.zig to std/special/start.zig 2019-06-28 02:00:56 -04:00
Andrew Kelley
ae72a98224 Merge pull request #2775 from SamTebbs33/alignment-docs
Add doc comments to alignment functions
2019-06-27 20:37:28 -04:00
Andrew Kelley
69c7c5de09 fixups
* better detection for already seen packages
 * "root" instead of "@root"
2019-06-27 19:15:33 -04:00