Commit Graph

5762 Commits (bf7b6fbbdb7d28c0d7dba3e17c46ce156712cfc8)

Author SHA1 Message Date
Andrew Kelley 9a9a7daef0
Merge branch 'SamTebbs33-main-return' 2019-07-16 11:50:17 -04: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
emekoi 0435026474 fixed size of ZigClangAPValue on mingw-w64 2019-07-16 09:34:02 -04:00
Andrew Kelley 68149f2039
fix gitattributes 2019-07-16 00:05:12 -04:00
Andrew Kelley 5345044edf
Merge branch 'hryx-translate-c-userland' 2019-07-16 00:01:31 -04:00
Andrew Kelley 776423bbf7
fix result location alignment in ir_render_call 2019-07-15 23:44:44 -04:00
Andrew Kelley 6fe3b20962
Merge branch 'translate-c-userland' of https://github.com/hryx/zig into hryx-translate-c-userland 2019-07-15 22:19:54 -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 851a7288a9
mingw libc can link against ntdll 2019-07-15 18:25:13 -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 0cd660462f
move install_files.h to not be generated code 2019-07-15 01:47:26 -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 40a562f26d
cmake: fix incorrect dependencies 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
Andrew Kelley 7d9ee5d6d5
Merge pull request #2882 from andersfr/hash-branch
Implementation of MurmurHash and CityHash
2019-07-13 20:08:18 -04:00
emekoi 1547692d18 fixed static linking on mingw-w64 2019-07-13 20:05:13 -04:00
Andrew Kelley 9c39d5720f
ir: add an assertion in phi analysis 2019-07-13 18:38:52 -04:00
Andrew Kelley c0489abcdb
translate-c: fix incorrectly translated double function pointer
closes #2887
2019-07-13 12:38:10 -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
emekoi bdfb31420a fixed compilation on mingw-w64 2019-07-12 19:40:51 -04: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 39b850c6cf
mingw libc: delete dead linker code regarding using system libc 2019-07-12 18:10:53 -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 5a62ab3ef1
fix build.zig 2019-07-12 16:14:54 -04:00
Andrew Kelley 2f8983e2f6
update zig build system for mingw static lib conventions 2019-07-12 15:10:32 -04:00
Andrew Kelley 7b8ba871a9
mingw libc: solve the segfault having to do with destructors
* fixed --verbose-cc printing an extra "zig" before the rest of
   the command line
 * windows-gnu targets use libfoo.a, foo.o extensions to match mingw
   conventions.
2019-07-12 14:44:34 -04:00
Andrew Kelley 4e58855a4a
translate-c: better detection of pointer to struct demoted to opaque 2019-07-12 12:11:26 -04:00
daurnimator 52f0300505 std: add new linux 5.2 constants 2019-07-12 11:52:32 -04:00
thomas 02b1aea291 fix typo in help text for bundle-compiler-rt 2019-07-12 10:23:39 -04:00
Andrew Kelley d9c4c96bf2
add -Wno-pragma-pack when targeting windows-gnu
windows.h has files such as pshpack1.h which do #pragma packing,
triggering a clang warning. So for this target, this warning is
disabled.

this commit also improves the error message printed when no libc can be
used, printing the "zig triple" rather than the "llvm triple".
2019-07-11 23:48:13 -04:00
Michael Dusan 1766bd8a08 doc clarify struct size and ABI-alignment 2019-07-11 20:36:30 -04:00
Andrew Kelley c7a976972f
funding: I've been accepted into the GitHub Sponsors program 2019-07-11 13:00:39 -04:00
Andrew Kelley b4bbfe8c05
the msvc target abi will have to be solved a different way 2019-07-11 12:56:51 -04:00
Andrew Kelley e0670557b4 fix windows not able to build mingw 2019-07-10 20:20:53 -04:00
Andrew Kelley 3714d524c3
add some more windows defs 2019-07-10 19:40:46 -04:00
Andrew Kelley 2bb93784c6
mingw: build and link mingwex.lib
zig can now cross compile hello.c targeting windows
2019-07-10 17:41:34 -04:00
dimenus 540a40e2d9 fixing non system library linking 2019-07-10 15:37:25 -05:00
Andrew Kelley 67f3bc9101
mingw: building and linking msvcrt-os.lib 2019-07-10 16:19:51 -04:00