Krzysztof Wolicki Der Teufel
c3abb63fe9
autodoc: Added @qualCast builtin function handling
2023-02-02 14:47:16 +01:00
Andrew Kelley
6b7ad22981
Merge pull request #14477 from Vexu/fixes
...
Improve `@ptrCast` errors, fix some bugs
2023-02-01 23:31:52 -05:00
Kirk Scheibelhut
e712d5f03e
remove reference to removed addTestExe
2023-02-01 22:52:32 -05:00
praschke
72a7e3dc5e
mingw: stop using K&R-style function definitions
...
this patch is from upstream, to fix -Wdeprecated-non-prototypes issues.
K&R-style has apparently been deprecated since even C89, and C2x will be
repurposing the syntax space. this warning triggers when the change would
affect the meaning of the code.
2023-02-01 22:11:16 -05:00
Jakub Konka
304420b99c
Merge pull request #14502 from ziglang/link-owned-atoms
...
link: move ownership of linker atom from frontend to the linkers
2023-02-02 01:39:01 +01:00
Veikka Tuominen
629c3108aa
AstGen: fix orelse type coercion in call arguments
...
Closes #14506
2023-02-02 00:31:35 +02:00
Josh Holland
1fba88450d
langref: add paragraph and examples about indexing non-ASCII strings
...
PR #10610 addressed most of the points from #1854 . This
additional paragraph and examples covers the OMISSIONS section
clarifying issues about indexing into non-ASCII strings (whether valid
UTF-8 or not). I think this finally closes #1854 .
2023-02-01 21:46:46 +02:00
Evan Typanski
86ec26b1f0
translate-c: Fix types on assign expression bool
2023-02-01 21:45:53 +02:00
ominitay
3c8d968194
fmt: Make default_max_depth configurable
2023-02-01 21:43:36 +02:00
Veikka Tuominen
490addde27
Sema: fix error location on comptime arg to typed generic param
...
Closes #14505
2023-02-01 20:50:43 +02:00
Jakub Konka
beb20d29db
link: remove union types which are now internal to backends
2023-02-01 19:32:54 +01:00
Luuk de Gram
46f54b23ae
link: make Wasm atoms fully owned by the linker
2023-02-01 19:10:56 +01:00
Jakub Konka
1aa0f8aa2f
link: fix pointer invalidation issues in Elf, MachO and Coff
2023-02-01 17:46:57 +01:00
Jakub Konka
e0f3975fc8
link: make SpirV atoms fully owned by the linker
2023-02-01 16:01:43 +01:00
Jakub Konka
5de2aae63c
link: decouple DI atoms from linker atoms, and manage them in Dwarf linker
2023-02-01 15:03:55 +01:00
Jakub Konka
d98fc53b8f
link: use strtab.StringTable in Dwarf
2023-02-01 11:49:07 +01:00
Jakub Konka
b3277c8936
link: make Plan9 atoms fully owned by the linker
2023-02-01 11:12:53 +01:00
Jakub Konka
9fdc32c96e
link: clean up type resolution in Elf.Atom and MachO.Atom
2023-02-01 09:13:49 +01:00
praschke
2ccff51154
mingw: repair msvcrt-os build flags
...
__LIBMSVCRT__ is still used and is distinct from __LIBMSVCRT_OS__
2023-01-31 23:25:02 -05:00
Andrew Kelley
efa25e7d5b
Merge pull request #14498 from ziglang/zig-build-api
...
Several enhancements to the build system. Many breaking changes to the API.
* combine `std.build` and `std.build.Builder` into `std.Build`
* eliminate `setTarget` and `setBuildMode`; use an options struct for `b.addExecutable` and friends
* implement passing options to dependency packages. closes #14285
* rename `LibExeObjStep` to `CompileStep`
* move src.type.CType to std lib, use it from std.Build, this helps with populating config.h files.
2023-01-31 23:15:59 -05:00
Andrew Kelley
8d37c6f71c
std.Build.CompileStep: fix API usage in unit test
2023-01-31 15:34:08 -07:00
Luuk de Gram
6f13a725a3
Merge pull request #14494 from Techatrix/wasm-optional-slice
...
wasm: correctly handle optional slices
2023-01-31 23:11:58 +01:00
Andrew Kelley
7d14baec90
tests: fix missing target for C ABI tests
...
This regressed earlier in this branch.
2023-01-31 15:09:35 -07:00
Andrew Kelley
3c1fc3f566
std.Build.ConfigHeaderStep: support more types
2023-01-31 15:09:35 -07:00
Andrew Kelley
2f5892671e
move compiler's CType logic to std.Target
...
This API only depends on std.Target and is extremely useful in build
scripts when populating configure files.
2023-01-31 15:09:35 -07:00
Andrew Kelley
90e48d4b34
std.Build: avoid use of catch unreachable
...
Usage of `catch unreachable` in build scripts is completely harmless
because build scripts are always run in Debug mode, however, it sets a
poor example for beginners to learn from.
2023-01-31 15:09:35 -07:00
Andrew Kelley
13a9616540
std.Build: add deprecated declarations
...
These declarations are now aliases of their new APIs and marked as
deprecated via doc comments:
* std.build.Builder
* std.build
* std.Build.LibExeObjStep
2023-01-31 15:09:35 -07:00
Andrew Kelley
16cdd1297e
rename std.Build.LibExeObjStep to std.Build.CompileStep
...
This matches the nomenclature internally: a Compilation is the main type
that represents a single invokation of the compiler.
2023-01-31 15:09:35 -07:00
Andrew Kelley
77544683dd
fix init-exe, init-lib templates
2023-01-31 15:09:35 -07:00
Andrew Kelley
34b3145099
update test case for new std.builtin.OptimizeMode API
2023-01-31 15:09:35 -07:00
Andrew Kelley
9a29f4e038
langref updates for new std.Build API
2023-01-31 15:09:35 -07:00
Andrew Kelley
5129fae4e8
std.Build: accept host Target in create()
...
And only detect native target in LibExeObjStep once, in create().
2023-01-31 15:09:35 -07:00
Andrew Kelley
60c4befad3
build.zig: remove dead list of unused source files
2023-01-31 15:09:35 -07:00
Andrew Kelley
36e2d992dd
combine std.build and std.build.Builder into std.Build
...
I've been wanting to do this for along time.
2023-01-31 15:09:35 -07:00
Andrew Kelley
73cf7b6429
update build.zig API usage
2023-01-31 15:09:35 -07:00
Andrew Kelley
71ff60f126
std.build: eliminate setTarget and setBuildMode
...
This is a breaking change that makes the API for creating build
artifacts no longer have any period of time where the target and
optimization mode are not set.
2023-01-31 15:09:35 -07:00
Andrew Kelley
063888afff
std.build: implement passing options to dependency packages
...
* introduce the concept of maps to user input options, but don't
implement it for command line arg parsing yet.
* remove setPreferredReleaseMode and standardReleaseOptions in favor of
standardOptimizeOption which has a future-proof options parameter.
2023-01-31 15:09:35 -07:00
Jakub Konka
c430e9afa7
link: make Coff atoms fully owned by the linker
2023-01-31 20:27:17 +01:00
leap123
ef8f694d77
std.os.uefi: fix shift in pool allocator (again) ( #14497 )
2023-01-31 13:08:30 -05:00
Jakub Konka
4404c4d200
link: make Elf atoms fully owned by the linker
2023-01-31 17:54:12 +01:00
Techatrix
47ff57ed7d
wasm: apply request change
2023-01-31 17:01:56 +01:00
r00ster91
17404f8e6e
Sema: emit compile error for comptime or inline call of function pointer
2023-01-31 17:15:34 +02:00
Andrew Kelley
d6b430b520
std.Target: remove workaround
...
This was working around a stage1 compiler bug.
2023-01-31 02:28:16 -05:00
Techatrix
1f64432196
wasm: correctly handle optional slices
2023-01-31 00:59:18 +01:00
Jakub Konka
d42a931051
link: make MachO atoms fully owned by the linker
2023-01-31 00:43:25 +01:00
Veikka Tuominen
f3bb1957fa
update zig1.wasm to include @qualCast
2023-01-30 18:55:58 +02:00
Veikka Tuominen
f16c10a86b
implement @qualCast
2023-01-30 18:55:57 +02:00
Veikka Tuominen
fe4ea31f7e
Sema: replace backticks with single quotes
...
Most error messages already use single quotes for everything
so this makes the remaining ones consistent.
2023-01-30 15:20:16 +02:00
Veikka Tuominen
a9785fe8ee
Sema: add helpful notes to invalid @ptrCast operations
...
Closes #14474
2023-01-30 15:20:16 +02:00
Veikka Tuominen
b129350cb5
AstGen: fix crash on invalid decltest
...
Closes #14476
2023-01-30 15:20:16 +02:00