Compare commits

..

2 Commits

Author SHA1 Message Date
17d5485a39 CE reset editor struct
All checks were successful
Build documentation / build-and-deploy (push) Successful in 2m3s
2026-03-06 00:17:54 +01:00
f725beb433 Debug options for user apps and libs 2026-03-06 00:17:08 +01:00
3 changed files with 38 additions and 21 deletions

View File

@@ -2,21 +2,22 @@
set -xe
debugopt=""
if [ "$1" = "debug" ]; then
make -B all_kernel buildtype=debug
else
make -B all_kernel
debugopt="buildtype=debug"
fi
make -B all_libsystem
make -B all_liballoc
make -B all_libprocess
make -B all_libterminal
make -B all_libstring
make -B all_libkb
make -B all_libaux
make -B all_libarena
make -B all_libioutil
make -B all_apps
make -B all_kernel "$debugopt"
make -B all_libsystem "$debugopt"
make -B all_liballoc "$debugopt"
make -B all_libprocess "$debugopt"
make -B all_libterminal "$debugopt"
make -B all_libstring "$debugopt"
make -B all_libkb "$debugopt"
make -B all_libaux "$debugopt"
make -B all_libarena "$debugopt"
make -B all_libioutil "$debugopt"
make -B all_apps "$debugopt"
make -B all_dist
./aux/limine_iso_amd64.sh

View File

@@ -85,7 +85,7 @@ void edit_start (const char* file_path, const char* text) {
terminal_dimensions (&cols, &rows);
mprintf (ANSIQ_SCR_SAVE ANSIQ_SCR_CLR_ALL ANSIQ_CUR_INVISIBLE);
mprintf (ANSIQ_SCR_CLR_ALL ANSIQ_CUR_INVISIBLE);
bool edit_run = true;
@@ -227,7 +227,7 @@ void edit_start (const char* file_path, const char* text) {
arena_reset (&temp_arena);
}
mprintf (ANSIQ_SCR_CLR_ALL ANSIQ_CUR_VISIBLE ANSIQ_SCR_RESTORE);
mprintf (ANSIQ_SCR_CLR_ALL ANSIQ_CUR_VISIBLE);
arena_destroy (&temp_arena);
@@ -237,4 +237,6 @@ void edit_start (const char* file_path, const char* text) {
free (line->gb.buffer);
free (line);
}
memset (&editor, 0, sizeof (editor));
}

View File

@@ -5,9 +5,15 @@ cflags += -nostdinc \
-std=c11 \
-pedantic \
-Wall \
-Wextra \
-ffunction-sections \
-fdata-sections
-Wextra
ifeq ($(buildtype),debug)
cflags += -O0 -g
endif
ifeq ($(buildtype),release)
cflags += -ffunction-sections -fdata-sections -Oz
endif
cflags += -isystem ../include
@@ -15,6 +21,14 @@ ldflags += -ffreestanding \
-nostdlib \
-fno-builtin \
-fuse-ld=lld \
-static \
-Wl,--gc-sections \
-static
ifeq ($(buildtype),debug)
ldflags += -g
endif
ifeq ($(buildtype),release)
ldflags += -Wl,--gc-sections \
-Wl,--strip-all \
-flto
endif