More peephole (rewrite -> simple chapter 09)
This commit is contained in:
parent
2e78b86605
commit
9cddae8aed
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"
|
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
|
case "$OSTYPE" in
|
||||||
darwin*) ;;
|
darwin*) compile_command="$compile_command -DDEMAND_LIBC=1";;
|
||||||
linux*) compile_command="$compile_command -ffreestanding -nostdlib -static bootstrap/entry.S" ;;
|
linux*) compile_command="$compile_command -ffreestanding -nostdlib -static bootstrap/entry.S -DDEMAND_LIBC=0" ;;
|
||||||
*) echo "unknown: $OSTYPE" ;;
|
*) echo "Unknown operating system $OSTYPE: no specific flags were added" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
compile_command="$compile_command bootstrap/main.cpp"
|
compile_command="$compile_command bootstrap/main.cpp"
|
||||||
|
@ -2,5 +2,9 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
source ./compile.sh
|
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
|
build/nest
|
||||||
|
@ -74,6 +74,7 @@ fn if4(arg: s32) s32
|
|||||||
fn if5(arg: s32) s32
|
fn if5(arg: s32) s32
|
||||||
{
|
{
|
||||||
>a: s32 = 1;
|
>a: s32 = 1;
|
||||||
|
|
||||||
if (arg == 1)
|
if (arg == 1)
|
||||||
{
|
{
|
||||||
if (arg == 2)
|
if (arg == 2)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user