diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bdb64880f5..d8fb114f4f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -358,8 +358,8 @@ jobs: # run: git clone --depth 1 https://github.com/vlang/vorum && cd vorum && ../v . && cd .. # - name: Build vpm # run: git clone --depth 1 https://github.com/vlang/vpm && cd vpm && ../v . && cd .. - # - name: Freestanding - # run: ./v -freestanding -o bare vlib/os/bare/bare_example_linux.v + - name: Freestanding + run: ./v -freestanding run vlib/os/bare/bare_example_linux.v - name: v self compilation run: ./v -o v2 cmd/v && ./v2 -o v3 cmd/v && ./v3 -o v4 cmd/v - name: -usecache diff --git a/vlib/builtin/linux_bare/linux_syscalls.v b/vlib/builtin/linux_bare/linux_syscalls.v index 9f18531627..5bd98ed5d4 100644 --- a/vlib/builtin/linux_bare/linux_syscalls.v +++ b/vlib/builtin/linux_bare/linux_syscalls.v @@ -236,7 +236,7 @@ fn sys_read(fd i64, buf &byte, count u64) (i64, Errno) { } // 1 sys_write -fn sys_write(fd i64, buf &byte, count u64) (i64, Errno) { +pub fn sys_write(fd i64, buf &byte, count u64) (i64, Errno) { return split_int_errno(sys_call3(1, u64(fd), u64(buf), count)) } diff --git a/vlib/os/bare/bare_example_linux.v b/vlib/os/bare/bare_example_linux.v index b2bec900e3..0aa92ddc62 100644 --- a/vlib/os/bare/bare_example_linux.v +++ b/vlib/os/bare/bare_example_linux.v @@ -4,4 +4,5 @@ fn main() { sys_write(1, s.str, u64(s.len)) a := s[0] println('Hello freestanding!') + println(a) }