aboutsummaryrefslogtreecommitdiff
path: root/toolchain.makefile
blob: dc6194ee70d5bc1b695b6b0fb97f036620df2e7a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Toolchain
TARGET := i686-elf

NM := llvm-nm
SED := sed

AS       := clang
AS_FLAGS := -nostdlib -Wall -Wextra

LD       := ld.lld
LD_FLAGS := -nostdlib -T linker.ld

CXX         := clang++
TEST_CXX    := clang++
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 \
	       -Wold-style-cast -Wconversion \
	       -Wconsumed
CXX_TEST_FLAGS := -std=c++20 -Wall -Wextra -Werror=pedantic
CXX_INCLUDE := $(CURDIR)/libk $(CURDIR)/src $(CURDIR)/drivers

SYSTEM_INCLUDE := $(CURDIR)/grub

#
GRUB_MKRESCUE := grub-mkrescue
GRUB_FILE     := grub-file
GRUB_SCRIPT   := grub-script-check

EMU := qemu-system-i386 -cdrom