Added new ENABLE_CODE_COVERAGE option. (#1664)

Modified install.sh script to add this new option
This commit is contained in:
Atul Kulkarni
2025-06-10 12:12:36 -05:00
committed by GitHub
parent b926203c05
commit 682ed36fe6
5 changed files with 64 additions and 7 deletions
+9 -1
View File
@@ -19,6 +19,7 @@ build_tests=false
build_verbose=false
clean_build=true
collective_trace=true
enable_code_coverage=false
enable_ninja=""
install_dependencies=false
install_library=false
@@ -43,6 +44,7 @@ function display_help()
echo "RCCL build & installation helper script"
echo " Options:"
echo " --address-sanitizer Build with address sanitizer enabled"
echo " -c|--enable-code-coverage Enable Code Coverage"
echo " -d|--dependencies Install RCCL dependencies"
echo " --debug Build debug library"
echo " --enable_backtrace Build with custom backtrace support"
@@ -79,7 +81,7 @@ function display_help()
# check if we have a modern version of getopt that can handle whitespace and long parameters
getopt -T
if [[ "$?" -eq 4 ]]; then
GETOPT_PARSE=$(getopt --name "${0}" --options dfhij:lprt --longoptions address-sanitizer,dependencies,debug,enable_backtrace,disable-colltrace,disable-msccl-kernel,disable-mscclpp,enable-mscclpp-clip,fast,help,install,jobs:,local_gpu_only,amdgpu_targets:,no_clean,npkit-enable,log-trace,openmp-test-enable,roctx-enable,package_build,prefix:,rm-legacy-include-dir,run_tests_all,run_tests_quick,static,tests_build,time-trace,verbose -- "$@")
GETOPT_PARSE=$(getopt --name "${0}" --options cdfhij:lprt --longoptions address-sanitizer,dependencies,debug,enable-code-coverage,enable_backtrace,disable-colltrace,disable-msccl-kernel,disable-mscclpp,fast,help,install,jobs:,local_gpu_only,amdgpu_targets:,no_clean,npkit-enable,log-trace,openmp-test-enable,roctx-enable,package_build,prefix:,rm-legacy-include-dir,run_tests_all,run_tests_quick,static,tests_build,time-trace,verbose -- "$@")
else
echo "Need a new version of getopt"
exit 1
@@ -95,6 +97,7 @@ eval set -- "${GETOPT_PARSE}"
while true; do
case "${1}" in
--address-sanitizer) build_address_sanitizer=true; shift ;;
-c | --enable-code-coverage) enable_code_coverage=true; shift ;;
-d | --dependencies) install_dependencies=true; shift ;;
--debug) build_release=false; shift ;;
--enable_backtrace) build_bfd=true; shift ;;
@@ -208,6 +211,11 @@ if [[ "${build_address_sanitizer}" == true ]]; then
cmake_common_options="${cmake_common_options} -DBUILD_ADDRESS_SANITIZER=ON"
fi
# Enable code coverage
if [[ "${enable_code_coverage}" == true ]]; then
cmake_common_options="${cmake_common_options} -DENABLE_CODE_COVERAGE=ON"
fi
# Backtrace support
if [[ "${build_bfd}" == true ]]; then
cmake_common_options="${cmake_common_options} -DBUILD_BFD=ON"