Merge pull request #16 from birth-software/more-peephole
More peephole (rewrite -> simple chapter 09)
This commit is contained in:
commit
877690bd55
3409
bootstrap/main.cpp
3409
bootstrap/main.cpp
File diff suppressed because it is too large
Load Diff
@ -12,9 +12,9 @@ function compile()
|
||||
compile_command="clang++ -o $build_dir/$exe_name $debug_info $optimizations -std=gnu++20 -Wall -Wextra -Wpedantic -Wno-nested-anon-types -pedantic -fno-exceptions -fno-stack-protector -ferror-limit=1 -MJ $build_dir/compile_commands.json"
|
||||
|
||||
case "$OSTYPE" in
|
||||
darwin*) ;;
|
||||
linux*) compile_command="$compile_command -ffreestanding -nostdlib -static bootstrap/entry.S" ;;
|
||||
*) echo "unknown: $OSTYPE" ;;
|
||||
darwin*) compile_command="$compile_command -DDEMAND_LIBC=1";;
|
||||
linux*) compile_command="$compile_command -ffreestanding -nostdlib -static bootstrap/entry.S -DDEMAND_LIBC=0" ;;
|
||||
*) echo "Unknown operating system $OSTYPE: no specific flags were added" ;;
|
||||
esac
|
||||
|
||||
compile_command="$compile_command bootstrap/main.cpp"
|
||||
|
@ -2,5 +2,9 @@
|
||||
|
||||
set -e
|
||||
source ./compile.sh
|
||||
compile "build" "nest" "-g" "";
|
||||
build_dir="build"
|
||||
exe_name="nest"
|
||||
exe_path=$build_dir/$exe_name
|
||||
|
||||
compile $build_dir $exe_name "-g" "";
|
||||
build/nest
|
||||
|
@ -74,6 +74,7 @@ fn if4(arg: s32) s32
|
||||
fn if5(arg: s32) s32
|
||||
{
|
||||
>a: s32 = 1;
|
||||
|
||||
if (arg == 1)
|
||||
{
|
||||
if (arg == 2)
|
||||
|
Loading…
x
Reference in New Issue
Block a user