mirror of
https://github.com/SerenityOS/serenity
synced 2024-09-06 17:06:31 +00:00
32 lines
1.2 KiB
Plaintext
32 lines
1.2 KiB
Plaintext
declare_args() {
|
|
# Serenity architecture to build for
|
|
serenity_arch = "x86_64"
|
|
|
|
# Serenity compiler to use, Clang or GNU
|
|
serenity_toolchain = "GNU"
|
|
}
|
|
|
|
if (serenity_toolchain == "GNU") {
|
|
toolchain_root =
|
|
rebase_path("//Toolchain/Local/$serenity_arch/", root_build_dir)
|
|
toolchain_bin = toolchain_root + "bin/"
|
|
|
|
serenity_cc = toolchain_bin + serenity_arch + "-pc-serenity-gcc"
|
|
serenity_cxx = toolchain_bin + serenity_arch + "-pc-serenity-g++"
|
|
serenity_ld = serenity_cxx
|
|
serenity_nm = toolchain_bin + serenity_arch + "-pc-serenity-nm"
|
|
serenity_objcopy = toolchain_bin + serenity_arch + "-pc-serenity-objcopy"
|
|
serenity_compiler_version = "13.1.0"
|
|
} else {
|
|
assert(serenity_toolchain == "Clang",
|
|
"Expected GNU or Clang for serenity_toolchain")
|
|
toolchain_root = rebase_path("//Toolchain/Local/clang/", root_build_dir)
|
|
toolchain_bin = toolchain_root + "bin/"
|
|
serenity_cc = toolchain_bin + serenity_arch + "-pc-serenity-clang"
|
|
serenity_cxx = toolchain_bin + serenity_arch + "-pc-serenity-clang++"
|
|
serenity_ld = serenity_cxx
|
|
serenity_nm = toolchain_bin + "llvm-nm"
|
|
serenity_objcopy = toolchain_bin + "llvm-objcopy"
|
|
serenity_compiler_version = "16"
|
|
}
|