-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap.sh
executable file
·36 lines (30 loc) · 1.08 KB
/
bootstrap.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
#!/usr/bin/env sh
# if not on a machine whose `uname` contains Apple’s nickname “Darwin”
if [ "$(uname)" != Darwin ]; then
printf '
This software runs on any device with Clang
installed, but performs the described
behavior only on Apple machines.\n '
sleep 1
printf 'Exiting.\n'
exit 1
fi
# the target machine is a macOS device which more easily performs with Clang
# than with GCC
if command -v clang >/dev/null 2>&1; then
clang --verbose -v -Wall -Wextra -pedantic -g -lm -O0 -fcaret-diagnostics \
-fdiagnostics-fixit-info -fdiagnostics-parseable-fixits \
-fdiagnostics-print-source-range-info -fdiagnostics-show-option -fident \
-fno-builtin -fshow-column -fshow-source-location -fstandalone-debug \
-ftime-report -ftrapv -integrated-as -pthread -save-stats -save-temps \
-Wno-unsequenced -Wno-unused-parameter \
"$(find -- * -iname '*.c')" \
-o "${PWD##*/}/${PWD##*/}"
./"${PWD##*/}/${PWD##*/}"
else
printf '
No valid Clang installation detected. Please install it,
and then run the following again:
./bootstrap.sh\n\n'
return 1
fi