-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathbuild.env
32 lines (25 loc) · 1002 Bytes
/
build.env
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Sets up the environment for the MassOS build system (stage 2 and stage 3).
# Path, expanded to include Rust, Go and Sphinx, needed to build some packages.
export PATH=/usr/local/bin:/usr/bin:/root/mbs/extras/rust/bin:/root/mbs/extras/go/bin:/root/mbs/extras/sphinx/bin
# Locale - we use C.UTF-8 for building.
export LC_ALL="C.UTF-8" 2>/dev/null
# Enable multi-threaded Make (Ninja is automatically parallel).
export MAKEFLAGS="-j$(nproc)"
# Allow building some packages as root.
export FORCE_UNSAFE_CONFIGURE=1
# In case $SHELL is not set in the environment for some reason...
export SHELL=/bin/bash
# Compiler optimisations used for MassOS.
CFLAGS="-Os"
CXXFLAGS="-Os"
CPPFLAGS=""
LDFLAGS=""
RUSTFLAGS=""
export CFLAGS CXXFLAGS CPPFLAGS LDFLAGS RUSTFLAGS
# Enable CGO and use the same compiler optimisations for Go.
CGO_ENABLED=1
CGO_CFLAGS="$CFLAGS"
CGO_CXXFLAGS="$CXXFLAGS"
CGO_CPPFLAGS="$CPPFLAGS"
CGO_LDFLAGS="$LDFLAGS"
export CGO_ENABLED CGO_CFLAGS CGO_CXXFLAGS CGO_CPPFLAGS CGO_LDFLAGS