2305 Commits

Author SHA1 Message Date
Andrew Kelley
d694f298d8
Merge pull request #2958 from emekoi/mingw-cmake
fix backtraces on mingw
2019-07-29 16:27:35 -04:00
Evan Krause
a0ebfa64d9 support zero-sized structs in zig.fmt.format 2019-07-28 18:37:35 -07:00
Nick Erdmann
6e8ef5b6f2
std/build.zig: add checks for UEFI 2019-07-29 00:21:21 +02:00
emekoi
10b1017702 fixed backtraces when linking libc on mingw 2019-07-27 17:50:44 -05:00
Andrew Kelley
ee64a22045
add the anyframe and anyframe->T types 2019-07-26 19:52:35 -04:00
Joachim Henke
74abc5ad2f avoid a register copy when fetching the stack pointer in _start 2019-07-26 17:12:42 -04:00
Timon Kruiper
59850c1ce1 Fixed an integer overflow in zig fmt and added testcase 2019-07-23 14:51:30 -04:00
Andrew Kelley
317d1ecb2c
Merge remote-tracking branch 'origin/master' into rewrite-coroutines 2019-07-22 14:37:08 -04:00
Andrew Kelley
16be70cbbf
compiler-rt: add __muldi3 2019-07-22 12:49:26 -04:00
Andrew Kelley
bc31c1280e
disable segfault handler when panicking
this prevents a segfault in stack trace printing to activate the
segfault handler.
2019-07-22 12:41:59 -04:00
Andrew Kelley
5b69a9cd83
disable segfault handler when panicking
this prevents a segfault in stack trace printing to activate the
segfault handler.
2019-07-22 12:15:16 -04:00
Andrew Kelley
d6d0bb0542
zig build: adjust DESTDIR logic
now if DESTDIR is provided then the default install prefix is /usr.
otherwise the default install prefix is still zig-cache directly.

DESTDIR is prepended to the prefix to match what make install does.
2019-07-22 10:45:59 -04:00
Andrew Kelley
78e03c466c
simple async function passing test 2019-07-21 19:56:37 -04:00
Andrew Kelley
77c2ac3fcd
zig build: support DESTDIR environment variable
closes #2929
2019-07-21 18:04:23 -04:00
Andrew Kelley
54e716afdc
remove coroutines implementation and promise type 2019-07-19 18:18:44 -04:00
Andrew Kelley
8ea8cff491
slightly simpler implementation 2019-07-19 17:54:06 -04:00
Benjamin Feng
484f8a4cc2
Switch old switch / @TagType() to use inferred enums 2019-07-19 17:11:58 -04:00
Benjamin Feng
4708fb23c0
Generate parse error from && 2019-07-19 17:11:58 -04:00
Benjamin Feng
d4ff27180b
Tokenize '&&' as AmpersandAmpersand 2019-07-19 17:11:58 -04:00
Andrew Kelley
1d07bbbef2
zig build: add valgrind cli options 2019-07-18 20:03:38 -04:00
dimenus
d64bd30690 fixed slice length in getEnvVarOwned 2019-07-17 12:13:50 -04:00
Vexu
34d2a1465c
Merge branch 'master' into fmt-comment-fix 2019-07-17 01:22:20 +03:00
Vexu
f8e753e19c
Merge branch 'master' into comment-in-array 2019-07-17 01:20:59 +03:00
Andrew Kelley
741c74e427
cleanups 2019-07-16 11:50:00 -04:00
Andrew Kelley
45cc488cef
Merge branch 'main-return-!u8' of https://github.com/SamTebbs33/zig into SamTebbs33-main-return 2019-07-16 11:27:11 -04:00
Andrew Kelley
3f4abe97bd
Merge pull request #2892 from ziglang/install-with-zig-build
move some of the installation from cmake to zig build
2019-07-15 20:46:12 -04:00
Andrew Kelley
aff90c2252
avoid shipping junk files
I did a diff of the shipped file list with master branch and it looks
good after this commit.
2019-07-15 20:35:34 -04:00
Nick Erdmann
33eaaadd01 fix documentation of assert 2019-07-15 19:52:07 -04:00
Andrew Kelley
eaf545e24c fix build on windows 2019-07-15 19:50:56 -04:00
Andrew Kelley
c3d20373ee
std.unicode.utf8ToUtf16Le: improve performance
on a simple test input:

original utf8ToUtf16Le: elapsed: 111384483 ns (111 ms)
new utf8ToUtf16Le: elapsed: 138570 ns (0 ms)

it's 800x faster in debug mode and ~4500x faster in release-fast mode.

this was slowing down installation of files on windows in build scripts.
2019-07-15 19:35:10 -04:00
Andrew Kelley
49d1a4c562 move lib dirs to lib subdir
also start prefering NtDll API. so far:
 * NtQueryInformationFile
 * NtClose

adds a performance workaround for windows unicode conversion. but that
should probably be removed before merging
2019-07-15 17:54:50 -04:00
Andrew Kelley
51a3938b04 fix the build on macos
Stat structs gain methods to abstract over the platform differences with
regards to mtime, ctime, atime.
2019-07-15 12:28:39 -04:00
Andrew Kelley
6237380b01
fix the build on linux 2019-07-15 01:45:26 -04:00
Andrew Kelley
b23ace27db
fix the build on windows 2019-07-15 01:45:26 -04:00
Andrew Kelley
aa170a7eff
implement std.fs.File.updateTimes for windows 2019-07-15 01:45:26 -04:00
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