many things, cosmo build!
This commit is contained in:
@@ -6,6 +6,9 @@
|
||||
#ifndef COM_DEF_H
|
||||
#define COM_DEF_H
|
||||
|
||||
#define COM_DEF_STRLIT_(x) #x
|
||||
#define COM_DEF_STRLIT(x) COM_DEF_STRLIT_(x)
|
||||
|
||||
#define COM_DEF_COMPILER_CLANG 1
|
||||
#define COM_DEF_COMPILER_GCC 2
|
||||
|
||||
@@ -17,6 +20,7 @@
|
||||
|
||||
#define COM_DEF_TARGET_LINUX 1
|
||||
#define COM_DEF_TARGET_WASM 2
|
||||
#define COM_DEF_TARGET_COSMO 3
|
||||
|
||||
#if defined(__wasm__)
|
||||
#define COM_DEF_TARGET COM_DEF_TARGET_WASM
|
||||
@@ -24,6 +28,9 @@
|
||||
#elif defined(__linux__)
|
||||
#define COM_DEF_TARGET COM_DEF_TARGET_LINUX
|
||||
#define com_def_export_sym(m_s) __attribute__((visibility("default")))
|
||||
#elif defined(__COSMOPOLITAN__)
|
||||
#define COM_DEF_TARGET COM_DEF_TARGET_COSMO
|
||||
#define com_def_export_sym(m_s) __attribute__((visibility("default")))
|
||||
#else
|
||||
#error Unknown target.
|
||||
#endif
|
||||
@@ -31,6 +38,7 @@
|
||||
#define COM_DEF_CPU_AMD64 1
|
||||
#define COM_DEF_CPU_X86 2
|
||||
#define COM_DEF_CPU_WASM32 3
|
||||
#define COM_DEF_CPU_AARCH64 4
|
||||
|
||||
#if defined(__wasm__)
|
||||
#define COM_DEF_CPU COM_DEF_CPU_WASM32
|
||||
@@ -44,6 +52,10 @@
|
||||
#define COM_DEF_CPU COM_DEF_CPU_X86
|
||||
#define COM_DEF_ALIGNMENT 16
|
||||
#define COM_DEF_CPU_LITEND 1
|
||||
#elif defined(__aarch64__)
|
||||
#define COM_DEF_CPU COM_DEF_CPU_AARCH64
|
||||
#define COM_DEF_ALIGNMENT 16
|
||||
#define COM_DEF_CPU_LITEND 1
|
||||
#else
|
||||
#error Unknown cpu.
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user