14331 Commits

Author SHA1 Message Date
Jakub Konka
0f4173c5d8
Merge pull request #9122 from ziglang/zld-proxies
zld: clean up stubs resolution, error messages and use ld64 defaults for system libs resolution
2021-06-15 14:55:12 +02:00
Jakub Konka
7f9076c771 Merge branch 'mathetake-cpp-wasi' 2021-06-15 12:20:44 +02:00
Isaac Freund
fb0ecdbe1a zig build: add --libc general option
This new option sets a default libc paths file to be used for all
LibExeObjSteps. Setting LibExeObjStep.libc_file overrides this default.

This is required to allow users to cross compile projects linking system
libraries without needing to patch the build.zig.
2021-06-15 12:14:04 +02:00
Veikka Tuominen
d892d3bbe7 replace usage of meta.cast with builtins
You weren't supposed to use these >:(
2021-06-15 12:14:04 +02:00
Veikka Tuominen
c54af9774d translate-c: move utility functions to a separate namespace 2021-06-15 12:14:04 +02:00
Björn Linse
1fe6a34f69 std: don't reference non-existant ComptimeStringHashMap type 2021-06-15 12:14:04 +02:00
Jakub Konka
6362b82497 zld: map coalesced sections and handle undefines 2021-06-15 12:14:04 +02:00
Jakub Konka
cf26f8c19b zld: handle __eh_frame section 2021-06-15 12:14:04 +02:00
Jakub Konka
15ff0db794 zld: handle __gcc_except_tab section 2021-06-15 12:14:03 +02:00
Jakub Konka
96d3c4f54f zld: clean up parsing section by type and attrs 2021-06-15 12:14:03 +02:00
Andrew Kelley
6fad1d48e4 ci: azure: update to newer msys2 release 2021-06-15 12:14:03 +02:00
Andrew Kelley
d6f2772583 zig build: rename --lib-dir, --include-dir, --exe-dir
To --prefix-lib-dir, --prefix-include-dir, --prefix-exe-dir,
respectively.
2021-06-15 12:14:03 +02:00
Andrew Kelley
c434a9a573 CLI: rename --override-lib-dir to --zig-lib-dir
This breaking change disambiguates between overriding the lib dir when
performing an installation with the Zig Build System, and overriding the
lib dir that the Zig installation itself uses.
2021-06-15 12:14:03 +02:00
Jan200101
5df5937bd2 specify the output lib, exe and include paths with flags 2021-06-15 12:14:03 +02:00
xackus
e3fa18242b translate-c: remove old code i forgot in last pr 2021-06-15 12:14:03 +02:00
Veikka Tuominen
eb7cfe9de6 add a test for dup and dup2 2021-06-15 12:14:03 +02:00
Samadi van Koten
71e99c8690 Add std.os.dup() 2021-06-15 12:14:03 +02:00
Isaac Freund
7611b80f43 std: fix auto hash of tagged union with void field 2021-06-15 12:14:03 +02:00
Jakub Konka
8204763328 zld: use ld64 defaults for searching system libs
By default, `ld64` uses `-search_paths_first` which firstly tries
to find a dylib, followed by an archive in each directory.
2021-06-15 11:52:03 +02:00
Jakub Konka
2034ca82b4 zld: stubs can also be part of unsigned relocs 2021-06-15 11:51:59 +02:00
Isaac Freund
db08d4c3d6 zig build: add --libc general option
This new option sets a default libc paths file to be used for all
LibExeObjSteps. Setting LibExeObjStep.libc_file overrides this default.

