Commit Graph

1952 Commits (990db3c35a798a6e51dbbbc1696f3fe78c7a0faf)

Author SHA1 Message Date
Andrew Kelley 73fe5f63c6 add some sanity tests for float printing 2017-10-24 21:57:58 -04:00
Andrew Kelley 1e784839f1 Merge branch 'float-printing' of https://github.com/scurest/zig into better-float-printing 2017-10-24 21:44:49 -04:00
Andrew Kelley 1828f8eb8e fix missing compiler_rt in release modes
the optimizer was deleting compiler_rt symbols, so I changed
the linkage type from LinkOnce to Weak

also changed LinkOnce to mean linkonce_odr in llvm and
Weak to mean weak_odr in llvm.

See #563
2017-10-24 21:31:47 -04:00
scurest 262b7428cf More corrections to float printing
Testing suggests all f32s are now printed accurately.
2017-10-24 14:18:50 -05:00
Andrew Kelley 4f4da3c10c wip self hosted code 2017-10-24 10:08:20 -04:00
Andrew Kelley d7e28f991d remove CXX ABI workaround
the actual solution is you must compile zig with the same
compiler that compiled llvm, lld, and clang.

reverts 8d60ffe314
2017-10-23 22:37:59 -04:00
Andrew Kelley 643ab90ace add maximum value for @setAlignStack 2017-10-23 22:33:00 -04:00
scurest 03a0dfbeca Print better floats 2017-10-23 15:40:49 -05:00
Andrew Kelley 92751d5e24 self hosted zig: print usage 2017-10-21 17:31:06 -04:00
Andrew Kelley c1642355f0 parse-c: improve performance
previously we did linear search to find existing global
declarations; now we index using a hash map.

building tetris went from taking 5.3 sec to 0.76 sec
2017-10-21 16:46:33 -04:00
Andrew Kelley a1af7cbf00 report compile error instead of crashing for void in var args
See #557
2017-10-21 15:46:04 -04:00
Andrew Kelley 175893913d fix compiler crash regarding type name of undefined
See #547
2017-10-21 13:14:10 -04:00
Andrew Kelley 9b91c76088 std.fmt.format supports ints smaller than u8
closes #546

thanks to @Dimenus for the fix
2017-10-21 13:03:08 -04:00
Andrew Kelley b3d12d2c9e zig build: fix system libraries not respected for C artifacts
closes #550
2017-10-21 12:58:47 -04:00
Andrew Kelley 3c3af4b332 fix docs link 2017-10-17 16:05:46 -04:00
Andrew Kelley a27c0dd591 remove unsupported targets from readme
See #438
2017-10-17 14:15:50 -04:00
Andrew Kelley 78cb4ce030 Release 0.1.1 2017-10-17 08:50:00 -04:00
Andrew Kelley 79193ffed2 build: fix logic for version when there is a git tag 2017-10-17 08:47:27 -04:00
Andrew Kelley ad07c68504 Release 0.1.0 2017-10-17 08:42:52 -04:00
Marc Tiehuis 09c0cf2dcf Add c allocator (#542) 2017-10-17 08:13:04 -04:00
Andrew Kelley 0744c83f51 add uwtable attribute to functions on windows
See #516

now we have at least a callstack. we still need updated LLD
to get stack traces.
2017-10-17 01:41:26 -04:00
Andrew Kelley 5866032e76 fix codegen of enum name table having wrong LLVM types
See https://bugs.llvm.org/show_bug.cgi?id=34952
2017-10-16 18:10:28 -04:00
Andrew Kelley 38a947c683 appveyor: update version to match zig version 2017-10-16 13:01:34 -04:00
Andrew Kelley 1d88f9b9a6 appveyor: build with msvc and publish artifacts
See #540
2017-10-16 12:22:13 -04:00
Andrew Kelley cbb6d2239f look for libc at runtime on windows
See #539

before we close the issue we should also detect MSVC 2017
but this gets us started with supporting MSVC 2015
2017-10-16 12:21:46 -04:00
Andrew Kelley 8cfb0cfbce std.os.ChildProcess: on windows cwd affects exe search path
to match posix semantics

disabling non-passing build-examples tests. See #538
2017-10-16 02:30:03 -04:00
Andrew Kelley 4e2a5e6b13 fix regression on posix from previous commit 2017-10-16 01:16:51 -04:00
Andrew Kelley d08c57741a ability to make a DLL
See #302
2017-10-16 01:14:28 -04:00
Andrew Kelley 78b753af9d fix debug safety tests on windows
See #302
2017-10-16 00:20:51 -04:00
Andrew Kelley d6bfa3f639 fix compare-output tests on windows
the %a format specifier had different behavior so I
used %.013a instead to make it the same on all platforms
2017-10-15 23:52:13 -04:00
Andrew Kelley 2a08116788 LLD COFF: close handles to objects used to link
fixes test failures on windows
See #302

patch sent upstream:
http://lists.llvm.org/pipermail/llvm-dev/2017-October/118234.html
2017-10-15 22:09:25 -04:00
Andrew Kelley 562f91e875 clean up some resources 2017-10-15 21:06:04 -04:00
Andrew Kelley e3ad13e054 fix windows argument parsing 2017-10-15 20:19:15 -04:00
Andrew Kelley f87f98015c 16MB stack size when building with msvc
fixes crash when evaluating user code that hits the branch limit

See #302
2017-10-15 19:04:19 -04:00
Andrew Kelley c837ae1707 set stdout and stderr to binary mode on windows 2017-10-15 18:25:39 -04:00
Andrew Kelley fca1d53625 std.io: fix bug when writing large buffer 2017-10-15 17:10:06 -04:00
Andrew Kelley faf64b5d0f fix posix from previous commit 2017-10-15 16:47:29 -04:00
Andrew Kelley fcef7c4bb2 fix std.io.InStream for windows
now we handle PIPE_BROKEN as an EOF

also set up framework for debugging unexpected posix/windows errors
2017-10-15 16:45:43 -04:00
Andrew Kelley bb169a7b36 fix child process stdio piping behavior on windows 2017-10-15 16:03:32 -04:00
Andrew Kelley 1fe1e6eeaf mingw build: delete unused variable 2017-10-15 14:03:24 -04:00
Andrew Kelley a98373f144 use correct integer type for windows BOOL 2017-10-15 14:01:55 -04:00
Andrew Kelley 3c19883493 only SetConsoleTextAttribute to do console colors on windows 2017-10-15 12:15:32 -04:00
Andrew Kelley 6fe1c3186f disable some of the failing tests
See #537
2017-10-15 02:04:21 -04:00
Andrew Kelley 3b0fe534bc fix regression on posix from previous commit 2017-10-15 01:24:58 -04:00
Andrew Kelley 8ab5313043 implement environment variables for windows 2017-10-15 01:23:10 -04:00
Andrew Kelley 55e8bbd167 std.mem.IncrementingAllocator: check for errors 2017-10-15 01:22:36 -04:00
Andrew Kelley 9c44dd7db3 disable byval parameters on windows to work around llvm bug
See #536
2017-10-15 01:22:17 -04:00
Andrew Kelley ba405ed59b try harder to emit console colors 2017-10-14 20:31:47 -04:00
Andrew Kelley fd7654e4e8 build-exe allows direct export of WinMainCRTStartup 2017-10-14 20:12:15 -04:00
Andrew Kelley f54aff4672 implement io.OutStream.openMode for windows 2017-10-14 18:23:16 -04:00