aboutsummaryrefslogtreecommitdiff
path: root/toolchain.makefile
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2021-03-16 12:34:18 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2021-03-16 12:34:18 +0200
commitd39920b62e3e0371c5698aae2c316671130b0956 (patch)
tree7b561a5f53d1d4373fbe30c72d5ef3b9888a5d4a /toolchain.makefile
parentMap .text and .rodata as read-only (diff)
downloadkernel.cpp-d39920b62e3e0371c5698aae2c316671130b0956.tar.xz
Switch lto to full
Diffstat (limited to 'toolchain.makefile')
-rw-r--r--toolchain.makefile8
1 files changed, 4 insertions, 4 deletions
diff --git a/toolchain.makefile b/toolchain.makefile
index ce8fdc6..a4a0667 100644
--- a/toolchain.makefile
+++ b/toolchain.makefile
@@ -8,13 +8,13 @@ AS := clang
AS_FLAGS :=
LD := ld.lld
-LD_FLAGS := -nostdlib -T linker.ld --thinlto-cache-dir=$(OBJ_DIR)/thinlto_cache
-# TODO: linking fails with -O0 and -O1 without -flto=thin
+LD_FLAGS := -nostdlib -T linker.ld
CXX := clang++
TEST_CXX := clang++
-CXX_FLAGS := -std=c++20 -g -O2 -flto=thin \
- -mkernel -ffreestanding -nostdlib -nostdinc -nostdinc++ \
+CXX_FLAGS := -std=c++20 -g -O3 -flto=full \
+ -static -ffreestanding -fno-common -nostdinc -nostdinc++ \
+ -fno-use-cxa-atexit -fno-rtti -fno-exceptions -fno-non-call-exceptions \
-Wall -Wextra -Werror=pedantic \
-Werror=date-time \
-Werror=shadow-all \