-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.sh
executable file
·44 lines (32 loc) · 1.37 KB
/
build.sh
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
33
34
35
36
37
38
39
40
41
42
43
export CORECLR_SRC=$HOME/coreclr/src
mkdir bin > /dev/null 2>&1
OSName=$(uname -s)
case $OSName in
Linux)
__BuildOS=Linux
;;
Darwin)
__BuildOS=OSX
;;
FreeBSD)
__BuildOS=FreeBSD
;;
OpenBSD)
__BuildOS=OpenBSD
;;
NetBSD)
__BuildOS=NetBSD
;;
*)
echo "Unsupported OS $OSName detected, configuring as if for Linux"
__BuildOS=Linux
;;
esac
if [ $__BuildOS = "Linux" ]; then
clang++-3.5 -DPAL_IMPLEMENTATION -DFEATURE_PAL -D__LINUX__ -DPLATFORM_UNIX -DPAL_STDCPP_COMPAT -I./inc -I$CORECLR_SRC/inc -I$CORECLR_SRC/pal/inc -I$CORECLR_SRC/pal/inc/rt -pthread -std=c++11 -g dbg.cpp cordebug_i.cpp -o bin/dbg -L$CORECLR_SRC/../bin/Product/Linux.x64.Debug/lib -ldl -lunwind-x86_64 -lunwind-generic -lunwind-ptrace -lunwind -luuid -lpalrt -lcoreclrpal
elif [ $__BuildOS = "OSX" ]; then
clang++ -DPAL_IMPLEMENTATION -DFEATURE_PAL -DBIT64 -D__APPLE__ -DPLATFORM_UNIX -DPAL_STDCPP_COMPAT -I./inc -I$CORECLR_SRC/inc -I$CORECLR_SRC/pal/inc -I$CORECLR_SRC/pal/inc/rt -I$CORECLR_SRC/pal/prebuilt/inc -pthread -std=c++11 -g dbg.cpp cordebug_i.cpp -o bin/dbg -L$CORECLR_SRC/../bin/Product/OSx.x64.Debug/lib -ldl -lpalrt -lcoreclrpal -framework CoreFoundation -framework CoreServices -framework Security -framework System
else
echo "Unsupported OS detected"
exit 1
fi