summaryrefslogtreecommitdiff
path: root/etc/scons/mongodbtoolchain_clang.vars
blob: 791a44745ca97fcb821ed57bcfb3b7c6e52bffbe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Configures the build to use the Clang toolchain in /opt/mongodbtoolchain/v2

import os
import SCons.Defaults

# Get the default SCons path as a list
default_path = SCons.Defaults.DefaultEnvironment()['ENV']['PATH'].split(os.pathsep)

# Put the toolchain path first so we prefer all tools from there in subprocs.
ENV = {
    'PATH' : os.pathsep.join(['/opt/mongodbtoolchain/v2/bin'] + default_path)
}

# Set any Variables for Tools from the toolchain here. Technically, we
# shouldn't need the full paths since SCons will find the toolchain
# ones first, but we don't want to accidentally get the system version
# if, say, the toolchain is missing. Also, it is clearer that we are
# getting the right toolchain in build log output when the path is
# printed for each compiler invocation.
CC = '/opt/mongodbtoolchain/v2/bin/clang'
CXX = '/opt/mongodbtoolchain/v2/bin/clang++'
OBJCOPY = '/opt/mongodbtoolchain/v2/bin/objcopy'