2
0
mirror of https://github.com/FWGS/hlsdk-xash3d synced 2024-11-21 09:26:14 +01:00

Add WebAssembly and Solaris definitions from engine

This commit is contained in:
Alibek Omarov 2024-11-07 07:46:13 +03:00
parent 852fc5abaa
commit 82f85a4a6e
3 changed files with 28 additions and 0 deletions

View File

@ -54,6 +54,8 @@ check_group_build_target(XASH_SERENITY XASH_PLATFORM)
check_group_build_target(XASH_IRIX XASH_PLATFORM)
check_group_build_target(XASH_NSWITCH XASH_PLATFORM)
check_group_build_target(XASH_PSVITA XASH_PLATFORM)
check_group_build_target(XASH_WASI XASH_PLATFORM)
check_group_build_target(XASH_SUNOS XASH_PLATFORM)
check_group_build_target(XASH_X86 XASH_ARCHITECTURE)
check_group_build_target(XASH_AMD64 XASH_ARCHITECTURE)
check_group_build_target(XASH_ARM XASH_ARCHITECTURE)
@ -105,6 +107,10 @@ elseif(XASH_PSVITA)
set(BUILDOS "psvita")
elseif(XASH_IRIX)
set(BUILDOS "irix")
elseif(XASH_WASI)
set(BUILDOS "wasi")
elseif(XASH_SUNOS)
set(BUILDOS "sunos")
else()
message(SEND_ERROR "Place your operating system name here! If this is a mistake, try to fix conditions above and report a bug")
endif()

View File

@ -81,10 +81,13 @@ Then you can use another oneliner to query all variables:
#undef XASH_RISCV_SINGLEFP
#undef XASH_RISCV_SOFTFP
#undef XASH_SERENITY
#undef XASH_SUNOS
#undef XASH_WIN32
#undef XASH_X86
#undef XASH_NSWITCH
#undef XASH_PSVITA
#undef XASH_WASI
#undef XASH_WASM
//================================================================
//
@ -126,6 +129,10 @@ Then you can use another oneliner to query all variables:
#define XASH_NSWITCH 1
#elif defined __vita__
#define XASH_PSVITA 1
#elif defined __wasi__
#define XASH_WASI 1
#elif defined __sun__
#define XASH_SUNOS 1
#else
#error
#endif
@ -234,10 +241,19 @@ Then you can use another oneliner to query all variables:
#else
#error "Unknown RISC-V float ABI"
#endif
#elif defined __wasm__
#if defined __wasm64__
#define XASH_64BIT 1
#endif
#define XASH_WASM 1
#else
#error "Place your architecture name here! If this is a mistake, try to fix conditions above and report a bug"
#endif
#if !XASH_64BIT && ( defined( __LP64__ ) || defined( _LP64 ))
#define XASH_64BIT 1
#endif
#if XASH_ARM == 8
#define XASH_ARMv8 1
#elif XASH_ARM == 7

View File

@ -60,6 +60,8 @@ DEFINES = [
'XASH_X86',
'XASH_NSWITCH',
'XASH_PSVITA',
'XASH_WASI',
'XASH_SUNOS',
]
def configure(conf):
@ -97,6 +99,10 @@ def configure(conf):
buildos = "psvita"
elif conf.env.XASH_IRIX:
buildos = "irix"
elif conf.env.XASH_WASI:
buildos = "wasi"
elif conf.env.XASH_SUNOS:
buildos = "sunos"
else:
conf.fatal("Place your operating system name in build.h and library_naming.py!\n"
"If this is a mistake, try to fix conditions above and report a bug")