Signed-off-by: falkTX <falktx@falktx.com>tags/23.02
@@ -877,7 +877,7 @@ jobs: | |||||
run: | | run: | | ||||
source ~/emsdk/emsdk_env.sh | source ~/emsdk/emsdk_env.sh | ||||
make features | make features | ||||
make CIBUILD=true NOPLUGINS=true NOOPT=true STATIC_BUILD=true USE_GLES2=true -j $(nproc) | |||||
make CIBUILD=true NOPLUGINS=true NOOPT=true NOSIMD=true STATIC_BUILD=true USE_GLES2=true -j $(nproc) | |||||
- name: Make wasm versioned and compress | - name: Make wasm versioned and compress | ||||
run: | | run: | | ||||
VERSION=$(cat Makefile | awk 'sub("VERSION = ","")') | VERSION=$(cat Makefile | awk 'sub("VERSION = ","")') | ||||
@@ -34,12 +34,12 @@ endif | |||||
BASE_FLAGS += -I$(abspath ../include) | BASE_FLAGS += -I$(abspath ../include) | ||||
BASE_FLAGS += -I$(abspath ../include/simd-compat) | BASE_FLAGS += -I$(abspath ../include/simd-compat) | ||||
ifeq ($(HAIKU)$(WASM),true) | |||||
BASE_FLAGS += -I$(abspath ../include/linux-compat) | |||||
ifneq (,$(findstring true,$(DEBUG)$(NOSIMD))) | |||||
BASE_FLAGS += -DCARDINAL_NOSIMD | |||||
endif | endif | ||||
ifeq ($(MOD_BUILD)$(WITH_LTO),true) | |||||
BASE_FLAGS += -ffat-lto-objects | |||||
ifeq ($(HAIKU)$(WASM),true) | |||||
BASE_FLAGS += -I$(abspath ../include/linux-compat) | |||||
endif | endif | ||||
ifneq ($(SYSDEPS),true) | ifneq ($(SYSDEPS),true) | ||||
@@ -23,6 +23,7 @@ Developer related options: | |||||
* `DEBUG=true` build non-stripped debug binaries (terrible performance, only useful for developers) | * `DEBUG=true` build non-stripped debug binaries (terrible performance, only useful for developers) | ||||
* `NOPLUGINS=true` build only the Cardinal Core plugins (not recommended, only useful for developers) | * `NOPLUGINS=true` build only the Cardinal Core plugins (not recommended, only useful for developers) | ||||
* `NOSIMD=true` build without SIMD (not recommended, only useful for developers) | |||||
Packaging related options: | Packaging related options: | ||||
@@ -17,7 +17,7 @@ | |||||
#pragma once | #pragma once | ||||
#if (defined(__i386__) || defined(__x86_64__) || defined(__EMSCRIPTEN__)) && !defined(CARDINAL_NOOPT) | |||||
#if (defined(__i386__) || defined(__x86_64__) || defined(__EMSCRIPTEN__)) && !defined(CARDINAL_NOSIMD) | |||||
# include_next <emmintrin.h> | # include_next <emmintrin.h> | ||||
#else | #else | ||||
# define SIMDE_ENABLE_NATIVE_ALIASES | # define SIMDE_ENABLE_NATIVE_ALIASES | ||||
@@ -17,7 +17,7 @@ | |||||
#pragma once | #pragma once | ||||
#if (defined(__i386__) || defined(__x86_64__) || defined(__EMSCRIPTEN__)) && !defined(CARDINAL_NOOPT) | |||||
#if (defined(__i386__) || defined(__x86_64__) || defined(__EMSCRIPTEN__)) && !defined(CARDINAL_NOSIMD) | |||||
# include_next <immintrin.h> | # include_next <immintrin.h> | ||||
#else | #else | ||||
# define SIMDE_ENABLE_NATIVE_ALIASES | # define SIMDE_ENABLE_NATIVE_ALIASES | ||||
@@ -17,9 +17,9 @@ | |||||
#pragma once | #pragma once | ||||
#if (defined(__i386__) || defined(__x86_64__)) && !defined(CARDINAL_NOOPT) | |||||
#if (defined(__i386__) || defined(__x86_64__)) && !defined(CARDINAL_NOSIMD) | |||||
# include_next <mmintrin.h> | # include_next <mmintrin.h> | ||||
#elif defined(__EMSCRIPTEN__) && !defined(CARDINAL_NOOPT) | |||||
#elif defined(__EMSCRIPTEN__) && !defined(CARDINAL_NOSIMD) | |||||
# include <wasm_simd128.h> | # include <wasm_simd128.h> | ||||
#else | #else | ||||
# define SIMDE_ENABLE_NATIVE_ALIASES | # define SIMDE_ENABLE_NATIVE_ALIASES | ||||
@@ -17,7 +17,7 @@ | |||||
#pragma once | #pragma once | ||||
#if (defined(__i386__) || defined(__x86_64__)) && !defined(CARDINAL_NOOPT) | |||||
#if (defined(__i386__) || defined(__x86_64__)) && !defined(CARDINAL_NOSIMD) | |||||
# include_next <pmmintrin.h> | # include_next <pmmintrin.h> | ||||
// bring in extra SSE3 support via simde | // bring in extra SSE3 support via simde | ||||
@@ -40,7 +40,7 @@ | |||||
# undef _WIN32_WAS_DEFINED | # undef _WIN32_WAS_DEFINED | ||||
# endif | # endif | ||||
#elif defined(__EMSCRIPTEN__) && !defined(CARDINAL_NOOPT) | |||||
#elif defined(__EMSCRIPTEN__) && !defined(CARDINAL_NOSIMD) | |||||
# include_next <pmmintrin.h> | # include_next <pmmintrin.h> | ||||
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__)) | static __inline__ __m64 __attribute__((__always_inline__, __nodebug__)) | ||||
@@ -17,7 +17,7 @@ | |||||
#pragma once | #pragma once | ||||
#if (defined(__i386__) || defined(__x86_64__) || defined(__EMSCRIPTEN__)) && !defined(CARDINAL_NOOPT) | |||||
#if (defined(__i386__) || defined(__x86_64__) || defined(__EMSCRIPTEN__)) && !defined(CARDINAL_NOSIMD) | |||||
# include_next <xmmintrin.h> | # include_next <xmmintrin.h> | ||||
#else | #else | ||||
# define SIMDE_ENABLE_NATIVE_ALIASES | # define SIMDE_ENABLE_NATIVE_ALIASES | ||||
@@ -1187,8 +1187,8 @@ ifeq ($(HEADLESS),true) | |||||
BASE_FLAGS += -DHEADLESS | BASE_FLAGS += -DHEADLESS | ||||
endif | endif | ||||
ifneq (,$(findstring true,$(DEBUG)$(NOOPT))) | |||||
BASE_FLAGS += -DCARDINAL_NOOPT | |||||
ifneq (,$(findstring true,$(DEBUG)$(NOSIMD))) | |||||
BASE_FLAGS += -DCARDINAL_NOSIMD | |||||
endif | endif | ||||
ifeq ($(BSD)$(WASM),true) | ifeq ($(BSD)$(WASM),true) | ||||
@@ -83,8 +83,8 @@ ifeq ($(HEADLESS),true) | |||||
BASE_FLAGS += -DHEADLESS | BASE_FLAGS += -DHEADLESS | ||||
endif | endif | ||||
ifneq (,$(findstring true,$(DEBUG)$(NOOPT))) | |||||
BASE_FLAGS += -DCARDINAL_NOOPT | |||||
ifneq (,$(findstring true,$(DEBUG)$(NOSIMD))) | |||||
BASE_FLAGS += -DCARDINAL_NOSIMD | |||||
endif | endif | ||||
ifeq ($(BSD),true) | ifeq ($(BSD),true) | ||||
@@ -298,8 +298,8 @@ ifeq ($(HEADLESS),true) | |||||
BASE_FLAGS += -DHEADLESS | BASE_FLAGS += -DHEADLESS | ||||
endif | endif | ||||
ifneq (,$(findstring true,$(DEBUG)$(NOOPT))) | |||||
BASE_FLAGS += -DCARDINAL_NOOPT | |||||
ifneq (,$(findstring true,$(DEBUG)$(NOSIMD))) | |||||
BASE_FLAGS += -DCARDINAL_NOSIMD | |||||
endif | endif | ||||
ifeq ($(MOD_BUILD),true) | ifeq ($(MOD_BUILD),true) | ||||
@@ -124,7 +124,7 @@ | |||||
if (!WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,2,8,1,1,97,1,98,3,127,1,6,6,1,127,1,65,0,11,7,5,1,1,97,3,1]))) { | if (!WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,2,8,1,1,97,1,98,3,127,1,6,6,1,127,1,65,0,11,7,5,1,1,97,3,1]))) { | ||||
wasmErrors.push('Importable/Exportable mutable globals unsupported'); | wasmErrors.push('Importable/Exportable mutable globals unsupported'); | ||||
} | } | ||||
if (!WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11]))) { | |||||
if (window.location.host !== "minicardinal.kx.studio" && !WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11]))) { | |||||
wasmErrors.push('Fixed-Width SIMD unsupported'); | wasmErrors.push('Fixed-Width SIMD unsupported'); | ||||
} | } | ||||
} | } | ||||