Commit Graph

354 Commits

Author SHA1 Message Date
gingerBill
e737122ce8 Add experimental target orca_wasm32 2024-05-30 21:58:27 +01:00
gingerBill
891fefe117 Merge pull request #3592 from laytan/wasm-gpa
add a default heap/general purpose allocator for wasm to `base:runtime`
2024-05-20 10:38:09 +01:00
gingerBill
8dec4f6ed3 Merge pull request #3570 from jasonKercher/linux-arm32
Get the compiler to build and work on arm32 Linux
2024-05-20 00:05:57 +01:00
Laytan Laats
f42b1c4973 add a default heap/general purpose allocator for wasm to base:runtime 2024-05-16 23:08:40 +02:00
gingerBill
e71cd871c4 Reimplement -build-mode:static/-build-mode:lib 2024-05-16 14:27:05 +01:00
gingerBill
f9fd8f0c25 Merge pull request #3439 from andreas-jonsson/netbsd
NetBSD support
2024-05-15 10:33:52 +01:00
gingerBill
215ef3d985 Make core:runtime etc a warning, and an error with -vet 2024-05-13 13:26:47 +01:00
jasonkercher
2183140e71 arm32 now compiles and runs demo 2024-05-10 13:24:43 -04:00
Andreas T Jonsson
a45e69e656 Removed dead code 2024-05-10 09:12:56 +02:00
Andreas T Jonsson
b72c2edabb Merge branch 'master' into netbsd 2024-05-10 09:04:52 +02:00
Andreas T Jonsson
273e4c6b4c Changed target data layout 2024-05-10 08:47:51 +02:00
Laytan
87b099b5aa fix merge conflict 2024-05-07 16:52:46 +02:00
Laytan Laats
ecddf3b7f1 llvm-18: cleanup 2024-05-07 16:52:46 +02:00
Laytan Laats
a3821615dc llvm-18: fix windows build error because of include 2024-05-07 16:52:46 +02:00
Laytan Laats
f9a7d2bf04 llvm-18: enable static map calls on non amd64sysv targets 2024-05-07 16:52:46 +02:00
Laytan
c219ca5b1b llvm-18: fix undocumented breaking change on i128 alignment 2024-05-07 16:52:46 +02:00
Laytan Laats
e3e04ffa22 llvm-18: enable sroa and static map calls 2024-05-07 16:52:46 +02:00
Laytan
b91e7f5c51 llvm-18: linux (amd64) 2024-05-07 16:52:46 +02:00
gingerBill
15f7148eae Merge pull request #3526 from laytan/target-features
Improve target features support
2024-05-05 21:50:57 +01:00
Feoramund
1165d65c94 Minimally support compiling Odin on FreeBSD arm64
This is enough to get Odin itself compiling and the demo running.
2024-05-05 07:26:45 -04:00
Andreas T Jonsson
7feff1c113 Merged with master 2024-05-02 09:27:46 +02:00
Laytan Laats
25f1d0906d compiler: improve target features support 2024-05-02 00:59:52 +02:00
Laytan Laats
4fea5720a5 wasm: allow -default-to-nil-allocator 2024-04-28 16:05:41 +02:00
Andreas T Jonsson
9a008d10f3 Merge branch 'master' into netbsd 2024-04-25 22:04:40 +02:00
Laytan
d1a1e8f646 fix linking with clang-18
Because we currently just use the clang from the user's path linking
suddenly breaks when the user updates their system clang to 18 with an
error about an unknown option -arch.

I had already fixed it for my LLVM 18 PR but it seems like a good idea
to get this in already to avoid that breakage (had a few people come to
the Discord with it and an issue).

