Skip to content

Commit ce25f00

Browse files
QuLogicdeadprogram
authored andcommitted
Bump wasi-libc to SDK 20
The version 17 SDK adds `getpagesize`, so use it instead of hardcoding a number (even if their implementation is _also_ a hardcoded number.)
1 parent 1a59aec commit ce25f00

File tree

6 files changed

+13
-9
lines changed

6 files changed

+13
-9
lines changed

.circleci/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,10 @@ commands:
7575
- run: go install -tags=llvm<<parameters.llvm>> .
7676
- restore_cache:
7777
keys:
78-
- wasi-libc-sysroot-systemclang-v6
78+
- wasi-libc-sysroot-systemclang-v7
7979
- run: make wasi-libc
8080
- save_cache:
81-
key: wasi-libc-sysroot-systemclang-v6
81+
key: wasi-libc-sysroot-systemclang-v7
8282
paths:
8383
- lib/wasi-libc/sysroot
8484
- when:

.github/workflows/build-macos.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ jobs:
8282
uses: actions/cache@v3
8383
id: cache-wasi-libc
8484
with:
85-
key: wasi-libc-sysroot-v4
85+
key: wasi-libc-sysroot-v5
8686
path: lib/wasi-libc/sysroot
8787
- name: Build wasi-libc
8888
if: steps.cache-wasi-libc.outputs.cache-hit != 'true'

.github/workflows/linux.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ jobs:
103103
uses: actions/cache@v3
104104
id: cache-wasi-libc
105105
with:
106-
key: wasi-libc-sysroot-linux-alpine-v1
106+
key: wasi-libc-sysroot-linux-alpine-v2
107107
path: lib/wasi-libc/sysroot
108108
- name: Build wasi-libc
109109
if: steps.cache-wasi-libc.outputs.cache-hit != 'true'
@@ -250,7 +250,7 @@ jobs:
250250
uses: actions/cache@v3
251251
id: cache-wasi-libc
252252
with:
253-
key: wasi-libc-sysroot-linux-asserts-v5
253+
key: wasi-libc-sysroot-linux-asserts-v6
254254
path: lib/wasi-libc/sysroot
255255
- name: Build wasi-libc
256256
if: steps.cache-wasi-libc.outputs.cache-hit != 'true'

.github/workflows/windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ jobs:
8989
uses: actions/cache@v3
9090
id: cache-wasi-libc
9191
with:
92-
key: wasi-libc-sysroot-v4
92+
key: wasi-libc-sysroot-v5
9393
path: lib/wasi-libc/sysroot
9494
- name: Build wasi-libc
9595
if: steps.cache-wasi-libc.outputs.cache-hit != 'true'

lib/wasi-libc

Submodule wasi-libc updated 101 files

src/syscall/syscall_libc_wasi.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -398,8 +398,7 @@ func Chmod(path string, mode uint32) (err error) {
398398
}
399399

400400
func Getpagesize() int {
401-
// per upstream
402-
return 65536
401+
return libc_getpagesize()
403402
}
404403

405404
type Utsname struct {
@@ -428,6 +427,11 @@ func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno)
428427
// This is a stub, it is not functional.
429428
func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
430429

430+
// int getpagesize(void);
431+
//
432+
//export getpagesize
433+
func libc_getpagesize() int
434+
431435
// int stat(const char *path, struct stat * buf);
432436
//
433437
//export stat

0 commit comments

Comments
 (0)