aboutsummaryrefslogtreecommitdiff
path: root/scripts/ue_build_linux/ue_build.sh
blob: e9c3b2cf68f8ad84909e961886be77f7d747ac37 (plain) (blame)
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
#!/bin/bash

die() { echo ERROR: $1; exit 1; }

# Validate input
if [ -z $1 ]; then
	echo "usage: $0 <ue_toolchain_dir>"
	exit 1
fi

if ! [ -d $1 ]; then
	die "$1 is not a directory"
fi

if ! [ -e $1/bin/clang++ ]; then
	die "$1/bin/clang++ does not exist"
fi

export UE_TOOLCHAIN_DIR=$(realpath $1)
export CC="clang"
export CXX="clang++"
export LD="clang++"

export PATH="$(realpath $(dirname ${BASH_SOURCE[0]})):$PATH"

shift
exec $*