diff options
author | Morgan Brown <morganbr@users.noreply.github.com> | 2017-12-05 09:45:38 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-05 09:45:38 +0300 |
commit | 3d25db5b1c010346bbc480a20646c80ea413492f (patch) | |
tree | e49e79d7ef6cd6861dd54d6db5262dfce216e695 /src/Native/Runtime/CommonMacros.h | |
parent | c900f3d03df888df2271cc7e207cdc645ae94aa2 (diff) |
Build runtime and libraries for WebAssembly (#4876)
* Fix issues building the runtime, corelib and type loader for WebAssembly
* Fix test infrastructure to allow running with the wasm flavor
Diffstat (limited to 'src/Native/Runtime/CommonMacros.h')
-rw-r--r-- | src/Native/Runtime/CommonMacros.h | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/src/Native/Runtime/CommonMacros.h b/src/Native/Runtime/CommonMacros.h index 8fc0a5a66..94c1e2d3a 100644 --- a/src/Native/Runtime/CommonMacros.h +++ b/src/Native/Runtime/CommonMacros.h @@ -5,15 +5,6 @@ #ifndef __COMMONMACROS_H__ #define __COMMONMACROS_H__ -// Some of our header files are shared with the binder, which needs the _TARGET_* macros defined -#if defined(_TARGET_AMD64_) -#elif defined(_TARGET_X86_) -#elif defined(_TARGET_ARM_) -#elif defined(_TARGET_ARM64_) -#else -#error Unsupported architecture -#endif - #define EXTERN_C extern "C" #define FASTCALL __fastcall #define STDCALL __stdcall @@ -127,6 +118,11 @@ EXTERN_C int __cdecl memcmp(const void *,const void *,size_t); #define LOG2_PTRSIZE 3 #define POINTER_SIZE 8 +#elif defined (_WASM_) + +#define LOG2_PTRSIZE 2 +#define POINTER_SIZE 4 + #else #error Unsupported target architecture #endif @@ -158,6 +154,13 @@ EXTERN_C int __cdecl memcmp(const void *,const void *,size_t); #define OS_PAGE_SIZE 0x1000 #endif +#elif defined(_WASM_) + +#define DATA_ALIGNMENT 4 +#ifndef OS_PAGE_SIZE +#define OS_PAGE_SIZE 0x4 +#endif + #else #error Unsupported target architecture #endif @@ -233,4 +236,4 @@ typedef int32_t HRESULT; #endif // !defined(_INC_WINDOWS) && !defined(BINDER) #endif // GCENV_INCLUDED -#endif // __COMMONMACROS_H__
\ No newline at end of file +#endif // __COMMONMACROS_H__ |