File tree Expand file tree Collapse file tree 4 files changed +8
-3
lines changed
Expand file tree Collapse file tree 4 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 1+ # .clang-suppression:
2+ # Suppress -Winvalid-offsetof warnings in SpiderMonkey
3+ [invalid-offsetof]
4+ src:*/spidermonkey-obj/*
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ Checks: >
1111 misc-unused-alias-decls,
1212 misc-unused-using-decls,
1313 -clang-analyzer-optin.core.EnumCastOutOfRange,
14+ -clang-analyzer-optin.cplusplus.UninitializedObject,
1415 -cppcoreguidelines-avoid-do-while,
1516 -cppcoreguidelines-avoid-c-arrays,
1617 -cppcoreguidelines-pro-type-reinterpret-cast,
Original file line number Diff line number Diff line change 11set (WASI 1)
22set (CMAKE_CXX_STANDARD 23)
3+ set (SUPP_FILE ${CMAKE_SOURCE_DIR} /.clang-suppressions)
34add_compile_definitions ("$<$<CONFIG :DEBUG >:DEBUG =1>" )
45
56list (APPEND CMAKE_EXE_LINKER_FLAGS
@@ -13,10 +14,11 @@ list(JOIN CMAKE_EXE_LINKER_FLAGS " " CMAKE_EXE_LINKER_FLAGS)
1314
1415list (APPEND CMAKE_CXX_FLAGS
1516 -std=gnu++23 -Wall -Werror -Qunused-arguments
16- -Wimplicit-fallthrough -Wno-unknown-warning-option -Wno-invalid-offsetof
17+ -Wimplicit-fallthrough -Wno-unknown-warning-option
1718 -fno-sized-deallocation -fno-aligned-new -mthread-model single
1819 -fPIC -fno-rtti -fno-exceptions -fno-math-errno -pipe
1920 -fno-omit-frame-pointer -funwind-tables -m32
21+ --warning-suppression-mappings=${SUPP_FILE}
2022)
2123list (JOIN CMAKE_CXX_FLAGS " " CMAKE_CXX_FLAGS )
2224
Original file line number Diff line number Diff line change @@ -15,7 +15,6 @@ add_custom_target(clang-tidy
1515 -p=${CMAKE_BINARY_DIR}
1616 -clang-tidy-binary=${CLANG_TIDY}
1717 -extra-arg=--sysroot=${WASI_SYSROOT}
18- -extra-arg=-isystem${CMAKE_BINARY_DIR}/spidermonkey-obj/dist/include
1918 -config-file=${CMAKE_SOURCE_DIR}/.clang-tidy
2019 ${CMAKE_SOURCE_DIR} /builtins
2120 ${CMAKE_SOURCE_DIR} /runtime
@@ -30,7 +29,6 @@ add_custom_target(clang-tidy-fix
3029 -clang-tidy-binary=${CLANG_TIDY}
3130 -clang-apply-replacements-binary=${CLANG_APPLY_REPLACEMENTS}
3231 -extra-arg=--sysroot=${WASI_SYSROOT}
33- -extra-arg=-isystem${CMAKE_BINARY_DIR}/spidermonkey-obj/dist/include
3432 -config-file=${CMAKE_SOURCE_DIR}/.clang-tidy
3533 -fix
3634 ${CMAKE_SOURCE_DIR} /builtins
You can’t perform that action at this time.
0 commit comments