This is required to allow users to cross compile projects linking system
libraries without needing to patch the build.zig.
2021-06-15 08:01:26 +03:00
Veikka Tuominen
97946e2a41
Merge pull request #9091 from Vexu/translate-c
Translate-c: move utility functions to a separate namespace
2021-06-15 07:59:46 +03:00
Björn Linse
ac42503266 std: don't reference non-existant ComptimeStringHashMap type 2021-06-15 07:57:07 +03:00
Takeshi Yoneda
0063f642d1 fix comments.
Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io>
2021-06-15 11:50:13 +09:00
Takeshi Yoneda
dc7d354ee4 Add a missing comment.
Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io>
2021-06-15 09:32:48 +09:00
Takeshi Yoneda
1795472eb7 cleanup, and disable threading completely.
Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io>
2021-06-15 09:28:19 +09:00
Jakub Konka
d2427e6490
Merge pull request #9118 from ziglang/zld-eh-frame
zld: handle __gcc_except_tab and __eh_frame, and streamline section mapping
2021-06-15 00:15:18 +02:00
Andrew Kelley
408d8df86c ci: azure: update to newer msys2 release 2021-06-14 12:03:10 -07:00
Andrew Kelley
7d5538c32b zig build: rename --lib-dir, --include-dir, --exe-dir
To --prefix-lib-dir, --prefix-include-dir, --prefix-exe-dir,
respectively.
2021-06-14 11:56:58 -07:00
Andrew Kelley
193c529b8c CLI: rename --override-lib-dir to --zig-lib-dir
This breaking change disambiguates between overriding the lib dir when
performing an installation with the Zig Build System, and overriding the
lib dir that the Zig installation itself uses.
2021-06-14 11:33:27 -07:00
Jakub Konka
7001bde84c zld: map coalesced sections and handle undefines 2021-06-14 20:21:54 +02:00
Jan200101
5a4249fa25 specify the output lib, exe and include paths with flags 2021-06-14 20:26:54 +03:00
Veikka Tuominen
6dbdac4b60 replace usage of meta.cast with builtins
You weren't supposed to use these >:(
2021-06-14 20:13:39 +03:00
Veikka Tuominen
699b6cdf01 translate-c: move utility functions to a separate namespace 2021-06-14 20:13:34 +03:00
xackus
ec36b82d05 translate-c: remove old code i forgot in last pr 2021-06-14 19:48:45 +03:00
Takeshi Yoneda
bc64664a0c add various flags/options, and link libcxxabi.
Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io>
2021-06-15 01:03:25 +09:00
Takeshi Yoneda
c708962386 link/wasm: link libcxx.
Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io>
2021-06-14 23:39:39 +09:00
Jakub Konka
0ca0e88463 zld: handle __eh_frame section 2021-06-14 16:01:58 +02:00
Jakub Konka
5fc25ee8e4 zld: handle __gcc_except_tab section 2021-06-14 13:15:30 +02:00
Jakub Konka
66a93ebfbf zld: clean up parsing section by type and attrs 2021-06-14 12:56:53 +02:00
Veikka Tuominen
4173a2bc24 add a test for dup and dup2 2021-06-14 12:17:12 +03:00
Samadi van Koten
ee048d6569 Add std.os.dup() 2021-06-14 12:17:12 +03:00
Isaac Freund
2d4c439652 std: fix auto hash of tagged union with void field 2021-06-14 12:14:04 +03:00
Takeshi Yoneda
827fa4d837 c++,wasi: enable libcxx build.
Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io>
2021-06-14 17:48:01 +09:00
Andrew Kelley
86ebd4b975
Merge pull request #9106 from Vexu/fmt
Add formatting check to CI pipeline
2021-06-13 20:39:40 -04:00
Veikka Tuominen
e63ff4f1c1 add ast-check flag to zig fmt, fix found bugs 2021-06-14 00:16:40 +03:00
Jacob G-W
df4f11f42f link/Elf: don't use \n in log.debug calls
It already inserts a \n so it produces 2 \n which
is harder to read.
2021-06-13 23:42:57 +03:00
jacob gw
b9f07b7ac2 format zig files and add formatting check to ci 2021-06-13 22:33:39 +03:00
LemonBoy
ff79b87fa0 tools: Unbreak many tools
Many tools were broken after the recent hash-table refactorings, fix
them and ensure they won't silently break again.
2021-06-13 15:25:18 -04:00
Veikka Tuominen
37f36da391
Merge pull request #9092 from xackus/translate-c-type-parsing
translate-c: improve type parsing
2021-06-13 19:51:22 +03:00