Skip to content

MacOS

If the dependencies are not prepared, please refer to Getting Started.

Build Third-party libraries

Build BoringSSL

To compile BoringSSL, golang should be installed in advance.

After that, run the following commands to have BoringSSL ready with source code.

bash
# .
git clone https://github.com/google/boringssl.git ./third_party/boringssl
cd ./third_party/boringssl
mkdir -p build && cd build
cmake -DBUILD_SHARED_LIBS=0 -DCMAKE_C_FLAGS="-fPIC" -DCMAKE_CXX_FLAGS="-fPIC" ..
make ssl crypto
cd ..
SSL_TYPE_STR="boringssl"
SSL_PATH_STR="${PWD}"
cd ../..

Build with BabaSSL(Tongsuo)

bash
# .
git clone -b 8.3-stable https://github.com/Tongsuo-Project/Tongsuo.git ./third_party/babassl
cd ./third_party/babassl/
./config --prefix=/usr/local/babassl
make -j
SSL_TYPE_STR="babassl"
SSL_PATH_STR="${PWD}"
cd -

Build XQUIC

After that, cmake variable -DPLATFORM=mac can enable you to build XQUIC on macOS.

bash
# .
mkdir -p build; cd build

#./build (-DXQC_SUPPORT_SENDMMSG_BUILD=0?) 
cmake -DPLATFORM=mac -DCMAKE_BUILD_TYPE=Debug -DXQC_ENABLE_TESTING=1 -DXQC_SUPPORT_SENDMMSG_BUILD=0 -DXQC_ENABLE_EVENT_LOG=1 -DSSL_TYPE=${SSL_TYPE_STR} -DSSL_PATH=${SSL_PATH_STR} ..

make -j