Fix ABI compatibility tool on macOS
This commit is contained in:
parent
d7c14b6f3a
commit
39a64fb4e7
1
.gitignore
vendored
1
.gitignore
vendored
@ -23,6 +23,7 @@ test/test.xcodeproj/*/xcuser*
|
|||||||
test/*.o
|
test/*.o
|
||||||
test/*.pem
|
test/*.pem
|
||||||
test/*.srl
|
test/*.srl
|
||||||
|
test/_build_*
|
||||||
work/
|
work/
|
||||||
benchmark/server*
|
benchmark/server*
|
||||||
|
|
||||||
|
@ -69,5 +69,5 @@ cert.pem:
|
|||||||
./gen-certs.sh
|
./gen-certs.sh
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f test test_split test_proxy server_fuzzer *.pem *.0 *.o *.1 *.srl httplib.h httplib.cc
|
rm -rf test test_split test_proxy server_fuzzer *.pem *.0 *.o *.1 *.srl httplib.h httplib.cc _build*
|
||||||
|
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
CURRENT_COMMIT=$(git rev-parse HEAD)
|
PREVIOUS_VERSION=$(git describe --tags --abbrev=0 master)
|
||||||
PREVIOUS_VERSION=$(git describe --tags --abbrev=0 $CURRENT_COMMIT)
|
BUILD_DIR=_build_for_abi_compatibility_check
|
||||||
|
|
||||||
BUILD_DIR=_build_for_is_abi_compatible
|
|
||||||
|
|
||||||
# Make the build directory
|
# Make the build directory
|
||||||
rm -rf $BUILD_DIR
|
rm -rf $BUILD_DIR
|
||||||
@ -29,6 +27,7 @@ cd ..
|
|||||||
|
|
||||||
# Build the nearest vesion
|
# Build the nearest vesion
|
||||||
cd old
|
cd old
|
||||||
|
|
||||||
cmake \
|
cmake \
|
||||||
-DCMAKE_BUILD_TYPE=Debug \
|
-DCMAKE_BUILD_TYPE=Debug \
|
||||||
-DCMAKE_CXX_FLAGS="-g -Og" \
|
-DCMAKE_CXX_FLAGS="-g -Og" \
|
||||||
@ -44,15 +43,16 @@ cmake --build . --target clean > /dev/null
|
|||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
# Checkout the original commit
|
# Checkout the original commit
|
||||||
if [ "$CURRENT_COMMIT" = "$(git rev-parse master)" ]; then
|
|
||||||
git checkout -q master
|
git checkout -q master
|
||||||
else
|
|
||||||
git checkout -q "${CURRENT_COMMIT}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# ABI compatibility check
|
# ABI compatibility check
|
||||||
|
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
||||||
../check-abi-compatibility.sh ./old/out/lib/libcpp-httplib.so ./new/out/lib/libcpp-httplib.so
|
../check-abi-compatibility.sh ./old/out/lib/libcpp-httplib.so ./new/out/lib/libcpp-httplib.so
|
||||||
|
exit $?
|
||||||
# Clean the build directory
|
elif [[ "$OSTYPE" == "darwin"* ]]; then
|
||||||
cd ..
|
../check-abi-compatibility.sh ./old/out/lib/libcpp-httplib.dylib ./new/out/lib/libcpp-httplib.dylib
|
||||||
rm -rf $BUILD_DIR
|
exit $?
|
||||||
|
else
|
||||||
|
echo "Unknown OS..."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user