Commit Graph

9 Commits

Author SHA1 Message Date
emekoi
6057513cc7 fixed visibility of zig_libc_cc_print_file_name 2019-04-27 16:17:07 -05:00
emekoi
dfada0cc77 added static_crt_dir to libc file 2019-04-27 00:24:26 -05:00
emekoi
0bd4901a17 fixed linking of system libraries on mingw 2019-04-04 21:07:02 -05:00
emekoi
8fdf8b6972 fixed libc command on mingw 2019-03-29 23:16:17 -05:00
Andrew Kelley
55a0016221
dynamic linker path is independent from libc installation 2019-03-05 16:00:28 -05:00
Andrew Kelley
0d10ab0680
stop linking against gcc files 2019-03-05 14:37:32 -05:00
Andrew Kelley
6365f5a9f3 introduce sys_include_dir for when sys/* files are not with stdlib.h 2019-02-26 17:26:34 -05:00
Andrew Kelley
0f54728cf0
fix not finding libgcc_s when looking for native libc
closes #2011
2019-02-25 19:10:48 -05:00
Andrew Kelley
6fd8d455bc
better libc detection (#1996)
* better libc detection

This introduces a new command `zig libc` which prints
the various paths of libc files. It outputs them to stdout
in a simple text file format that it is capable of parsing.
You can use `zig libc libc.txt` to validate a file.

These arguments are gone:
--libc-lib-dir [path]        directory where libc crt1.o resides
--libc-static-lib-dir [path] directory where libc crtbegin.o resides
--msvc-lib-dir [path]        (windows) directory where vcruntime.lib resides
--kernel32-lib-dir [path]    (windows) directory where kernel32.lib resides

Instead we have this argument:
--libc [file]                Provide a file which specifies libc paths

This is used to pass a libc text file (which can be generated with
`zig libc`). So it is easier to manage multiple cross compilation
environments.

`--cache on` now works when linking against libc.

`ZigTarget` now has a bool field `is_native`

Better error messaging when you try to link against libc or use
`@cImport` but the various paths cannot be found. It should also be
faster.

* save native_libc.txt in zig-cache

This avoids having to detect libc at runtime on every invocation.
2019-02-23 09:35:56 -05:00