Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ci/codespell.ignores
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,4 @@ falloc
rin
assertIn
checkin
SHS
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c5161c1..e4e7971 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -170,6 +170,12 @@ else()
set(MERCURY_LIBTYPE STATIC)
endif()

+#------------------------------------------------------------------------------
+# Set debug lib name as release.
+#------------------------------------------------------------------------------
+option(MERCURY_LIB_DEBUG_NAME_IS_RELEASE "Set debug library name as release." OFF)
+mark_as_advanced(MERCURY_LIB_DEBUG_NAME_IS_RELEASE)
+
#------------------------------------------------------------------------------
# Enable debug output.
#------------------------------------------------------------------------------
@@ -237,16 +243,29 @@ function(mercury_set_lib_options libtarget libname libtype var_prefix)
endif()
endif()

- set_target_properties(${libtarget}
- PROPERTIES
- OUTPUT_NAME_DEBUG ${LIB_DEBUG_NAME}
- OUTPUT_NAME_RELEASE ${LIB_RELEASE_NAME}
- OUTPUT_NAME_MINSIZEREL ${LIB_RELEASE_NAME}
- OUTPUT_NAME_RELWITHDEBINFO ${LIB_RELEASE_NAME}
- OUTPUT_NAME_ASAN ${LIB_DEBUG_NAME}
- OUTPUT_NAME_TSAN ${LIB_DEBUG_NAME}
- OUTPUT_NAME_UBSAN ${LIB_DEBUG_NAME}
- )
+ if(NOT MERCURY_LIB_DEBUG_NAME_IS_RELEASE)
+ set_target_properties(${libtarget}
+ PROPERTIES
+ OUTPUT_NAME_DEBUG ${LIB_DEBUG_NAME}
+ OUTPUT_NAME_RELEASE ${LIB_RELEASE_NAME}
+ OUTPUT_NAME_MINSIZEREL ${LIB_RELEASE_NAME}
+ OUTPUT_NAME_RELWITHDEBINFO ${LIB_RELEASE_NAME}
+ OUTPUT_NAME_ASAN ${LIB_DEBUG_NAME}
+ OUTPUT_NAME_TSAN ${LIB_DEBUG_NAME}
+ OUTPUT_NAME_UBSAN ${LIB_DEBUG_NAME}
+ )
+ else()
+ set_target_properties(${libtarget}
+ PROPERTIES
+ OUTPUT_NAME_DEBUG ${LIB_RELEASE_NAME}
+ OUTPUT_NAME_RELEASE ${LIB_RELEASE_NAME}
+ OUTPUT_NAME_MINSIZEREL ${LIB_RELEASE_NAME}
+ OUTPUT_NAME_RELWITHDEBINFO ${LIB_RELEASE_NAME}
+ OUTPUT_NAME_ASAN ${LIB_RELEASE_NAME}
+ OUTPUT_NAME_TSAN ${LIB_RELEASE_NAME}
+ OUTPUT_NAME_UBSAN ${LIB_RELEASE_NAME}
+ )
+ endif()
if(${libtype} MATCHES "SHARED")
set_target_properties(${libtarget}
PROPERTIES
3 changes: 2 additions & 1 deletion docs/dev/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,12 @@ such as maximum function stack size, may lead to unexpected behavior in the inst
binaries.

#### Customizing ASan Behavior

ASan behavior can be configured using the `ASAN_OPTIONS` environment variable. For example, you can
add the following entry to the `env_vars` section of the `daos_server.yml` configuration file:
```yaml
engines:
- ..
- ...
env_vars:
...
- ASAN_OPTIONS=atexit=1:print_stats=1:log_path=/tmp/daos_engine0.asan:disable_coredump=1:handle_segv=2:handle_abort=2:handle_sigfpe=2:handle_sigill=2:handle_sigbus=2:use_sigaltstack=1
Expand Down
16 changes: 15 additions & 1 deletion site_scons/components/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,6 @@ def define_mercury(reqs):

mercury_build = ['cmake',
'-DBUILD_SHARED_LIBS:BOOL=ON',
'-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo',
'-DCMAKE_CXX_FLAGS:STRING="-std=c++11"',
'-DCMAKE_INSTALL_PREFIX:PATH=$MERCURY_PREFIX',
'-DMERCURY_INSTALL_LIB_DIR:PATH=$MERCURY_PREFIX/lib64',
Expand All @@ -208,6 +207,21 @@ def define_mercury(reqs):
'-DNA_USE_UCX:BOOL=ON',
'../mercury']

build_type = "RelWithDebInfo"
try:
sanitizers = reqs.get_env('SANITIZERS').split(',')
if 'address' in sanitizers:
build_type = "Asan"
elif 'thread' in sanitizers:
build_type = "Tsan"
elif 'undefined' in sanitizers:
build_type = "Ubsan"
except KeyError:
pass
mercury_build.append(f'-DCMAKE_BUILD_TYPE:STRING={build_type}')
if build_type != "RelWithDebInfo":
mercury_build.append('-DMERCURY_LIB_DEBUG_NAME_IS_RELEASE:BOOL=ON')

if reqs.target_type == 'debug':
mercury_build.append('-DMERCURY_ENABLE_DEBUG:BOOL=ON')
else:
Expand Down
2 changes: 1 addition & 1 deletion site_scons/prereq_tools/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ def __init__(self, env, opts):
['gcc', 'covc', 'clang', 'icc'], ignorecase=2))
opts.Add(EnumVariable('WARNING_LEVEL', "Set default warning level", 'error',
['warning', 'warn', 'error'], ignorecase=2))
opts.Add(('SANITIZERS', 'Instrument C code with google sanitizers', None))
opts.Add(('SANITIZERS', 'Instrument C code with Google Sanitizers', None))

opts.Update(self.__env)

Expand Down
2 changes: 1 addition & 1 deletion utils/build.config
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ ucx=https://github.com/openucx/ucx.git

[patch_versions]
spdk=0001_b0aba3fcd5aceceea530a702922153bc75664978.diff,0002_445a4c808badbad3942696ecf16fa60e8129a747.diff
mercury=0001_na_ucx.patch,0002_na_ucx_ep_flush.patch,0003_combined_plugin_path.patch
mercury=0001_na_ucx.patch,0002_na_ucx_ep_flush.patch,0003_combined_plugin_path.patch,0004-CMake-add-MERCURY_LIB_DEBUG_NAME_IS_RELEASE-option.patch
argobots=0001_411e5b344642ebc82190fd8b125db512e5b449d1.diff,0002_bb0c908abfac4bfe37852eee621930634183c6aa.diff
2 changes: 1 addition & 1 deletion utils/rpms/daos.spec
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@ fi
* Thu Oct 16 2025 Jeff Olivier <[email protected]> 2.7.101-16
- Make daos-spdk conflict with spdk

* Thu Sep 12 2025 Jeff Olivier <[email protected]> 2.7.101-15
* Fri Sep 12 2025 Jeff Olivier <[email protected]> 2.7.101-15
- Fix leap package name

* Thu Sep 11 2025 Jeff Olivier <[email protected]> 2.7.101-14
Expand Down
2 changes: 1 addition & 1 deletion utils/rpms/fpm_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ build_package() {
pkgname="${name}-${VERSION}-${RELEASE}.${ARCH}.${output_type}"
rm -f "${pkgname}"
# shellcheck disable=SC2068
fpm -s "${PACKAGE_TYPE}" -t "${output_type}" \
fpm --verbose -s "${PACKAGE_TYPE}" -t "${output_type}" \
-p "${pkgname}" \
--name "${name}" \
--license "${LICENSE}" \
Expand Down
Loading
Loading