mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-28 12:58:00 +03:00
Disable -Werror for ASAN builds
To avoid warnings like: In file included from /usr/include/c++/13/regex:50, from ../../components/lua/yamlloader.cpp:6: In constructor 'std::function<_Res(_ArgTypes ...)>::function(std::function<_Res(_ArgTypes ...)>&&) [with _Res = bool; _ArgTypes = {char}]', inlined from 'std::__detail::_State<_Char_type>::_State(std::__detail::_State<_Char_type>&&) [with _Char_type = char]' at /usr/include/c++/13/bits/regex_automaton.h:149:4, inlined from 'std::__detail::_StateIdT std::__detail::_NFA<_TraitsT>::_M_insert_subexpr_begin() [with _TraitsT = std::__cxx11::regex_traits<char>]' at /usr/include/c++/13/bits/regex_automaton.h:281:24: /usr/include/c++/13/bits/std_function.h:405:42: error: '*(std::function<bool(char)>*)((char*)&__tmp + offsetof(std::__detail::_StateT, std::__detail::_State<char>::<unnamed>.std::__detail::_State_base::<unnamed>)).std::function<bool(char)>::_M_invoker' may be used uninitialized [-Werror=maybe-uninitialized] 405 | : _Function_base(), _M_invoker(__x._M_invoker) | ~~~~^~~~~~~~~~ In file included from /usr/include/c++/13/regex:65: /usr/include/c++/13/bits/regex_automaton.h: In member function 'std::__detail::_StateIdT std::__detail::_NFA<_TraitsT>::_M_insert_subexpr_begin() [with _TraitsT = std::__cxx11::regex_traits<char>]': /usr/include/c++/13/bits/regex_automaton.h:279:17: note: '__tmp' declared here 279 | _StateT __tmp(_S_opcode_subexpr_begin); | ^~~~~ See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105562.
This commit is contained in:
parent
e4743e3186
commit
cc32487a94
2 changed files with 6 additions and 1 deletions
|
@ -56,6 +56,7 @@ Ubuntu_GCC_preprocess:
|
||||||
stage: build
|
stage: build
|
||||||
variables:
|
variables:
|
||||||
CMAKE_EXE_LINKER_FLAGS: -fuse-ld=mold
|
CMAKE_EXE_LINKER_FLAGS: -fuse-ld=mold
|
||||||
|
OPENMW_CXX_FLAGS: "-Werror -Werror=implicit-fallthrough"
|
||||||
script:
|
script:
|
||||||
- df -h
|
- df -h
|
||||||
- export CCACHE_BASEDIR="`pwd`"
|
- export CCACHE_BASEDIR="`pwd`"
|
||||||
|
@ -156,6 +157,8 @@ Ubuntu_GCC_asan:
|
||||||
CMAKE_CXX_FLAGS_DEBUG: -g -O1 -fno-omit-frame-pointer -fsanitize=address -fsanitize=pointer-subtract -fsanitize=leak
|
CMAKE_CXX_FLAGS_DEBUG: -g -O1 -fno-omit-frame-pointer -fsanitize=address -fsanitize=pointer-subtract -fsanitize=leak
|
||||||
CMAKE_EXE_LINKER_FLAGS: -fsanitize=address -fsanitize=pointer-subtract -fsanitize=leak -fuse-ld=mold
|
CMAKE_EXE_LINKER_FLAGS: -fsanitize=address -fsanitize=pointer-subtract -fsanitize=leak -fuse-ld=mold
|
||||||
BUILD_OPENMW_ONLY: 1
|
BUILD_OPENMW_ONLY: 1
|
||||||
|
# Disable -Werror due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105562
|
||||||
|
OPENMW_CXX_FLAGS: ""
|
||||||
|
|
||||||
Clang_Format:
|
Clang_Format:
|
||||||
extends: .Ubuntu_Image
|
extends: .Ubuntu_Image
|
||||||
|
@ -257,6 +260,8 @@ Ubuntu_GCC_tests_asan:
|
||||||
CMAKE_CXX_FLAGS_DEBUG: -g -O1 -fno-omit-frame-pointer -fsanitize=address -fsanitize=pointer-subtract -fsanitize=leak
|
CMAKE_CXX_FLAGS_DEBUG: -g -O1 -fno-omit-frame-pointer -fsanitize=address -fsanitize=pointer-subtract -fsanitize=leak
|
||||||
CMAKE_EXE_LINKER_FLAGS: -fsanitize=address -fsanitize=pointer-subtract -fsanitize=leak -fuse-ld=mold
|
CMAKE_EXE_LINKER_FLAGS: -fsanitize=address -fsanitize=pointer-subtract -fsanitize=leak -fuse-ld=mold
|
||||||
ASAN_OPTIONS: halt_on_error=1:strict_string_checks=1:detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1
|
ASAN_OPTIONS: halt_on_error=1:strict_string_checks=1:detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1
|
||||||
|
# Disable -Werror due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105562
|
||||||
|
OPENMW_CXX_FLAGS: ""
|
||||||
artifacts:
|
artifacts:
|
||||||
paths: []
|
paths: []
|
||||||
name: ${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHA}
|
name: ${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHA}
|
||||||
|
|
|
@ -17,7 +17,7 @@ declare -a CMAKE_CONF_OPTS=(
|
||||||
-DBUILD_SHARED_LIBS="${BUILD_SHARED_LIBS:-OFF}"
|
-DBUILD_SHARED_LIBS="${BUILD_SHARED_LIBS:-OFF}"
|
||||||
-DUSE_SYSTEM_TINYXML=ON
|
-DUSE_SYSTEM_TINYXML=ON
|
||||||
-DOPENMW_USE_SYSTEM_RECASTNAVIGATION=ON
|
-DOPENMW_USE_SYSTEM_RECASTNAVIGATION=ON
|
||||||
-DOPENMW_CXX_FLAGS="-Werror -Werror=implicit-fallthrough" # flags specific to OpenMW project
|
-DOPENMW_CXX_FLAGS="${OPENMW_CXX_FLAGS}" # flags specific to OpenMW project
|
||||||
)
|
)
|
||||||
|
|
||||||
if [[ "${CMAKE_EXE_LINKER_FLAGS}" ]]; then
|
if [[ "${CMAKE_EXE_LINKER_FLAGS}" ]]; then
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue