Skip to content

Instantly share code, notes, and snippets.

@mdcallag
Created April 26, 2023 20:18
Show Gist options
  • Save mdcallag/41dae83a690478b0d551a8318945b8eb to your computer and use it in GitHub Desktop.
Save mdcallag/41dae83a690478b0d551a8318945b8eb to your computer and use it in GitHub Desktop.
# Postgres configuraton
./configure --prefix=~/d/pg --enable-debug CFLAGS="-O3 -march=native -mtune=native -flto" LDFLAGS="-flto"
# Upstream MySQL 8.0.32 build configuration
BF=" -g1 "
CF=" $BF "
CXXF=" $BF "
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DWITH_SSL=system \
-DWITH_ZLIB=bundled \
-DMYSQL_MAINTAINER_MODE=0 \
-DENABLED_LOCAL_INFILE=1 \
-DCMAKE_INSTALL_PREFIX=$1 \
-DWITH_BOOST=$PWD/../boost \
-DCMAKE_CXX_FLAGS="$CXXF" -DCMAKE_C_FLAGS="$CF" \
-DWITH_LTO=ON \
-DWITH_NUMA=ON \
-DWITH_ROUTER=OFF -DWITH_MYSQLX=OFF -DWITH_UNIT_TESTS=OFF
# FB MySQL build configuration
if [ -z $1 ]; then
echo Requires prefix as arg1
exit -1
fi
if [ -z $2 ]; then
echo Requires boost dir path as arg2
exit -1
fi
RXF=" -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -DOS_LINUX -DROCKSDB_FALLOCATE_PRESENT -DROCKSDB_MALLOC_USABLE_SIZE "
RXF+=" -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT "
RXF+=" -DROCKSDB_AUXV_GETAUXVAL_PRESENT -DROCKSDB_SUPPORT_THREAD_LOCAL "
RXF+=" -DNUMA -DHAVE_ALIGNED_NEW -DHAVE_AVX2 -DHAVE_BMI -DHAVE_LZCNT -DHAVE_PCLMUL -DHAVE_SSE42 -DHAVE_UINT128_EXTENSION "
BF=" -g1 "
CF=" $BF "
CXXF=" $BF -faligned-new $RXF "
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DWITH_SSL=system \
-DWITH_ZLIB=bundled \
-DMYSQL_MAINTAINER_MODE=0 \
-DENABLED_LOCAL_INFILE=1 \
-DCMAKE_INSTALL_PREFIX=$1 \
-DWITH_BOOST=$2 \
-DWITH_NUMA=ON \
-DCMAKE_CXX_FLAGS="$CXXF" -DCMAKE_C_FLAGS="$CF" \
-DWITH_LTO=ON \
-DWITH_ROUTER=OFF -DWITH_MYSQLX=OFF -DWITH_UNIT_TESTS=OFF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment