Get static build back
This commit is contained in:
parent
65efa48df4
commit
a43dcda407
877
bootstrap/main.c
877
bootstrap/main.c
File diff suppressed because it is too large
Load Diff
14
compile.sh
14
compile.sh
@ -6,19 +6,17 @@ function compile()
|
||||
exe_name=$2
|
||||
debug_info=$3
|
||||
optimizations=$4
|
||||
static=0
|
||||
|
||||
mkdir -p $build_dir
|
||||
|
||||
compile_command="clang -o $build_dir/$exe_name $debug_info $optimizations -std=gnu2x -Wall -Wextra -Wpedantic -Wno-nested-anon-types -Wno-keyword-macro -Wno-gnu-auto-type -Wno-auto-decl-extensions -pedantic -fno-exceptions -fno-stack-protector -ferror-limit=1 -MJ $build_dir/compile_commands.json"
|
||||
compile_command="clang bootstrap/main.c -o $build_dir/$exe_name $debug_info $optimizations -std=gnu2x -Wall -Wextra -Wpedantic -Wno-nested-anon-types -Wno-keyword-macro -Wno-gnu-auto-type -Wno-auto-decl-extensions -pedantic -fno-exceptions -fno-stack-protector -ferror-limit=1 -MJ $build_dir/compile_commands.json"
|
||||
|
||||
case "$OSTYPE" in
|
||||
darwin*) compile_command="$compile_command -DDEMAND_LIBC=1";;
|
||||
# linux*) compile_command="$compile_command -ffreestanding -nostdlib -static bootstrap/entry.S -DDEMAND_LIBC=0" ;;
|
||||
linux*) compile_command="$compile_command -DDEMAND_LIBC=1" ;;
|
||||
*) echo "Unknown operating system $OSTYPE: no specific flags were added" ;;
|
||||
esac
|
||||
if [ "$static" == "1" ]
|
||||
then
|
||||
compile_command="$compile_command -ffreestanding -nostdlib -static -DSTATIC"
|
||||
fi
|
||||
|
||||
compile_command="$compile_command bootstrap/main.c"
|
||||
echo -e "\x1b[36m$compile_command\x1b[0m"
|
||||
eval "time $compile_command"
|
||||
}
|
||||
|
2
debug.sh
2
debug.sh
@ -17,6 +17,6 @@ compile $build_dir $exe_name $debug_flags $optimization_flags
|
||||
|
||||
case "$OSTYPE" in
|
||||
darwin*) lldb -- $exe_path $bootstrap_args;;
|
||||
linux*) gf2 -ex r --args $exe_path $bootstrap_args;;
|
||||
linux*) gf2 -ex b entry_point -ex r --args $exe_path $bootstrap_args;;
|
||||
*) echo "unknown: $OSTYPE" ;;
|
||||
esac
|
||||
|
@ -6,10 +6,11 @@ build_dir="build"
|
||||
exe_name="nest"
|
||||
exe_path=$build_dir/$exe_name
|
||||
debug_flags="-g"
|
||||
optimization_flags=""
|
||||
no_optimization_flags=""
|
||||
optimization_flags="-O3 -march=native"
|
||||
test_names="first"
|
||||
|
||||
compile $build_dir $exe_name $debug_flags $optimization_flags;
|
||||
compile $build_dir $exe_name $debug_flags $no_optimization_flags;
|
||||
|
||||
printf "\n======================\n"
|
||||
printf "TESTS"
|
||||
|
Loading…
x
Reference in New Issue
Block a user