wasm: don’t assume musl
This commit is contained in:
parent
9abff4af4f
commit
d591a109be
|
@ -46,7 +46,7 @@ rec {
|
||||||
isWasi = { kernel = kernels.wasi; };
|
isWasi = { kernel = kernels.wasi; };
|
||||||
|
|
||||||
isAndroid = [ { abi = abis.android; } { abi = abis.androideabi; } ];
|
isAndroid = [ { abi = abis.android; } { abi = abis.androideabi; } ];
|
||||||
isMusl = (with abis; map (a: { abi = a; }) [ musl musleabi musleabihf ]) ++ [{ kernel = kernels.wasi; }];
|
isMusl = with abis; map (a: { abi = a; }) [ musl musleabi musleabihf ];
|
||||||
isUClibc = with abis; map (a: { abi = a; }) [ uclibc uclibceabi uclibceabihf ];
|
isUClibc = with abis; map (a: { abi = a; }) [ uclibc uclibceabi uclibceabihf ];
|
||||||
|
|
||||||
isEfi = map (family: { cpu.family = family; })
|
isEfi = map (family: { cpu.family = family; })
|
||||||
|
|
|
@ -23,7 +23,8 @@ stdenv.mkDerivation rec {
|
||||||
'' + lib.optionalString stdenv.hostPlatform.isMusl ''
|
'' + lib.optionalString stdenv.hostPlatform.isMusl ''
|
||||||
patchShebangs utils/cat_files.py
|
patchShebangs utils/cat_files.py
|
||||||
'';
|
'';
|
||||||
nativeBuildInputs = [ cmake ] ++ stdenv.lib.optional stdenv.hostPlatform.isMusl python;
|
nativeBuildInputs = [ cmake ]
|
||||||
|
++ stdenv.lib.optional (stdenv.hostPlatform.isMusl || stdenv.hostPlatform.isWasi) python;
|
||||||
|
|
||||||
buildInputs = [ libcxxabi ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
|
buildInputs = [ libcxxabi ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
|
||||||
|
|
||||||
|
@ -31,11 +32,12 @@ stdenv.mkDerivation rec {
|
||||||
"-DLIBCXX_LIBCXXABI_LIB_PATH=${libcxxabi}/lib"
|
"-DLIBCXX_LIBCXXABI_LIB_PATH=${libcxxabi}/lib"
|
||||||
"-DLIBCXX_LIBCPPABI_VERSION=2"
|
"-DLIBCXX_LIBCPPABI_VERSION=2"
|
||||||
"-DLIBCXX_CXX_ABI=libcxxabi"
|
"-DLIBCXX_CXX_ABI=libcxxabi"
|
||||||
] ++ stdenv.lib.optional stdenv.hostPlatform.isMusl "-DLIBCXX_HAS_MUSL_LIBC=1"
|
] ++ stdenv.lib.optional (stdenv.hostPlatform.isMusl || stdenv.hostPlatform.isWasi) "-DLIBCXX_HAS_MUSL_LIBC=1"
|
||||||
++ stdenv.lib.optional (stdenv.hostPlatform.useLLVM or false) "-DLIBCXX_USE_COMPILER_RT=ON"
|
++ stdenv.lib.optional (stdenv.hostPlatform.useLLVM or false) "-DLIBCXX_USE_COMPILER_RT=ON"
|
||||||
++ stdenv.lib.optional stdenv.hostPlatform.isWasm [
|
++ stdenv.lib.optional stdenv.hostPlatform.isWasm [
|
||||||
"-DLIBCXX_ENABLE_THREADS=OFF"
|
"-DLIBCXX_ENABLE_THREADS=OFF"
|
||||||
"-DLIBCXX_ENABLE_FILESYSTEM=OFF"
|
"-DLIBCXX_ENABLE_FILESYSTEM=OFF"
|
||||||
|
"-DLIBCXX_ENABLE_EXCEPTIONS=OFF"
|
||||||
] ++ stdenv.lib.optional (!enableShared) "-DLIBCXX_ENABLE_SHARED=OFF";
|
] ++ stdenv.lib.optional (!enableShared) "-DLIBCXX_ENABLE_SHARED=OFF";
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
|
@ -15,6 +15,7 @@ stdenv.mkDerivation {
|
||||||
] ++ stdenv.lib.optionals stdenv.hostPlatform.isWasm [
|
] ++ stdenv.lib.optionals stdenv.hostPlatform.isWasm [
|
||||||
"-DUNIX=ON"
|
"-DUNIX=ON"
|
||||||
"-DLIBCXXABI_ENABLE_THREADS=OFF"
|
"-DLIBCXXABI_ENABLE_THREADS=OFF"
|
||||||
|
"-DLIBCXXABI_ENABLE_EXCEPTIONS=OFF"
|
||||||
] ++ stdenv.lib.optionals (!enableShared) [
|
] ++ stdenv.lib.optionals (!enableShared) [
|
||||||
"-DLIBCXXABI_ENABLE_SHARED=OFF"
|
"-DLIBCXXABI_ENABLE_SHARED=OFF"
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in a new issue