mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-07-13 15:58:14 +00:00
Compare commits
2 Commits
26e34cd331
...
34ffac6bec
Author | SHA1 | Date | |
---|---|---|---|
![]() |
34ffac6bec | ||
![]() |
0050677248 |
|
@ -7,29 +7,22 @@ if (MSVC)
|
|||
add_compile_options(/W4)
|
||||
else ()
|
||||
# refer to https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
|
||||
add_compile_options(-Wall -Wextra -Wformat -Wformat-security -Wshadow)
|
||||
add_compile_options(
|
||||
-Wall -Wextra -Wformat -Wformat-security
|
||||
$<$<COMPILE_LANGUAGE:C>:-Wshadow>
|
||||
)
|
||||
# -pedantic causes warnings like "ISO C forbids initialization between function pointer and ‘void *’" which
|
||||
# is widely used in the codebase.
|
||||
#
|
||||
# -fpermissive causes warnings like "-fpermissive is valid for C++/ObjC++ but not for C"
|
||||
#
|
||||
# _Static_assert and _Alignof requires c11 or later
|
||||
#
|
||||
#
|
||||
add_compile_options (
|
||||
-Wimplicit-function-declaration
|
||||
-Wincompatible-pointer-types
|
||||
$<$<COMPILE_LANGUAGE:C>:-Wincompatible-pointer-types>
|
||||
$<$<COMPILE_LANGUAGE:C>:-Wimplicit-function-declaration>
|
||||
)
|
||||
# waivers
|
||||
add_compile_options (
|
||||
-Wno-unused
|
||||
-Wno-unused-parameter
|
||||
)
|
||||
|
||||
if (WAMR_BUILD_JIT EQUAL 1)
|
||||
# Friendly fire on LLVM libraries.
|
||||
add_compile_options (
|
||||
-Wno-error=shadow
|
||||
)
|
||||
endif ()
|
||||
endif ()
|
||||
|
|
Loading…
Reference in New Issue
Block a user