I have recently taken on the perilous and possibly regrettable task of using the zig compiler as my default compiler on top of a musl-clang install. So far, have made a successful compile of 6.6.8 zen using the settings below. However, one consistent issue I have been running into is anything having to do with meson. I realize any sane person would use a fallback compiler-clang fallback, but clearly I'm not all there.
Instead, I want to create a custom USE Flag so that I can patch in this PR, bake in support for zig without waiting for upstream (I am very impatient). From here I also hope to start making experimental ZIG use flags for other packages where zig-specific compatibility patches might be needed. I apologize in advance if this seems like a newbie question, but could someone point me into the right direction on implementing this? For the curious, see below for my make.conf
Code: Select all
### CFLAGS ###
COMMON_FLAGS="-O2 -pipe -march=znver3"
CFLAGS="${COMMON_FLAGS} -flto=thin"
CXXFLAGS="${COMMON_FLAGS} -flto=thin"
FCFLAGS="${COMMON_FLAGS}"
FFLAGS="${COMMON_FLAGS}"
LDFLAGS="${LDFLAGS} -Wl,-O2 -Wl,--as-needed"
### ZIG ENV (Default env) ###
CC="zig cc --target=x86_64-linux-musl"
CXX="zig c++ --target=x86_64-linux-musl"
AR="zig ar"
RANLIB="zig ranlib"
CHOST="x86_64-gentoo-linux-musl"
ZIG_TARGET="x86_64-linux-musl"
ZIG_MCPU="znver3"
LC_MESSAGES=C.utf8
MAKEOPTS="-j16 -l16"
FEATURES="ccache parallel-fetch"
ACCEPT_LICENSE=*


