ci: test -os linux cross compilation on macOS

This commit is contained in:
Alexander Medvednikov 2024-10-26 18:10:44 +03:00
parent d25f281b25
commit 2684ef94e3
4 changed files with 9 additions and 3 deletions

View File

@ -98,3 +98,7 @@ jobs:
run: v test examples/readline/
- name: Test vlib modules with -skip-unused
run: v -skip-unused test vlib/builtin/ vlib/math vlib/flag/ vlib/os/ vlib/strconv/
- name: Test cross compilation to Linux
run: |
v -d use_openssl -cc clang -showcc -gc none -o hi -os linux examples/hello_world.v
v -d use_openssl -cc clang -showcc -gc none -o hi -os linux examples/veb/veb_example.v

View File

@ -43,13 +43,14 @@ For a list of all features and fixes, check out the changelog.
- [x] Lambdas: `a.sort(|a, b| a > b)`
- [ ] Custom attributes
- [ ] Contexts that are passed implicitly (e.g. for custom allocation/memory management)
- [ ] Direct C/C++ interop without generating wrappers
## [Version 0.6]
- [ ] Integrate the new parallel parser/checker/cgen
- [ ] Incremental compilation
- [ ] Runtime race detector
- [ ] [Thread safe maps](https://github.com/vlang/v/discussions/11729)
- [ ] Direct C/C++ interop without generating wrappers
- [ ] `recover()` from panics
- [ ] -usecache on by default
- [ ] -skip-unused on by default

View File

@ -1,6 +1,7 @@
module picoev
#include <sys/epoll.h>
#include <sys/cdefs.h> // needed for cross compiling to linux
fn C.epoll_create(int) int
fn C.epoll_wait(int, voidptr, int, int) int

View File

@ -848,7 +848,7 @@ fn (mut b Builder) cc_linux_cross() {
obj_file := b.out_name_c + '.o'
cflags := b.get_os_cflags()
defines, others, libs := cflags.defines_others_libs()
mut cc_args := []string{}
mut cc_args := []string{cap: 20}
cc_args << '-w'
cc_args << '-fPIC'
cc_args << '-c'
@ -916,7 +916,7 @@ fn (mut b Builder) cc_freebsd_cross() {
obj_file := b.out_name_c + '.o'
cflags := b.get_os_cflags()
defines, others, libs := cflags.defines_others_libs()
mut cc_args := []string{}
mut cc_args := []string{cap: 20}
cc_args << '-w'
cc_args << '-fPIC'
cc_args << '-c'