Enable to build wamrc with custom llvm and fix some compile warnings (#672)

Enable to build wamrc with custom llvm, enable to auto detect processor on apple silicon, and fix some compile warnings.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
This commit is contained in:
Huang Qi
2021-07-26 09:29:19 +08:00
committed by GitHub
parent 28f104036c
commit 586752735b
4 changed files with 22 additions and 18 deletions

View File

@ -339,8 +339,7 @@ static os_thread_local_attribute uint8 *sigalt_stack_base_addr;
#if defined(__clang__)
#pragma clang optimize off
#endif
#if defined(__GNUC__)
#elif defined(__GNUC__)
#pragma GCC push_options
#pragma GCC optimize("O0")
__attribute__((no_sanitize_address))
@ -361,11 +360,10 @@ touch_pages(uint8 *stack_min_addr, uint32 page_size)
}
return sum;
}
#if defined(__GNUC__)
#pragma GCC pop_options
#endif
#if defined(__clang__)
#pragma clang optimize on
#elif defined(__GNUC__)
#pragma GCC pop_options
#endif
static bool