This fixes #3461
2024-04-22 20:58:54 +02:00
Thomas la Cour
0a16f7a6f1 normalize_path 2024-04-20 09:37:30 +02:00
gingerBill
ece78d22d2 Add -no-type-assert and ODIN_NO_TYPE_ASSERT 2024-04-18 11:22:31 +01:00
Andreas T Jonsson
4558f3992a Initial commit of NetBSD port 2024-04-16 14:27:29 +02:00
gingerBill
cb0a57eaa9 Add -target:freestanding_amd64_win64 2024-04-11 17:18:51 +01:00
gingerBill
b6d2ac11b8 Add -vet-unused-variables and `-vet-unused-imports (-vet-unused is both) 2024-04-11 15:24:36 +01:00
gingerBill
7f0ca315b3 Merge pull request #3374 from laytan/fix-128-ints-alignment-arm64
fix 128 bit int alignment on arm64
2024-04-04 18:06:01 +01:00
Laytan Laats
31407d9b1b fix 128 bit int alignment on arm64
Fixes #2403
2024-04-04 18:39:41 +02:00
gingerBill
0e5a482c42 Default to "smart" linker behaviour; Add -min-link-libs to use minimize link libs if wanted 2024-04-04 16:11:26 +01:00
Laytan Laats
9a5a39c07d fix not setting ok in cached code path 2024-03-28 19:16:55 +01:00
Laytan Laats
63f30a8207 speed up path_to_fullpath on Linux/MacOS
We did some profiling for #3343 and this seems to be the biggest
problem. `realpath` is expensive, and we are locking here for no reason
that I can think of.

This improves the "check procedure bodies" timing (of the linked issue)
from 2.4s to .4s on my machine.
2024-03-28 18:44:21 +01:00
Laytan Laats
b26a685b76 darwin: be less annoying about "incompatible" library versions
After #3316 we set a default minimum version, now this will warn if you
link with a library that is targeting later versions.

This might be a bit annoying, especially when the user hasn't actually
given Odin a minimum target.

So this PR makes these warnings only show when you explicitly give a
target version (afaik that is the only thing that -mmacosx-min-version
actually does for us because we don't use it to compile anything, just
to link).
2024-03-25 22:11:20 +01:00
Laytan Laats
15c1e8274d darwin: fix ld warnings and set minimum os version 2024-03-23 22:12:05 +01:00
Laytan Laats
f312adb26a darwin: allow cross linking darwin_amd64 from darwin_arm64 2024-03-20 17:44:35 +01:00
gingerBill
863ee0b8d1 Merge pull request #3297 from laytan/linker-improvements
linker improvements
2024-03-20 10:09:45 +00:00
Laytan Laats
a555862522 linker improvements
`path_to_fullpath` did different things on Windows&Unix, an attempt to
bring them closer together was made here.
This was prompted by the compiler completely ignoring
`foreign import "foo.dylib"` when `foo.dylib` does not exist (because
`path_to_fullpath` returns an empty string).
Causing just unresolved symbol errors, when on Windows it would pass
along the path to the linker and actually say it doesn't exist, which
is now also the case for Unix.
This also fixes some checker errors that relied on the Windows
behaviour, for example: `Error: File name, , cannot be as a library name
as it is not a valid identifier`.

Made `-no-crt` require either `-default-to-nil-allocator` or
`-default-to-panic-allocator` on Unix, the current default allocators
rely on libc and this was not obvious and would immediately bring up
unresolved symbol errors for the linked memory management functions, or
just link with libc anyways because it was foreign imported.

Added a suggestion to install `nasm` with the user's package manager
when assembling using `nasm` fails on Unix, I saw some confusion about
it in the Discord.

Ignore explicit foreign imports of libc. It is already linked in later
on in the linking process and would otherwise (at least on macOS) cause
linker warnings for duplicate libraries. This also makes it so when
using `-no-crt` and importing something that requires libc, linker
errors are given (like I would expect), instead of silently still
linking with libc because it was foreign imported.
2024-03-19 19:57:35 +01:00
gingerBill
ba428fecdb Add -json-errors 2024-03-19 16:25:09 +00:00
gingerBill
9a2fc6cf4c Serialize errors to make them sortable, deterministic, and generally more control 2024-03-19 15:34:29 +00:00
avanspector
fca691a066 fix core:thread and a memory leak
in the future probably native non-pthread implementation for haiku will be required
2024-02-27 02:38:06 +01:00
avanspector
0fa6ba726f add haiku build token 2024-02-25 03:03:12 +01:00
avanspector
24c8b15409 small fixes 2024-02-25 02:38:35 +01:00
avanspector
88add0b6b1 Improve Haiku support 2024-02-25 02:24:52 +01:00
Laytan Laats
a8c4f46747 fix ci 2024-02-07 19:53:52 +01:00
gingerBill
a08250ac5b Improve error handling for missing library collection provided by the compiler 2024-02-07 17:15:59 +00:00
gingerBill
9fb090d1b8 Merge pull request #3141 from laytan/add-all-packages-flag-for-tests
Add `odin test -all-packages` to be able to test an entire project
2024-01-31 11:59:54 +00:00
gingerBill
6a07effdd2 Freestanding - default to nil allocator; wasm - default to panic allocator 2024-01-28 22:15:28 +00:00