# Toolchain TARGET := i686-elf NM := llvm-nm SED := sed 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 CXX := clang++ TEST_CXX := clang++ CXX_FLAGS := -std=c++20 -g -O2 -flto=thin \ -mkernel -ffreestanding -nostdlib -nostdinc -nostdinc++ \ -Wall -Wextra -Werror=pedantic \ -Werror=date-time \ -Werror=shadow-all \ -Wold-style-cast -Wconversion \ -Wconsumed CXX_TEST_FLAGS := -std=c++20 -Wall -Wextra -Werror=pedantic CXX_INCLUDE := $(CURDIR)/libk $(CURDIR)/src $(CURDIR)/drivers CXX_SYSTEM_INCLUDE := $(CURDIR)/grub # GRUB_MKRESCUE := grub-mkrescue GRUB_FILE := grub-file GRUB_SCRIPT := grub-script-check EMU := qemu-system-i386 -cdrom