Files
Custom-Operating-System/build/config/BUILDCONFIG.gn

71 lines
1.3 KiB
Plaintext
Raw Normal View History

2025-02-12 09:54:05 -05:00
declare_args() {
# Common
debug_build = true
optimize = true
host = "gnu"
llvm_bin_path = ""
device_type = "desktop"
target_arch = ""
target_board = ""
# Kernel Flags
kernel_symbols = true
kernel_preempt = true
# Userland
userland_symbols = true
compile_tests = true
objc_support = false
test_method = "none"
}
if (target_arch == "") {
# target_cpu is deprecated, but not fully deleted.
if (target_cpu != "") {
target_arch = target_cpu
} else {
target_arch = "x86"
}
}
if (target_arch == "arm") {
target_arch = "arm32"
}
if (target_arch == "aarch64") {
target_arch = "arm64"
}
if (device_type == "m") {
device_type = "mobile"
}
if (device_type == "d") {
device_type = "desktop"
}
if (target_arch == "x86") {
target_board = "i386"
}
if (target_arch == "x86_64") {
target_board = "x86_64"
}
if (target_arch == "arm32") {
# Currently we support only vexpress-a15.
target_board = "vexpress-a15"
}
if (target_arch == "arm64") {
if (target_board == "") {
target_board = "qemu_virt"
}
}
if (target_arch == "riscv64") {
target_board = "riscv64"
}
if (host == "gnu") {
set_default_toolchain("//toolchains:gnu-cross-compiler")
}
if (host == "llvm") {
objc_support = true
llvm_bin_path = getenv("LLVM_BIN_PATH")
set_default_toolchain("//toolchains:llvm-cross-compiler")
}