Skip to content

Commit

Permalink
add msquic_debug script
Browse files Browse the repository at this point in the history
  • Loading branch information
xlc committed Oct 14, 2024
1 parent c9856cf commit c219ff4
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions scripts/msquic_debug.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/usr/bin/env bash

set -e

CWD=$(pwd)

system=$(uname -s)

arch=$(uname -m)

out_dir=${CWD}/build/${system}-${arch}

mkdir -p ${out_dir}

cd msquic || { echo "Submodule directory not found"; exit 1; }

rm -rf build

mkdir build && cd build

if [ $system = "Darwin" ]; then
cmake -DCMAKE_BUILD_TYPE=Debug -DQUIC_ENABLE_LOGGING=ON -DQUIC_LOGGING_TYPE=stdout -DCMAKE_OSX_ARCHITECTURES=$arch -DCMAKE_C_FLAGS="-Wno-invalid-unevaluated-string" -DQUIC_BUILD_SHARED=off ..
elif [ $system = "Linux" ]; then
cmake -G 'Unix Makefiles' -DCMAKE_BUILD_TYPE=Debug -DQUIC_ENABLE_LOGGING=ON -DQUIC_LOGGING_TYPE=stdout -DCMAKE_OSX_ARCHITECTURES=$arch -DCMAKE_C_FLAGS="-Wno-invalid-unevaluated-string" -DQUIC_BUILD_SHARED=off ..
fi

cmake --build . || { echo "Build msquic library failed"; exit 1; }

cp bin/Debug/libmsquic.a ${out_dir}

echo "msquic built successfully"

0 comments on commit c219ff4

Please sign in to comment.