diff options
author | Shravan Narayan <shravanrn@gmail.com> | 2024-11-07 19:47:50 -0600 |
---|---|---|
committer | Shravan Narayan <shravanrn@gmail.com> | 2024-11-11 16:34:42 -0600 |
commit | c7c89685fe7512d315d0a58e965c66b8e6a77be4 (patch) | |
tree | e1bf3333f5a82b93df6f7b5ff63e85e75f9d32b7 | |
parent | 2e23b86f2716877f6e24df0c39ac8f0f0e64c770 (diff) | |
download | wabt-c7c89685fe7512d315d0a58e965c66b8e6a77be4.tar.gz wabt-c7c89685fe7512d315d0a58e965c66b8e6a77be4.tar.bz2 wabt-c7c89685fe7512d315d0a58e965c66b8e6a77be4.zip |
wasm2c: disable segue in clang8 due to missing fsgsbase support
-rw-r--r-- | wasm2c/wasm-rt.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/wasm2c/wasm-rt.h b/wasm2c/wasm-rt.h index c5bad614..05757087 100644 --- a/wasm2c/wasm-rt.h +++ b/wasm2c/wasm-rt.h @@ -241,17 +241,17 @@ extern "C" { // (3) the compiler supports: intrinsics for (rd|wr)gsbase, "address namespaces" // for accessing pointers, and supports memcpy on pointers with custom // "address namespaces". GCC does not support the memcpy requirement, so -// this leaves only clang for now. +// this leaves only clang (version 9 or later) for now. // (4) The OS provides a way to query if (rd|wr)gsbase is allowed by the kernel // or the implementation has to use a syscall for this. // (5) The OS doesn't replace the segment register on context switch which // eliminates windows for now // // While more OS can be supported in the future, we only support linux for now -#if WASM_RT_ALLOW_SEGUE && !WABT_BIG_ENDIAN && \ - (defined(__x86_64__) || defined(_M_X64)) && __clang__ && \ - __has_builtin(__builtin_ia32_wrgsbase64) && !defined(_WIN32) && \ - defined(__linux__) +#if WASM_RT_ALLOW_SEGUE && !WABT_BIG_ENDIAN && \ + (defined(__x86_64__) || defined(_M_X64)) && __clang__ && \ + (__clang_major__ >= 9) && __has_builtin(__builtin_ia32_wrgsbase64) && \ + !defined(_WIN32) && defined(__linux__) #define WASM_RT_USE_SEGUE 1 #else #define WASM_RT_USE_SEGUE 0 |