Commit Graph

24 Commits

Author SHA1 Message Date
Andrew Kelley
b01c50d6fa find libc and zig std lib at runtime
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-03-30 17:10:54 -04:00
Andrew Kelley
1b120d1e49 update windows build to llvm 5.0.1
llvm-config.exe does not handle diaguids.lib for us so we have to
duplicate the work.
2018-01-04 22:46:26 -05:00
Andrew Kelley
477e3f64fc self-hosted build: use llvm-config from stage1 2018-01-03 21:32:50 -05:00
Andrew Kelley
5a800db48c build: std files and c header files are only specified once
In the CMakeLists.txt file. And then we communicate the list
to the zig build.
2018-01-03 19:39:04 -05:00
Andrew Kelley
36ff26609b fix self hosted compiler on windows 2018-01-03 04:55:49 -05:00
Andrew Kelley
6fece14cfb self-hosted: build against zig_llvm and embedded LLD
Now the self-hosted compiler re-uses the same C++ code for interfacing
with LLVM as the C++ code.
It also links against the same LLD library files.
2017-12-26 19:44:08 -05: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
1962c8588f implement standard library path search
closes #463
See #302
2017-10-01 18:30:31 -04:00
Andrew Kelley
0227becb56 build: escape backslashes in path arguments given to cmake 2017-10-01 14:01:18 -04:00
Andrew Kelley
6c7e975b75 remove remnants of depending on darwin system linker 2017-08-28 03:31:57 -04:00
Andrew Kelley
7efa2cd81c add --each-lib-rpath option and corresponding config option
This adds an rpath entry for each used dynamic library directory.
This is necessary on some systems such as NixOS.
2017-03-13 13:11:55 -04:00
Andrew Kelley
d10bbd28e9 use lld instead of system linker 2017-03-13 11:54:56 -04:00
Andrew Kelley
9f23475b17 add missing copyright notices 2016-12-04 21:06:13 -05:00
Andrew Kelley
3f05fdc8e8 tests: use a more robust path to self_hosted.zig
closes #184
2016-09-14 03:10:56 -04:00
Andrew Kelley
26718a619c recognize ar program and pass --gc-sections to ld
See #54
2016-05-11 14:44:10 -07:00
Andrew Kelley
984e7d6cc7 first pass at linking on macos 2016-02-15 20:56:52 -07:00
Andrew Kelley
2bf6c28bc3 ability to cross compile
hello_libc.zig can produce a windows build
2016-02-11 01:33:27 -07:00
Andrew Kelley
430d0dfcb2 support static linking against libc 2016-02-08 00:50:51 -07:00
Andrew Kelley
7af59c76e4 build: fix libc path finding 2016-02-02 15:04:14 -07:00
Andrew Kelley
8d60ffe314 solve the mystery of undefined reference error
big surprise, C++ is to blame
2016-01-15 17:12:26 -07:00
Andrew Kelley
f5a3281877 when linking with libc use the C runtime library 2015-12-15 12:44:42 -07:00
Andrew Kelley
0dbee2300e add inline assembly support 2015-12-10 15:34:38 -07:00
Andrew Kelley
face8d65a8 parseh: add c header files 2015-12-08 17:51:59 -07:00
Andrew Kelley
50f0ed918c link against LLVM 2015-08-05 15:23:15 -07:00