aboutsummaryrefslogtreecommitdiff
path: root/src/libc_installation.cpp
AgeCommit message (Collapse)Author
2019-06-17Remove duplicate exe name with zig runJonathan Marler
2019-05-15fix static builds of zig from requiring c compilerAndrew Kelley
to be installed when linking libc. When zig links against libc, it requires a dynamic linker path. Usually this can be determined based on the architecture and operating system components of the target. However on some systems this is not correct; because of this zig checks its own dynamic linker. When zig is statically linked, this information is not available, and so it resorts to using cc -print-filename=foo to find the dynamic linker path. Before this commit, Zig incorrectly exited with an error if there was no c compiler installed. Now, Zig falls back to the dynamic linker determined based on the arch and os when no C compiler can be found.
2019-04-29fix build (unused function warning)Andrew Kelley
d3c88a89 needed some #ifdefs shuffled around
2019-04-29Merge pull request #2139 from emekoi/lib-on-mingwAndrew Kelley
implement linking to libc on mingw
2019-04-27fixed visibility of zig_libc_cc_print_file_nameemekoi
2019-04-27added static_crt_dir to libc fileemekoi
2019-04-24remove Shebang (#!) supportShawn Landden
Closes: #2165
2019-04-05stage1: fix debug builds on macOSAndrew Kelley
2019-03-29fixed libc command on mingwemekoi
2019-03-13breaking: remove --static; add -dynamicAndrew Kelley
`--static` is no longer an option. Instead, Zig makes things as static as possible by default. `-dynamic` can be used to choose a dynamic library rather than a static one. `--enable-pic` is a new option. Usually it will be enabled automatically, but in the case of build-exe with no dynamic libraries on Linux or freestanding, Zig chooses off by default. closes #1703 closes #1828
2019-03-05dynamic linker path is independent from libc installationAndrew Kelley
2019-03-05stop linking against gcc filesAndrew Kelley
2019-02-27stage1: fix unused function error on freebsd and netbsdAndrew Kelley
closes #2012 closes #2013
2019-02-26introduce sys_include_dir for when sys/* files are not with stdlib.hAndrew Kelley
2019-02-26fix regressions on WindowsAndrew Kelley
2019-02-26breaking changes to the way targets work in zigAndrew Kelley
* CLI: `-target [name]` instead of `--target-*` args. This matches clang's API. * `builtin.Environ` renamed to `builtin.Abi` - likewise `builtin.environ` renamed to `builtin.abi` * stop hiding the concept of sub-arch. closes #1526 * `zig targets` only shows available targets. closes #438 * include all targets in readme, even those that don't print with `zig targets` but note they are Tier 4 * refactor target.cpp and make the naming conventions more consistent * introduce the concept of a "default C ABI" for a given OS/Arch combo. As a rule of thumb, if the system compiler is clang or gcc then the default C ABI is the gnu ABI.
2019-02-25fix not finding libgcc_s when looking for native libcAndrew Kelley
closes #2011
2019-02-23better libc detection (#1996)Andrew Kelley
* 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.