mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2024-12-22 16:58:55 +00:00
Configure target for clang thread safety checking (#2493)
This commit is contained in:
parent
3ba8c2a139
commit
000273a8de
7
.github/workflows/ci.yml
vendored
7
.github/workflows/ci.yml
vendored
@ -228,6 +228,7 @@ jobs:
|
|||||||
- sanitize_address
|
- sanitize_address
|
||||||
- sanitize_others
|
- sanitize_others
|
||||||
- sanitize_thread
|
- sanitize_thread
|
||||||
|
- thread_safety
|
||||||
- valgrind
|
- valgrind
|
||||||
|
|
||||||
container:
|
container:
|
||||||
@ -277,6 +278,10 @@ jobs:
|
|||||||
elif [ "${{ matrix.checktype }}" = "sanitize_others" ]; then
|
elif [ "${{ matrix.checktype }}" = "sanitize_others" ]; then
|
||||||
echo 'CXX=clang++'
|
echo 'CXX=clang++'
|
||||||
echo "CXXFLAGS=${COMMON_CXXFLAGS} -O1 -fsanitize=undefined,implicit-conversion,local-bounds,unsigned-integer-overflow"
|
echo "CXXFLAGS=${COMMON_CXXFLAGS} -O1 -fsanitize=undefined,implicit-conversion,local-bounds,unsigned-integer-overflow"
|
||||||
|
elif [ "${{ matrix.checktype }}" = "thread_safety" ]; then
|
||||||
|
echo 'CXX=clang++'
|
||||||
|
echo "CXXFLAGS=${COMMON_CXXFLAGS} -O1 -Wthread-safety -stdlib=libc++ -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS -Werror"
|
||||||
|
echo 'LDFLAGS=-DCLANG_DEFAULT_LINKER=lld'
|
||||||
elif [ "${{ matrix.checktype }}" = "valgrind" ]; then
|
elif [ "${{ matrix.checktype }}" = "valgrind" ]; then
|
||||||
echo "CXXFLAGS=${COMMON_CXXFLAGS} -O1"
|
echo "CXXFLAGS=${COMMON_CXXFLAGS} -O1"
|
||||||
echo 'VALGRIND="--leak-check=full --error-exitcode=1"'
|
echo 'VALGRIND="--leak-check=full --error-exitcode=1"'
|
||||||
@ -288,7 +293,7 @@ jobs:
|
|||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
./autogen.sh
|
./autogen.sh
|
||||||
/bin/sh -c "CXX=${CXX} CXXFLAGS=\"${CXXFLAGS}\" ./configure --prefix=/usr --with-openssl"
|
/bin/sh -c "CXX=${CXX} CXXFLAGS=\"${CXXFLAGS}\" LDFLAGS=\"${LDFLAGS}\" ./configure --prefix=/usr --with-openssl"
|
||||||
make
|
make
|
||||||
|
|
||||||
- name: Test suite
|
- name: Test suite
|
||||||
|
12
.github/workflows/linux-ci-helper.sh
vendored
12
.github/workflows/linux-ci-helper.sh
vendored
@ -66,7 +66,9 @@ AWSCLI_ZIP_FILE="awscliv2.zip"
|
|||||||
#-----------------------------------------------------------
|
#-----------------------------------------------------------
|
||||||
# Parameters for configure(set environments)
|
# Parameters for configure(set environments)
|
||||||
#-----------------------------------------------------------
|
#-----------------------------------------------------------
|
||||||
|
CXX="g++"
|
||||||
CXXFLAGS="-O -DS3FS_PTHREAD_ERRORCHECK=1"
|
CXXFLAGS="-O -DS3FS_PTHREAD_ERRORCHECK=1"
|
||||||
|
LDFLAGS=""
|
||||||
CONFIGURE_OPTIONS="--prefix=/usr --with-openssl"
|
CONFIGURE_OPTIONS="--prefix=/usr --with-openssl"
|
||||||
|
|
||||||
#-----------------------------------------------------------
|
#-----------------------------------------------------------
|
||||||
@ -236,7 +238,7 @@ elif [ "${CONTAINER_FULLNAME}" = "fedora:40" ]; then
|
|||||||
PACKAGE_UPDATE_OPTIONS="update -y -qq"
|
PACKAGE_UPDATE_OPTIONS="update -y -qq"
|
||||||
PACKAGE_INSTALL_OPTIONS="install -y"
|
PACKAGE_INSTALL_OPTIONS="install -y"
|
||||||
|
|
||||||
INSTALL_PACKAGES="clang-tools-extra curl-devel fuse fuse-devel gcc libstdc++-devel gcc-c++ glibc-langpack-en java-latest-openjdk-headless jq libxml2-devel mailcap git automake make openssl openssl-devel curl attr diffutils procps python3-pip unzip"
|
INSTALL_PACKAGES="clang clang-tools-extra curl-devel fuse fuse-devel gcc libstdc++-devel gcc-c++ glibc-langpack-en java-latest-openjdk-headless jq libxml2-devel mailcap git automake make openssl openssl-devel curl attr diffutils procps python3-pip unzip libcxx libcxx-devel"
|
||||||
INSTALL_CHECKER_PKGS="cppcheck ShellCheck"
|
INSTALL_CHECKER_PKGS="cppcheck ShellCheck"
|
||||||
INSTALL_CHECKER_PKG_OPTIONS=""
|
INSTALL_CHECKER_PKG_OPTIONS=""
|
||||||
|
|
||||||
@ -338,8 +340,12 @@ fi
|
|||||||
#-----------------------------------------------------------
|
#-----------------------------------------------------------
|
||||||
echo "${PRGNAME} [INFO] Set environment for configure options"
|
echo "${PRGNAME} [INFO] Set environment for configure options"
|
||||||
|
|
||||||
echo "CXXFLAGS=${CXXFLAGS}" >> "${GITHUB_ENV}"
|
cat << EOF >> "${GITHUB_ENV}"
|
||||||
echo "CONFIGURE_OPTIONS=${CONFIGURE_OPTIONS}" >> "${GITHUB_ENV}"
|
CXX=${CXX}
|
||||||
|
CXXFLAGS=${CXXFLAGS}
|
||||||
|
LDFLAGS=${LDFLAGS}
|
||||||
|
CONFIGURE_OPTIONS=${CONFIGURE_OPTIONS}
|
||||||
|
EOF
|
||||||
|
|
||||||
echo "${PRGNAME} [INFO] Finish Linux helper for installing packages."
|
echo "${PRGNAME} [INFO] Finish Linux helper for installing packages."
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user