Skip to content

Commit 1a04f77

Browse files
committed
so/runtime: bare GOOS as fallback
1 parent 63574b7 commit 1a04f77

2 files changed

Lines changed: 4 additions & 10 deletions

File tree

so/runtime/runtime.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ var runtime_h string
99
// one of darwin, linux, windows, and so on.
1010
//
1111
//so:extern
12-
const GOOS string = "unknown"
12+
const GOOS string = "bare"
1313

1414
// GOARCH is the running program's architecture target:
1515
// one of amd64, arm64, and so on.
@@ -19,11 +19,7 @@ const GOARCH string = "unknown"
1919

2020
// Recognized GOOS/GOARCH pairs are:
2121
// GOOS GOARCH
22-
// bare amd64
23-
// bare arm64
24-
// bare 386
25-
// bare riscv64
26-
// bare wasm
22+
// bare *
2723
// darwin amd64
2824
// darwin arm64
2925
// linux amd64

so/runtime/runtime.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,7 @@ static inline uint64_t runtime_Seed(void) {
4747

4848
#define runtime_buildVersion so_str(so_version)
4949

50-
#ifndef so_build_hosted
51-
#define runtime_GOOS so_str("bare")
52-
#elif defined(so_build_darwin)
50+
#if defined(so_build_darwin)
5351
#define runtime_GOOS so_str("darwin")
5452
#elif defined(so_build_linux)
5553
#define runtime_GOOS so_str("linux")
@@ -66,7 +64,7 @@ static inline uint64_t runtime_Seed(void) {
6664
#elif defined(so_build_windows)
6765
#define runtime_GOOS so_str("windows")
6866
#else
69-
#define runtime_GOOS so_str("unknown")
67+
#define runtime_GOOS so_str("bare")
7068
#endif
7169

7270
#if defined(so_build_amd64)

0 commit comments

Comments
 (0)