Commit Graph

8925 Commits (a3da584248c1152c01a1a7f878c164fb19b8e04a)

Author SHA1 Message Date
Andrew Kelley 607b2661a0
Merge pull request #4942 from daurnimator/tidy-atomics
Tidy up compiler_rt/atomics
2020-04-05 11:13:31 -04:00
daurnimator 4daec63aea .gitattributes: deps/SoftFloat-3e/*.txt lines are crlf terminated 2020-04-05 11:03:31 -04:00
daurnimator d4d2180148 Convert .gitattributes to use unix line endings 2020-04-05 11:03:31 -04:00
Michaël Larouche c4a5f519f2 Do not parse native_libc.txt anymore when linking on native target, always run detection of libc.
Fixes #4772
2020-04-05 11:01:35 -04:00
Jadon Fowler ae376e0758 translate-c: remove unneeded semicolon
Signed-off-by: Jadon Fowler <j@jadon.io>
2020-04-05 10:44:42 -04:00
daurnimator e9e43ed0d3
compiler_rt/atomics: be consistent with `const value` 2020-04-05 14:08:25 +10:00
daurnimator f947444362
Tidy up compiler_rt/atomics 2020-04-05 14:06:12 +10:00
SuperAuguste 027e2a1673 fix multichar literals in translate_c 2020-04-04 17:56:25 -04:00
xackus cd20e0cc67 rename mem.separate to mem.split 2020-04-04 17:37:51 -04:00
Andrew Kelley e5d479b06e detect an endless loop when trying to detect native libc installation
closes #4810
2020-04-04 15:03:22 -04:00
Andrew Kelley 52db13738b
zig cc looks for native include directories unless -nostdinc
closes #4938
2020-04-04 14:58:24 -04:00
Andrew Kelley d02838b71a
add libutil to zig's glibc support 2020-04-04 14:43:51 -04:00
Andrew Kelley dc7e8b2fdc
build.zig: better detection of using outside zig executable
As pointed out by gereeter, dirname("/") successfully returns "/" again.
So checking for null is not sufficient.
2020-04-04 14:05:49 -04:00
Felix (xq) Queißner 12cdea4525 Adds some documentation to std.atomic.Queue. 2020-04-04 13:47:07 -04:00
Andrew Kelley cf8728aabd
Merge pull request #4935 from LemonBoy/stage1-eb
Big-endian fixes for stage1
2020-04-04 13:45:49 -04:00
Andrew Kelley d73808f3ff
remove `zig BUILD_INFO` hack
Rather than stuffing configuration information into the Zig binary, the
build script reads it from config.h. This solves a problem for package
maintainers and improves the use case of deterministic builds.

closes #3758
2020-04-04 11:57:28 -04:00
LemonBoy ad2ebc87f2 stage1: Byteswap floats when serializing them 2020-04-04 16:55:24 +02:00
LemonBoy 084c62f5d1 stage1: Fix serialization of ZigValue on BE machines 2020-04-04 14:06:32 +02:00
Jadon Fowler 391ee996a5 translate-c: account for signedness when translating div & mod
Signed-off-by: Jadon Fowler <j@jadon.io>
2020-04-04 02:16:30 -04:00
Andrew Kelley e89c42655c
Merge pull request #4868 from xackus/new-arraylist-api
new ArrayList API
2020-04-03 22:31:15 -04:00
Michael Dusan 1568470c44
Merge pull request #4891 from mikdusan/issue4207
add compiler-error test: coerce
2020-04-03 21:04:22 -04:00
Michael Dusan 8b6a06eefe
add compiler-error test: coerce
Issue fixed by an unknown commit.

closes #4207
2020-04-03 19:11:51 -04:00
Michael Dusan db4c06ce60 stage1: add compile errors for sentinel slicing
closes #3963
2020-04-03 19:05:30 -04:00
Andrew Kelley f1425fd9da
gitattributes: note that libcxxabi is vendored 2020-04-03 18:36:42 -04:00
Andrew Kelley a2cad9a3d9
add issue links to disabled test cases 2020-04-03 18:36:13 -04:00
Andrew Kelley 7beea47178
Merge branch 'LemonBoy-compiler-rt-atomics'
closes #4924
2020-04-03 16:08:52 -04:00
Andrew Kelley e03cbb117e
compiler-rt: don't forget to export these functions 2020-04-03 16:07:32 -04:00
LemonBoy ed69821f5b
compiler-rt: Add the __atomic family of builtins
The implementation was checked against a few files using std::atomic and
compiled using zig c++.

Closes #4887
2020-04-03 16:04:44 -04:00
Andrew Kelley cf52f3f99a
zig cc: add -allow-shlib-undefined alias 2020-04-03 13:45:16 -04:00
Andrew Kelley 11b50e3ad8 change the default ABI of riscv64-linux-musl
Before, this would cause a link failure when mixing Zig and C code for
RISC-V targets.

Now, the ABIs match and Zig and C code can be mixed successfully.

I will file a follow-up issue for the ability to deal more explicitly
with ABIs.

closes #4863
2020-04-03 13:13:09 -04:00
markfirmware 203d6554b1 Update fmt.zig 2020-04-03 12:12:40 -04:00
Ryan Liptak 08a9ab4d8c Update all remaining uses of &outStream().stream 2020-04-03 12:12:23 -04:00
LemonBoy dc54e50db2 std: Fix one more sentinel buffer overrun 2020-04-03 12:03:36 +02:00
LemonBoy aa5865b9be std: Fix oob slicing operator 2020-04-03 10:58:39 +02:00
LemonBoy 855edd2949 ir: Rewrite the bound checks in slice operator
Closes #4777
2020-04-03 10:58:39 +02:00
LeRoyce Pearson ea32a7d2bc Fix compile errors about adding error.FileLocksNotSupported 2020-04-03 00:27:34 -06:00
LeRoyce Pearson 4dd0822a36 Add LOCK_* constants to BSD `os/bits` 2020-04-02 23:50:12 -06:00
LeRoyce Pearson 733f1c25bd Fix compile errors in stage2 2020-04-02 23:39:25 -06:00
LeRoyce Pearson ea6525797d Use `flock` instead of `fcntl` to lock files
`flock` locks based on the file handle, instead of the process id.
This brings the file locking on unix based systems closer to file
locking on Windows.
2020-04-02 22:57:02 -06:00
LeRoyce Pearson e7cf3f92a9 Add FileLocksNotSupported error to OpenError 2020-04-02 22:12:45 -06:00
LeRoyce Pearson f757f0ea59 Merge branch 'master' into feature-file-locks 2020-04-02 21:47:41 -06:00
LeRoyce Pearson 35c462caf0 Merge branch 'master' into feature-file-locks 2020-04-02 21:46:48 -06:00
Jay Petacat 0dbf8aaab8
crypto: fix benchmark compile error (#4919) 2020-04-02 23:46:46 -04:00
Andrew Kelley 048da6f631 ci: enable riscv64-linux tests
Thanks to Michael Dusan's work in
deef063bbf these tests can be enabled.
2020-04-02 21:44:03 -04:00
Andrew Kelley f8cc6a1917
zig cc: fix ambiguity with -MT
In an MSVC context, `-MT` means
"Use static run-time"
and it is a flag with no parameter.

On POSIX it means
"Specify name of main file output in depfile"
and it is "joined or separate".

The former was interfering with the latter. Now, the MT flag is required
to be specified with a `/` to disambiguate: `/MT`.
2020-04-02 21:15:36 -04:00
Andrew Kelley e7f555ca55
stage1: fix build for i386-linux 2020-04-02 19:07:52 -04:00
Timon Kruiper b5526d0b3b Fix multiplication overflow in `hash_const_val`
In some cases the compiler was actually emitting an 64 bit signed
multiplication, instead of a 32 bit unsigned one.
2020-04-02 17:51:04 -04:00
Andrew Kelley 5314641e11
zig cc: support more linker args 2020-04-02 17:29:22 -04:00
Andrew Kelley c1778bd41f
zig cc: support --version-script linker arg
See #4784
2020-04-02 16:59:08 -04:00
Andrew Kelley c4b3c84b3f
zig cc: support -F and -framework 2020-04-02 15:59:48 -04:00