Andrew Kelley
e2f36c292e
std: break up some long lines
...
This makes packaging Zig for Debian slightly easier since it will no
longer trigger a Lintian warning for long lines.
2022-02-02 22:00:55 -07:00
Andrew Kelley
e9d916571a
link: ELF, COFF, WASM: honor the "must_link" flag of positionals
...
Previously only the MachO linker was honoring the flag.
2022-02-02 22:00:38 -07:00
Andrew Kelley
021c1190af
stage2: .stub files are yet another c++ source file extension
...
however .cu files are a superset of c++.
2022-02-02 22:00:16 -07:00
Andrew Kelley
45cd1114f7
stage2: make cuda file extensions a separate enum tag than c++
...
follow-up to 2f41bd3be438dae2a188cfae3295dc28f4e9d434.
2022-02-02 22:00:12 -07:00
Vesim
d7feeaaa2c
fchown: use the 32-bit uid/gid variant of the syscall on 32-bit linux targets
2022-02-02 22:00:06 -07:00
praschke
2b29424efd
docs: reorganize @truncate and @intCast for clarity
2022-02-02 22:00:00 -07:00
vnc5
8f89056dc2
fix startup procedure for async WinMain
2022-02-02 21:59:47 -07:00
Philipp Lühmann
e8c4fec1b2
fix precedence in langref or example
2022-02-02 21:59:40 -07:00
Exonorid
ac3d9759ed
Added documentation for implicit struct pointer dereferencing
2022-02-02 21:53:00 -07:00
Daniel Saier
922d33e5b9
zig cc: Treat cu files as C++ source files
...
First step towards #10634 .
Treating stub files as C++ allows to use zig c++ as a host
compiler for nvcc.
Treating cu files as C++ allow using zig c++ as a host compiler in
CMake. CMake calls the host compiler with -E on a cu file to identify
the compiler.
Using zig c++ to directly compile CUDA code is untested.
2022-02-02 21:52:52 -07:00
Andrew Kelley
936294e32a
Merge pull request #10699 from motiejus/arm64
...
[linux headers] rename arm64 to aarch64
2022-02-02 21:51:58 -07:00
Andrew Kelley
7e61bdbaa4
zig cc: add --hash-style linker parameter
...
This is only relevant for ELF files.
I also fixed a bug where passing a zig source file to `zig cc` would
incorrectly punt to clang because it thought there were no positional
arguments.
2022-02-02 21:50:52 -07:00
Josh Hannaford
340bb8198f
Update the documentation for std.mem.sliceTo for readability
2022-02-02 21:48:48 -07:00
Andrew Kelley
e37c55bae0
link: Elf, Wasm: forward strip flag when linking with LLD
2022-02-02 21:47:28 -07:00
Andrew Kelley
93545fe74f
zig cc: detect more linker args
...
* --whole-archive, -whole-archive
* --no-whole-archive, -no-whole-archive
* -s, --strip-all
* -S, --strip-debug
2022-02-02 21:46:28 -07:00
Meghan
8ed432fe3c
std.crypto.random: Randoms are no longer passed by reference
2022-02-02 21:46:22 -07:00
Andrew Kelley
148b963a60
Merge pull request #10584 from ziglang/macho-rustc-fixes
...
zld: a couple of fixes which result in better rustc support
2022-02-02 21:45:44 -07:00
Sizhe Zhao
b713ce0249
Avoid duplicate TLS startup symbols
2022-02-02 21:25:40 -07:00
Pablo Santiago Blum de Aguiar
4d5a598599
readUntilDelimiter*: read only if buffer not full
...
Ref.: #9594
2022-02-02 21:25:03 -07:00
fifty-six
aa8112c847
std/fs: Support XDG_DATA_HOME
...
This is generally used for user-specific data on linux, with the
default being ~/.local/share
2022-02-02 21:24:40 -07:00
joachimschmidt557
3d52a322ab
std: Add some missing termios types to c/linux.zig and os.zig
2022-02-02 21:23:34 -07:00
Andrew Kelley
af844d865f
stage1: remove the "referenced here" error note
...
It's generally noise. The parts where it is useful will need to be
redone to not be annoying for the general case.
2022-02-02 21:22:57 -07:00
Jakub Konka
252fb642d5
macho: do not write out ZEROFILL physically to file
...
Prior to this change, `__DATA,__bss` and `__DATA,__thread_bss` would
get actually, physically written out to the output file, unnecessarily
filling the output file with 0s.
2022-02-02 21:22:15 -07:00
Daniel Saier
dcbab17b62
glibc: fix passing of __GNU_MINOR__
...
This was originally introduced in 4d48948b526337947ef59a83f7dbc81b70aa5723
but broken immediately afterwards in c8af00c66e8b6f62e4dd6ac4d86a3de03e9ea354.
2022-02-02 21:19:42 -07:00
C-BJ
881e507ac5
Update CONTRIBUTING.md
...
Delete unavailable content!
2022-02-02 21:19:36 -07:00
Andrew Kelley
18fabd99cc
Merge pull request #10475 from lithdew/master
...
lld: allow for entrypoint symbol name to be set
2022-02-02 21:19:18 -07:00
John Schmidt
afd1f7ed47
Implement segfault handler for macOS x86_64
2022-02-02 21:18:45 -07:00
riverbl
2ac7aefe2f
stage2: do not interpret identifier containing underscores (eg: u3_2) as int primitive type
2022-02-02 21:17:25 -07:00
johnLate
bb9399cc5d
Fix os.rusage when linking with c library on Linux
...
Fixes ziglang#10543 on Linux.
2022-02-02 21:17:15 -07:00
riverbl
bc90a2a083
translate-c: Fix issues translating macro define of hex float constant
...
* Fix incorrect result when the first digit after the decimal point is not 0-9 - eg 0x0.ap0
* Fix compiler panic when the number starts with `0X` with a capital `X` - eg 0X0p0
* Fix compiler panic when the number has a decimal point immediately after `0x` - eg 0x.0p0
2022-02-02 21:15:15 -07:00
Jakub Konka
1e6de105c8
Merge branch 'Jarred-Sumner-patch-1'
2022-02-02 21:14:59 -07:00
Jakub Konka
385b7e4808
Merge pull request #10576 from schmee/macos-resolve-ip
...
Use libc if_nametoindex for macOS when parsing IPs
2022-02-02 21:12:24 -07:00
Jakub Konka
57d7ad9172
macho: code signature needs to be 16 bytes aligned
2022-02-02 21:10:23 -07:00
Andrew Kelley
e67e15a29a
Merge pull request #10587 from xxxbxxx/master
...
restore compatibility with glibc<=2.33 for global initializers
2022-02-02 21:10:05 -07:00
Marc Tiehuis
06ae13fe35
stage1: fix bigint_init_bigfloat for single-limb negative floats
...
Fixes #10592 .
2022-02-02 21:09:36 -07:00
Jakub Konka
dafbc6eb25
Merge branch 'Luukdegram-linker-eport-symbols'
2022-01-12 12:01:32 -07:00
Andrew Kelley
6f49233ac6
Merge pull request #10572 from Luukdegram/wasm-linker-stack
...
Stage2: wasm-linker - Place stack at the beginning of the linear memory
2022-01-12 12:00:03 -07:00
riverbl
bb8eef8d24
translate-c: Fix macro define of float constant using scientific notation
...
Fixes compiler attempting to use null value when translating macro define of float constant using scientific notation with no decimal point
2022-01-12 11:59:30 -07:00
afranchuk
511990c83b
Fix a bug in std.Thread.Condition and add a basic Condition test. ( #10538 )
...
* Fix FUTEX usage in std.Thread.Condition - It was using an old name.
2022-01-12 11:59:09 -07:00
Andrew Kelley
9fa55ae777
Merge pull request #10566 from fifty-six/master
...
std.os.uefi improvements/fixes
2022-01-12 11:59:02 -07:00
Evan Haas
53e41682ba
translate-c: Handle typedef'ed void return type for functions.
...
Fixes #10356
2022-01-12 11:58:42 -07:00
Jakub Konka
3542dcad33
zig cc: integration with sysroot arg ( #10568 )
...
Prior to this change, even if the use specified the sysroot on the
compiler line like so
```
zig cc --sysroot=/path/to/sdk
```
it would only be used as a prefix to include paths and not as a prefix
for `zig ld` linker.
2022-01-12 11:58:36 -07:00
djg
9b97edb012
std: hash_map: optimize isFree/isTombstone ( #10562 )
...
- Add an `Metadata.isFree` helper method.
- Implement `Metadata.isTombstone` and `Metadata.isFree` with `@bitCast` then comparing to a constant. I assume `@bitCast`-then-compare is faster than the old method because it only involves one comparison, and doesn't require bitmasking.
- Summary of benchmarked changes (`gotta-go-fast`, run locally, compared to master):
- 3/4 of the hash map benchmarks used ~10% fewer cycles
- The last one (project Euler) shows 4% fewer cycles.
2022-01-12 11:58:24 -07:00
Jakub Konka
1c61038255
Build fs/filesystem libcxx module when targeting GNU Win
2022-01-12 11:57:40 -07:00
Meghan Denny
73cbc13a97
std: fix zig.Ast being called Tree internally
2022-01-12 11:56:45 -07:00
r00ster
adf7c654d4
Add missing package to the langref that's always available
2022-01-12 11:56:10 -07:00
Ryan Liptak
2304dbaba4
Add CANNOT_DELETE as a possible error in os.windows.DeleteFile
...
Can happen when e.g. trying to delete a file with the Read Only flag set
2022-01-12 11:54:31 -07:00
Andrew Kelley
675590cd44
Merge pull request #10499 from paulsnar/paulsnar/stage1-packed-structs-cabi
...
stage1: Fix LLVM C ABI type resolution for small packed structs
2022-01-12 11:54:04 -07:00
Vincent Rischmann
4d38f456ea
io_uring: improve IO_Uring.copy_cqe
...
copy_cqes() is not guaranteed to return as many CQEs as provided in the
`wait_nr` argument, meaning the assert in `copy_cqe` can trigger.
Instead, loop until we do get at least one CQE returned.
This mimics the behaviour of liburing's _io_uring_get_cqe.
2022-01-12 11:53:42 -07:00
Andrew Kelley
8771ef897a
readme: dynamic logo light/dark
2022-01-12 11:53:28 -07:00