Andrew Kelley
197311d7dd
windows and uefi don't have dynamic linkers
2019-03-07 13:25:17 -05:00
Andrew Kelley
4d8467fafc
better behavior when cache dir unavailable
...
and choose different manifest dir for local cache to avoid
conflict with zig build
2019-03-07 13:16:52 -05:00
Andrew Kelley
e2ce00f272
fix regressions on macos
2019-03-07 13:04:10 -05:00
Andrew Kelley
ffaa4f0a87
dynamic_linker_path can be null on some targets
2019-03-07 12:21:27 -05:00
Andrew Kelley
ce76de35f1
multi-arch glibc headers
2019-03-07 12:16:10 -05:00
Andrew Kelley
ccdef8c0fb
cross compile glibc startup files
2019-03-06 13:22:36 -05:00
Andrew Kelley
697b1233f0
support other architectures for glibc startup files
2019-03-06 12:10:03 -05:00
Andrew Kelley
ba144b366c
build libunwind.a from source and link it
2019-03-05 22:45:41 -05:00
Andrew Kelley
4c386436ea
support glibc dl, m, pthread, rt
2019-03-05 18:17:22 -05:00
Andrew Kelley
e06da10838
fix translate-c
2019-03-05 16:12:19 -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
dd263eccb7
support crtbegin.o and crtend.o when using explicit libc
2019-03-05 14:12:46 -05:00
Andrew Kelley
c5fdea59d3
building glibc from source
2019-03-05 13:26:59 -05:00
Andrew Kelley
aeb16010f3
initial glibc support
2019-03-04 22:15:53 -05:00
Andrew Kelley
9c5852aa86
fix slice of C pointer
...
closes #2002
2019-03-03 13:04:04 -05:00
Andrew Kelley
d0d615d819
fix const initialization of optional C pointer to null
2019-03-03 10:47:06 -05:00
Andrew Kelley
e402455704
rename std lib files to new convention
2019-03-02 16:46:04 -05:00
Andrew Kelley
f7835000b6
@returnAddress and @frameAddress return usize now
2019-03-02 15:34:58 -05:00
Andrew Kelley
ea5cedced1
fix @typeName on slices
...
closes #2026
2019-03-02 14:31:27 -05:00
Sahnvour
4bac22e888
all integers returned by @typeInfo are now comptime_int
2019-03-02 14:27:37 -05:00
Andrew Kelley
67b4de33d2
compile error for import outside package path
...
closes #2024
there's a new cli option `--main-pkg-path` which you can use to choose
a different root package directory besides the one inferred from the
root source file
and a corresponding build.zig API:
foo.setMainPkgPath(path)
2019-03-02 10:38:27 -05:00
Andrew Kelley
764205ac13
better error message for -target windows CLI
...
closes #1169
2019-03-01 18:42:09 -05:00
Andrew Kelley
bed81089e1
Merge pull request #2020 from ziglang/kill-namespace-type
...
remove the (namespace) type and make every file an empty struct
2019-03-01 18:07:46 -05:00
Andrew Kelley
9c47bf68fa
gen-h: respect @export
2019-03-01 17:52:17 -05:00
Andrew Kelley
fc17b8ee8b
remove unused function
2019-03-01 17:36:43 -05:00
Andrew Kelley
26128396f3
gen-h: use the bare type names for now
2019-03-01 17:36:08 -05:00
Andrew Kelley
5f7d9c5845
@typeInfo for structs and opaque types is the bare name
2019-03-01 17:15:58 -05:00
Andrew Kelley
a7ddcabb50
fix type names
2019-03-01 15:49:52 -05:00
Andrew Kelley
582fdc2869
fix dependency loops, pub, tests, use decls, root source
...
* fix dependency loop detection
- closes #679
- closes #1500
* fix `pub`
* fix tests
* fix use decls
* main package file gets a special "" namespace path
2019-03-01 15:35:29 -05:00
Marc Tiehuis
c4887d7f54
Use bitwise-and instead of modulo in __zig_return_error
...
Avoids emitting compiler-rt div calls on some targets.
2019-03-01 08:23:11 -05:00
Andrew Kelley
faf76032f1
fix "use" decls
2019-02-28 15:54:09 -05:00
Andrew Kelley
02f3a834b0
struct types get fully qualified names
...
and function symbol names become fully qualified
2019-02-28 15:40:57 -05:00
Andrew Kelley
5424b4320d
remove namespace type; files are empty structs
...
closes #1047
2019-02-28 10:11:32 -05:00
Andrew Kelley
9753e87545
fix incorrect use of printf in previous commit
2019-02-27 20:09:07 -05:00
Andrew Kelley
3bfacf071e
print the command that failed when C source code fails to build
...
also respect the --color arg when building C code
2019-02-27 16:02:07 -05:00
Andrew Kelley
14ca0fd493
uefi os: better auto detection of subsystem
2019-02-27 09:30:48 -05:00
Andrew Kelley
d093f51f16
stage1: fix unused function error on freebsd and netbsd
...
closes #2012
closes #2013
2019-02-27 08:40:54 -05:00
Andrew Kelley
c59ce046a0
windows returns EINVAL for fopen when there is an asterisk in the name
...
closes #508
2019-02-26 23:02:57 -05:00
Andrew Kelley
0d48011f5e
fix stage1 zig fmt on macos
2019-02-26 21:33:46 -05:00
Andrew Kelley
557983e502
fix handling when there are multiple externs and
...
an export in the same object
closes #529
2019-02-26 19:43:12 -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
33174f11ef
fix regressions on Windows
2019-02-26 16:24:32 -05:00
Andrew Kelley
ade10387a5
breaking changes to the way targets work in zig
...
* 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-26 15:58:10 -05:00
Andrew Kelley
1ec1097bd3
use -nostdinc and sometimes -nolibc when compiling C code
2019-02-26 14:59:36 -05:00
Andrew Kelley
6fd2816431
use -nostdinc++ when compiling C code
2019-02-26 10:15:48 -05:00
Andrew Kelley
3932b6474e
use -nobuiltininc when compiling c code
2019-02-26 08:16:03 -05:00
Andrew Kelley
7571db05de
fix incorrectly trying to memset at comptime
...
closes #718
2019-02-25 20:33:40 -05:00
Andrew Kelley
152db27146
better error message when forgetting to link against libc
...
closes #1698
2019-02-25 20:09:18 -05:00
Andrew Kelley
3ca861c7dd
add a compile error note when C import fails and not linking libc
...
closes #558
2019-02-25 19:31:30 -05:00