Commit b31089fa authored by Vladimir Bashkirtsev's avatar Vladimir Bashkirtsev

We should build MongoDB without debug information to save on build time and disk space

parent d79700e3
...@@ -22,12 +22,13 @@ all: mongodb-service ...@@ -22,12 +22,13 @@ all: mongodb-service
mv -v /etc/gshadow /data/etc/gshadow mv -v /etc/gshadow /data/etc/gshadow
ln -sv /data/etc/gshadow /etc/gshadow ln -sv /data/etc/gshadow /etc/gshadow
dd if=/dev/zero of=swap bs=1048576 count=8192 dd if=/dev/zero of=swap bs=1048576 count=2048
chmod 600 swap chmod 600 swap
mkswap swap mkswap swap
swapon swap swapon swap
tar xf mongo-r4.2.4.tar.gz tar xf mongo-r4.2.4.tar.gz
patch -Np1 -d mongo-r4.2.4 < mongo-r4.2.4-no_debug.patch
cd mongo-r4.2.4 && pip3 install -r buildscripts/requirements.txt cd mongo-r4.2.4 && pip3 install -r buildscripts/requirements.txt
cd mongo-r4.2.4 && scons all --release --opt=on --disable-warnings-as-errors MONGO_VERSION=4.2.4 -j 1 cd mongo-r4.2.4 && scons all --release --opt=on --disable-warnings-as-errors MONGO_VERSION=4.2.4 -j 1
cd mongo-r4.2.4 && scons --prefix=/usr install --disable-warnings-as-errors MONGO_VERSION=4.2.4 cd mongo-r4.2.4 && scons --prefix=/usr install --disable-warnings-as-errors MONGO_VERSION=4.2.4
......
diff -uNr mongo-r4.2.4/SConstruct mongo-r4.2.4-no_debug/SConstruct
--- mongo-r4.2.4/SConstruct 2020-03-02 22:31:44.000000000 +0000
+++ mongo-r4.2.4-no_debug/SConstruct 2020-08-22 23:21:30.870326651 +0000
@@ -1859,7 +1859,6 @@
# -Winvalid-pch Warn if a precompiled header (see Precompiled Headers) is found in the search path but can't be used.
env.Append( CCFLAGS=["-fno-omit-frame-pointer",
"-fno-strict-aliasing",
- "-ggdb" if not env.TargetOSIs('emscripten') else "-g",
"-pthread",
"-Wall",
"-Wsign-compare",
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment