-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: Not Applicable
-
Storage Engines
-
5
-
StorEng - Defined Pipeline
During SPM-3221 we've been building TSan-enabled WiredTiger with clang only. This is because compiling with gcc returned the following CMake error:
Build type 'TSan' not available.
On further inspection gcc should be enabled with TSan, but we fail the following check
# Check if the compiler flags are available to ensure its a valid build mode. if(DEFINE_BUILD_C_COMPILER_FLAGS) check_c_compiler_flag("${DEFINE_BUILD_C_COMPILER_FLAGS}" HAVE_BUILD_MODE_C_FLAGS) if(NOT HAVE_BUILD_MODE_C_FLAGS) message(VERBOSE "Skipping build mode definition due to unavailable C flags: ${mode}") unset(HAVE_BUILD_MODE_C_FLAGS CACHE) return() endif() endif()
which removes TSan as an option. Our modes.cmake file tags the TSan build mode with
DEPENDS "NOT MSVC"
so we should be able to compile with gcc.
The first step in this ticket is determining why check_c_compiler_flag from the above code snippet fails on our dev machines. I suspect this is an environment issue and not a CMake configuration issue.
The second step isto decide whether we want to support TSan + gcc builds. The existing
#ifdef TSAN_BUILD
checks assume that we're only building with Clang and would require updating. If we decide to support gcc then we need to make sure the existing TSan tests pass for both gcc and clang. If we decide not to support gcc we should update modes.cmake to flag TSan and clang only.
- is duplicated by
-
WT-12564 Improve cmake messaging when a build_type isn't available
- Closed