aboutsummaryrefslogtreecommitdiff
path: root/toolchain.makefile
diff options
context:
space:
mode:
Diffstat (limited to 'toolchain.makefile')
-rw-r--r--toolchain.makefile7
1 files changed, 4 insertions, 3 deletions
diff --git a/toolchain.makefile b/toolchain.makefile
index d8f09f7..ce8fdc6 100644
--- a/toolchain.makefile
+++ b/toolchain.makefile
@@ -8,13 +8,14 @@ AS := clang
AS_FLAGS :=
LD := ld.lld
-LD_FLAGS := -T linker.ld --thinlto-cache-dir=$(OBJ_DIR)/thinlto_cache
+LD_FLAGS := -nostdlib -T linker.ld --thinlto-cache-dir=$(OBJ_DIR)/thinlto_cache
+# TODO: linking fails with -O0 and -O1 without -flto=thin
CXX := clang++
TEST_CXX := clang++
-CXX_FLAGS := -std=c++20 -g \
+CXX_FLAGS := -std=c++20 -g -O2 -flto=thin \
-mkernel -ffreestanding -nostdlib -nostdinc -nostdinc++ \
- -Wall -Wextra -Werror=pedantic -O2 -flto=thin \
+ -Wall -Wextra -Werror=pedantic \
-Werror=date-time \
-Werror=shadow-all \
-Wold-style-cast -Wconversion \