You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
; Linux can use different build toolchain, but the toolchain can not be changed in this file:
69
-
; - musl (default): used for general linux distros, can build `musl-static` target only.
70
-
; - zig (WIP): used for general linux distros, can build `musl`and `glibc` targets.
71
-
; - musl-native: used for alpine linux, can build `musl-static` and `musl`(WIP) target.
72
-
; - gnu-native (assume): used for general linux distros, can build `glibc` target only and have portability issues.
68
+
; Linux can use different build toolchains.
69
+
; - musl (default, when SPC_LIBC=musl): used for general linux distros, can build `musl` (statically linked) only.
70
+
; - zig (will become default): usable on all Linux distros, can build `-musl`, `arch-linux-musl -dynamic` and `arch-linux-gnu` targets. Can specify version such as `x86_64-linux-gnu.2.17`.
71
+
; - musl-native: used for alpine linux, can build `musl` and `musl -dynamic` target.
72
+
; - gnu-native: used for general linux distros, can build gnu target for the installed glibc version only.
73
73
74
-
; build target:
75
-
; - musl-static (default): pure static linking, using musl-libc, can run on any linux distro.
76
-
; - musl: static linking with dynamic linking to musl-libc, can run on musl-based linux distro.
77
-
; - glibc: static linking with dynamic linking to glibc, can run on glibc-based linux distro.
78
-
79
-
; include PATH for musl libc.
74
+
; LEGACY option to specify the target, switch to SPC_TARGET with zig toolchain instead
80
75
SPC_LIBC=musl
81
-
SPC_LIBC_VERSION=
82
-
SPC_LIBC_LINKAGE=-static
76
+
77
+
; Recommended: specify your target here. Zig toolchain will be used.
78
+
; examples:
79
+
; `native-native-gnu` - links against glibc, version 2.17
80
+
; `native-native-gnu.2.17` - links against glibc, version 2.17
81
+
; `native-native` - static linking against musl
82
+
; `native-native-musl -dynamic` - links against musl libc
'glibc' => !SystemUtil::isMuslDist() ? GccNativeToolchain::class : thrownewWrongUsageException('SPC_TARGET must be musl-static or musl for musl dist.'),
27
+
'glibc' => !SystemUtil::isMuslDist() ? GccNativeToolchain::class : thrownewWrongUsageException('SPC_TARGET must be musl for musl dist.'),
thrownewWrongUsageException('You are building with zig, but zig is not installed, please install zig first. (You can use `doctor` command to install it)');
0 commit comments