diff options
| author | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2025-06-16 22:26:24 +0200 |
|---|---|---|
| committer | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2025-06-16 22:26:24 +0200 |
| commit | 29d9a124919a12fa213ed3b752e6f0f00626294f (patch) | |
| tree | 7278896c509123f10988af1a63c41d8595c7aaa4 | |
| parent | c4fb5ebf9b3283e0f4acfc3f6c354f30e66e8de2 (diff) | |
Add check_all scripts
| -rw-r--r-- | check_all.bat | 75 | ||||
| -rw-r--r-- | check_all.sh | 78 | ||||
| -rw-r--r-- | src/check_builtin.cpp | 5 |
3 files changed, 158 insertions, 0 deletions
diff --git a/check_all.bat b/check_all.bat new file mode 100644 index 000000000..83c7deaa9 --- /dev/null +++ b/check_all.bat @@ -0,0 +1,75 @@ +@echo off + +if "%1" == "" ( + echo Checking darwin_amd64 - expect vendor:cgtlf panic + odin check examples\all -vet -vet-tabs -strict-style -vet-style -warnings-as-errors -disallow-do -target:darwin_amd64 + echo Checking darwin_arm64 - expect vendor:cgtlf panic + odin check examples\all -vet -vet-tabs -strict-style -vet-style -warnings-as-errors -disallow-do -target:darwin_arm64 + echo Checking linux_i386 + odin check examples\all -vet -vet-tabs -strict-style -vet-style -warnings-as-errors -disallow-do -target:linux_i386 + echo Checking linux_amd64 + odin check examples\all -vet -vet-tabs -strict-style -vet-style -warnings-as-errors -disallow-do -target:linux_amd64 + echo Checking linux_arm64 + odin check examples\all -vet -vet-tabs -strict-style -vet-style -warnings-as-errors -disallow-do -target:linux_arm64 + echo Checking linux_arm32 + odin check examples\all -vet -vet-tabs -strict-style -vet-style -warnings-as-errors -disallow-do -target:linux_arm32 + echo Checking linux_riscv64 + odin check examples\all -vet -vet-tabs -strict-style -vet-style -warnings-as-errors -disallow-do -target:linux_riscv64 + echo Checking windows_i386 + odin check examples\all -vet -vet-tabs -strict-style -vet-style -warnings-as-errors -disallow-do -target:windows_i386 + echo Checking windows_amd64 + odin check examples\all -vet -vet-tabs -strict-style -vet-style -warnings-as-errors -disallow-do -target:windows_amd64 + echo Checking freebsd_amd64 + odin check examples\all -vet -vet-tabs -strict-style -vet-style -warnings-as-errors -disallow-do -target:freebsd_amd64 + echo Checking freebsd_arm64 + odin check examples\all -vet -vet-tabs -strict-style -vet-style -warnings-as-errors -disallow-do -target:freebsd_arm64 + echo Checking netbsd_amd64 + odin check examples\all -vet -vet-tabs -strict-style -vet-style -warnings-as-errors -disallow-do -target:netbsd_amd64 + echo Checking netbsd_arm64 + odin check examples\all -vet -vet-tabs -strict-style -vet-style -warnings-as-errors -disallow-do -target:netbsd_arm64 + echo Checking openbsd_amd64 + odin check examples\all -vet -vet-tabs -strict-style -vet-style -warnings-as-errors -disallow-do -target:openbsd_amd64 +) + +if "%1" == "freestanding" ( + echo Checking freestanding_wasm32 + odin check examples\all -vet -vet-tabs -strict-style -vet-style -warnings-as-errors -disallow-do -target:freestanding_wasm32 + echo Checking freestanding_wasm64p32 + odin check examples\all -vet -vet-tabs -strict-style -vet-style -warnings-as-errors -disallow-do -target:freestanding_wasm64p32 + echo Checking freestanding_amd64_sysv + odin check examples\all -vet -vet-tabs -strict-style -vet-style -warnings-as-errors -disallow-do -target:freestanding_amd64_sysv + echo Checking freestanding_amd64_win64 + odin check examples\all -vet -vet-tabs -strict-style -vet-style -warnings-as-errors -disallow-do -target:freestanding_amd64_win64 + echo Checking freestanding_arm64 + odin check examples\all -vet -vet-tabs -strict-style -vet-style -warnings-as-errors -disallow-do -target:freestanding_arm64 + echo Checking freestanding_arm32 + odin check examples\all -vet -vet-tabs -strict-style -vet-style -warnings-as-errors -disallow-do -target:freestanding_arm32 + echo Checking freestanding_riscv64 + odin check examples\all -vet -vet-tabs -strict-style -vet-style -warnings-as-errors -disallow-do -target:freestanding_riscv64 +) + +if "%1" == "rare" ( + echo Checking essence_amd64 + odin check examples\all -vet -vet-tabs -strict-style -vet-style -warnings-as-errors -disallow-do -target:essence_amd64 + echo Checking freebsd_i386 + odin check examples\all -vet -vet-tabs -strict-style -vet-style -warnings-as-errors -disallow-do -target:freebsd_i386 + echo Checking haiku_amd64 + odin check examples\all -vet -vet-tabs -strict-style -vet-style -warnings-as-errors -disallow-do -target:haiku_amd64 +) + +if "%1" == "wasm" ( + echo Checking freestanding_wasm32 + odin check examples\all -vet -vet-tabs -strict-style -vet-style -warnings-as-errors -disallow-do -target:freestanding_wasm32 + echo Checking freestanding_wasm64p32 + odin check examples\all -vet -vet-tabs -strict-style -vet-style -warnings-as-errors -disallow-do -target:freestanding_wasm64p32 + echo Checking wasi_wasm64p32 + odin check examples\all -vet -vet-tabs -strict-style -vet-style -warnings-as-errors -disallow-do -target:wasi_wasm64p32 + echo Checking wasi_wasm32 + odin check examples\all -vet -vet-tabs -strict-style -vet-style -warnings-as-errors -disallow-do -target:wasi_wasm32 + echo Checking js_wasm32 + odin check examples\all -vet -vet-tabs -strict-style -vet-style -warnings-as-errors -disallow-do -target:js_wasm32 + echo Checking orca_wasm32 + odin check examples\all -vet -vet-tabs -strict-style -vet-style -warnings-as-errors -disallow-do -target:orca_wasm32 + echo Checking js_wasm64p32 + odin check examples\all -vet -vet-tabs -strict-style -vet-style -warnings-as-errors -disallow-do -target:js_wasm64p32 +)
\ No newline at end of file diff --git a/check_all.sh b/check_all.sh new file mode 100644 index 000000000..fb32b8cc2 --- /dev/null +++ b/check_all.sh @@ -0,0 +1,78 @@ +#!/bin/sh + +case $1 in +freestanding) + echo Checking freestanding_wasm32 + odin check examples/all -vet -vet-tabs -strict-style -vet-style -warnings-as-errors -disallow-do -target:freestanding_wasm32 + echo Checking freestanding_wasm64p32 + odin check examples/all -vet -vet-tabs -strict-style -vet-style -warnings-as-errors -disallow-do -target:freestanding_wasm64p32 + echo Checking freestanding_amd64_sysv + odin check examples/all -vet -vet-tabs -strict-style -vet-style -warnings-as-errors -disallow-do -target:freestanding_amd64_sysv + echo Checking freestanding_amd64_win64 + odin check examples/all -vet -vet-tabs -strict-style -vet-style -warnings-as-errors -disallow-do -target:freestanding_amd64_win64 + echo Checking freestanding_arm64 + odin check examples/all -vet -vet-tabs -strict-style -vet-style -warnings-as-errors -disallow-do -target:freestanding_arm64 + echo Checking freestanding_arm32 + odin check examples/all -vet -vet-tabs -strict-style -vet-style -warnings-as-errors -disallow-do -target:freestanding_arm32 + echo Checking freestanding_riscv64 + odin check examples/all -vet -vet-tabs -strict-style -vet-style -warnings-as-errors -disallow-do -target:freestanding_riscv64 + ;; + +rare) + echo Checking essence_amd64 + odin check examples/all -vet -vet-tabs -strict-style -vet-style -warnings-as-errors -disallow-do -target:essence_amd64 + echo Checking freebsd_i386 + odin check examples/all -vet -vet-tabs -strict-style -vet-style -warnings-as-errors -disallow-do -target:freebsd_i386 + echo Checking haiku_amd64 + odin check examples/all -vet -vet-tabs -strict-style -vet-style -warnings-as-errors -disallow-do -target:haiku_amd64 + ;; + +wasm) + echo Checking freestanding_wasm32 + odin check examples/all -vet -vet-tabs -strict-style -vet-style -warnings-as-errors -disallow-do -target:freestanding_wasm32 + echo Checking freestanding_wasm64p32 + odin check examples/all -vet -vet-tabs -strict-style -vet-style -warnings-as-errors -disallow-do -target:freestanding_wasm64p32 + echo Checking wasi_wasm64p32 + odin check examples/all -vet -vet-tabs -strict-style -vet-style -warnings-as-errors -disallow-do -target:wasi_wasm64p32 + echo Checking wasi_wasm32 + odin check examples/all -vet -vet-tabs -strict-style -vet-style -warnings-as-errors -disallow-do -target:wasi_wasm32 + echo Checking js_wasm32 + odin check examples/all -vet -vet-tabs -strict-style -vet-style -warnings-as-errors -disallow-do -target:js_wasm32 + echo Checking orca_wasm32 + odin check examples/all -vet -vet-tabs -strict-style -vet-style -warnings-as-errors -disallow-do -target:orca_wasm32 + echo Checking js_wasm64p32 + odin check examples/all -vet -vet-tabs -strict-style -vet-style -warnings-as-errors -disallow-do -target:js_wasm64p32 + ;; + +*) + echo Checking darwin_amd64 - expect vendor:cgtlf panic + odin check examples/all -vet -vet-tabs -strict-style -vet-style -warnings-as-errors -disallow-do -target:darwin_amd64 + echo Checking darwin_arm64 - expect vendor:cgtlf panic + odin check examples/all -vet -vet-tabs -strict-style -vet-style -warnings-as-errors -disallow-do -target:darwin_arm64 + echo Checking linux_i386 + odin check examples/all -vet -vet-tabs -strict-style -vet-style -warnings-as-errors -disallow-do -target:linux_i386 + echo Checking linux_amd64 + odin check examples/all -vet -vet-tabs -strict-style -vet-style -warnings-as-errors -disallow-do -target:linux_amd64 + echo Checking linux_arm64 + odin check examples/all -vet -vet-tabs -strict-style -vet-style -warnings-as-errors -disallow-do -target:linux_arm64 + echo Checking linux_arm32 + odin check examples/all -vet -vet-tabs -strict-style -vet-style -warnings-as-errors -disallow-do -target:linux_arm32 + echo Checking linux_riscv64 + odin check examples/all -vet -vet-tabs -strict-style -vet-style -warnings-as-errors -disallow-do -target:linux_riscv64 + echo Checking windows_i386 + odin check examples/all -vet -vet-tabs -strict-style -vet-style -warnings-as-errors -disallow-do -target:windows_i386 + echo Checking windows_amd64 + odin check examples/all -vet -vet-tabs -strict-style -vet-style -warnings-as-errors -disallow-do -target:windows_amd64 + echo Checking freebsd_amd64 + odin check examples/all -vet -vet-tabs -strict-style -vet-style -warnings-as-errors -disallow-do -target:freebsd_amd64 + echo Checking freebsd_arm64 + odin check examples/all -vet -vet-tabs -strict-style -vet-style -warnings-as-errors -disallow-do -target:freebsd_arm64 + echo Checking netbsd_amd64 + odin check examples/all -vet -vet-tabs -strict-style -vet-style -warnings-as-errors -disallow-do -target:netbsd_amd64 + echo Checking netbsd_arm64 + odin check examples/all -vet -vet-tabs -strict-style -vet-style -warnings-as-errors -disallow-do -target:netbsd_arm64 + echo Checking openbsd_amd64 + odin check examples/all -vet -vet-tabs -strict-style -vet-style -warnings-as-errors -disallow-do -target:openbsd_amd64 + ;; + +esac
\ No newline at end of file diff --git a/src/check_builtin.cpp b/src/check_builtin.cpp index bd265affc..9f9787b61 100644 --- a/src/check_builtin.cpp +++ b/src/check_builtin.cpp @@ -148,6 +148,11 @@ gb_internal bool does_require_msgSend_stret(Type *return_type) { if (return_type == nullptr) { return false; } + + if (build_context.metrics.os != TargetOs_darwin) { + return false; + } + if (build_context.metrics.arch == TargetArch_i386 || build_context.metrics.arch == TargetArch_amd64) { i64 struct_limit = type_size_of(t_uintptr) << 1; return type_size_of(return_type) > struct_limit; |