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
6 changes: 5 additions & 1 deletion bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ Configuration:
--enable-boost force to enable boost
--enable-coverage enable build with code coverage support
--enable-libc++ using libc++ instead of libstdc++, only valid for clang compiler
--disable-sse disable sse support

Dependencies:
c/c++ compiler
Expand Down Expand Up @@ -67,6 +68,7 @@ build_type="Release"
enable_boost="OFF"
enable_coverage="OFF"
enable_clang_lib="OFF"
enable_sse="ON"
while test $# != 0; do
case "$1" in
--prefix=*) dir=`arg "$1"`
Expand All @@ -77,6 +79,7 @@ while test $# != 0; do
--enable-boost) enable_boost="ON";;
--enable-coverage) enable_coverage="ON";;
--enable-libc++) enable_clang_lib="ON";;
--disable-sse) enable_sse="OFF";;
--help) usage ;;
*) die "Unknown option: $1" ;;
esac
Expand Down Expand Up @@ -116,7 +119,8 @@ fi
${cmake} -DENABLE_DEBUG=${enable_build} -DCMAKE_INSTALL_PREFIX=${prefix_dirs} \
-DCMAKE_C_COMPILER=${c_compiler} -DCMAKE_CXX_COMPILER=${cxx_compiler} \
-DCMAKE_PREFIX_PATH=${dependency_dir} -DENABLE_BOOST=${enable_boost} \
-DENABLE_COVERAGE=${enable_coverage} -DENABLE_LIBCPP=${enable_clang_lib} ${source_dir} \
-DENABLE_COVERAGE=${enable_coverage} -DENABLE_LIBCPP=${enable_clang_lib} \
-DENABLE_SSE=${enable_sse} ${source_dir} \
|| die "failed to configure the project"

echo 'bootstrap success. Run "make" to build.'
16 changes: 16 additions & 0 deletions debian/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,22 @@ build_with_debug() {
popd
}

build_release() {
pushd ${top_dir}
rm -rf build && mkdir -p build && cd build || die "cannot create build directory"
../bootstrap || die "bootstrap failed"
make -j || die "failed to run unit tests"
popd
}

build_release_armv8() {
pushd ${top_dir}
rm -rf build && mkdir -p build && cd build || die "cannot create build directory"
../bootstrap --disable-sse || die "bootstrap failed"
make -j || die "failed to run unit tests"
popd
}

unit_tests() {
pushd ${top_dir}
rm -rf build && mkdir -p build && cd build || die "cannot create build directory"
Expand Down
18 changes: 18 additions & 0 deletions src/common/HWCrc32c.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,4 +162,22 @@ void HWCrc32c::updateInt64(const char * b, int len) {
}
}

#else

namespace Hdfs {
namespace Internal {

bool HWCrc32c::available() {
return false;
}

void HWCrc32c::update(const void * b, int len) {
}

void HWCrc32c::updateInt64(const char * b, int len) {
}

}
}

#endif /* _HDFS_LIBHDFS3_COMMON_HWCHECKSUM_H_ */