mirror of
https://github.com/justinian/jsix.git
synced 2025-12-09 16:04:32 -08:00
[build] Move to yaml-based build config and manifest
Overall, I believe TOML to be a superior configuration format than YAML in many situations, but it gets ugly quickly when nesting data structures. The build configs were fine in TOML, but the manifest (and my future plans for it) got unwieldy. I also did not want different formats for each kind of configuration on top of also having a custom DSL for interface definitions, so I've switched all the TOML to YAML. Also of note is that this change actually adds structure to the manifest file, which was little more than a CSV previously.
This commit is contained in:
@@ -1,13 +1,14 @@
|
||||
[variables]
|
||||
cc = "clang"
|
||||
cxx = "clang++"
|
||||
ld = "ld.lld"
|
||||
ar = "ar"
|
||||
nasm = "nasm"
|
||||
objcopy = "objcopy"
|
||||
cog = "cog"
|
||||
---
|
||||
variables:
|
||||
cc: clang
|
||||
cxx: clang++
|
||||
ld: ld.lld
|
||||
ar: ar
|
||||
nasm: nasm
|
||||
objcopy: objcopy
|
||||
cog: cog
|
||||
|
||||
ccflags = [
|
||||
ccflags: [
|
||||
"-I${source_root}/src/include",
|
||||
"-I${source_root}/src/include/x86_64",
|
||||
"-fcolor-diagnostics",
|
||||
@@ -17,27 +18,25 @@ ccflags = [
|
||||
"-DVERSION_GITSHA=0x${version_sha}",
|
||||
'-DGIT_VERSION=\"${version_major}.${version_minor}.${version_patch}+${version_sha}\"',
|
||||
'-DGIT_VERSION_WIDE=L\"${version_major}.${version_minor}.${version_patch}+${version_sha}\"',
|
||||
|
||||
"-Wformat=2", "-Winit-self", "-Wfloat-equal", "-Winline", "-Wmissing-format-attribute",
|
||||
"-Wmissing-include-dirs", "-Wswitch", "-Wundef", "-Wdisabled-optimization",
|
||||
"-Wpointer-arith", "-Wno-attributes", "-Wno-sign-compare", "-Wno-multichar",
|
||||
"-Wno-div-by-zero", "-Wno-endif-labels", "-Wno-pragmas", "-Wno-format-extra-args",
|
||||
"-Wno-unused-result", "-Wno-deprecated-declarations", "-Wno-unused-function",
|
||||
"-Wno-address-of-packed-member", "-Wno-invalid-offsetof", "-Werror",
|
||||
]
|
||||
"-Wno-address-of-packed-member", "-Wno-invalid-offsetof", "-Werror" ]
|
||||
|
||||
asflags = [
|
||||
asflags: [
|
||||
"-DVERSION_MAJOR=${version_major}",
|
||||
"-DVERSION_MINOR=${version_minor}",
|
||||
"-DVERSION_PATCH=${version_patch}",
|
||||
"-DVERSION_GITSHA=0x${version_sha}",
|
||||
"-I${source_root}/src/include",
|
||||
]
|
||||
"-I${source_root}/src/include" ]
|
||||
|
||||
cflags = ["-std=c11"]
|
||||
cxxflags = ["-std=c++17"]
|
||||
cflags: [ "-std=c11" ]
|
||||
cxxflags: [ "-std=c++17" ]
|
||||
|
||||
cogflags = [
|
||||
cogflags: [
|
||||
"-I", "${source_root}/scripts",
|
||||
"-D", "definitions_path=${source_root}/definitions"
|
||||
]
|
||||
"-D", "definitions_path=${source_root}/definitions" ]
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
extends = "base"
|
||||
---
|
||||
extends: base
|
||||
|
||||
[variables]
|
||||
variables:
|
||||
ld: clang++
|
||||
|
||||
ld = "clang++"
|
||||
|
||||
ccflags = [
|
||||
ccflags: [
|
||||
"-I${source_root}/external",
|
||||
"--target=x86_64-unknown-windows",
|
||||
"-ffreestanding",
|
||||
@@ -13,23 +13,15 @@ ccflags = [
|
||||
"-fno-omit-frame-pointer",
|
||||
"-ggdb",
|
||||
"-g3",
|
||||
'-DKERNEL_FILENAME=L"jsix.elf"',
|
||||
]
|
||||
'-DKERNEL_FILENAME=L"jsix.elf"' ]
|
||||
|
||||
cxxflags: [ "-fno-exceptions", "-fno-rtti" ]
|
||||
|
||||
cflags = [
|
||||
]
|
||||
|
||||
cxxflags = [
|
||||
"-fno-exceptions",
|
||||
"-fno-rtti",
|
||||
]
|
||||
|
||||
ldflags = [
|
||||
ldflags: [
|
||||
"--target=x86_64-unknown-windows",
|
||||
"-nostdlib",
|
||||
"-Wl,-entry:efi_main",
|
||||
"-Wl,-subsystem:efi_application",
|
||||
"-fuse-ld=lld-link",
|
||||
"-g"
|
||||
]
|
||||
"-g" ]
|
||||
|
||||
@@ -1,47 +1,47 @@
|
||||
extends = "base"
|
||||
---
|
||||
extends: base
|
||||
|
||||
[variables]
|
||||
asflags = [
|
||||
"-I${source_root}/src/kernel/",
|
||||
]
|
||||
variables:
|
||||
asflags: [ "-I${source_root}/src/kernel/" ]
|
||||
|
||||
ccflags = [
|
||||
ccflags: [
|
||||
"--target=x86_64-unknown-elf",
|
||||
"-I${source_root}/external",
|
||||
|
||||
"-nostdlib",
|
||||
"-ffreestanding",
|
||||
"-nodefaultlibs",
|
||||
"-fno-builtin",
|
||||
|
||||
"-mno-sse",
|
||||
"-fno-omit-frame-pointer",
|
||||
"-mno-red-zone",
|
||||
"-g",
|
||||
"-mcmodel=large",
|
||||
|
||||
"-g",
|
||||
|
||||
"-D__ELF__",
|
||||
"-D__JSIX__",
|
||||
"-isystem${source_root}/sysroot/include",
|
||||
"-isystem${source_root}/src/libraries/libc/include",
|
||||
"--sysroot='${source_root}/sysroot'",
|
||||
"-U__linux",
|
||||
"-U__linux__",
|
||||
]
|
||||
|
||||
cflags = [
|
||||
'-nostdinc',
|
||||
]
|
||||
"-isystem${source_root}/sysroot/include",
|
||||
"-isystem${source_root}/src/libraries/libc/include",
|
||||
"--sysroot='${source_root}/sysroot'" ]
|
||||
|
||||
cxxflags = [
|
||||
|
||||
cflags: [ '-nostdinc' ]
|
||||
|
||||
cxxflags: [
|
||||
"-fno-exceptions",
|
||||
"-fno-rtti",
|
||||
'-nostdinc',
|
||||
"-isystem${source_root}/sysroot/include/c++/v1"
|
||||
]
|
||||
"-nostdinc",
|
||||
"-isystem${source_root}/sysroot/include/c++/v1" ]
|
||||
|
||||
ldflags = [
|
||||
ldflags: [
|
||||
"-g",
|
||||
"-nostdlib",
|
||||
"-Bstatic",
|
||||
"-z", "norelro",
|
||||
"-z", "separate-code",
|
||||
]
|
||||
"-z", "separate-code" ]
|
||||
|
||||
@@ -1,34 +1,34 @@
|
||||
extends = "base"
|
||||
---
|
||||
extends: base
|
||||
|
||||
[variables]
|
||||
asflags = [
|
||||
"-I${source_root}/src/kernel/",
|
||||
]
|
||||
variables:
|
||||
asflags: [ "-I${source_root}/src/kernel/" ]
|
||||
|
||||
ccflags = [
|
||||
ccflags: [
|
||||
"-mno-sse",
|
||||
"-fno-omit-frame-pointer",
|
||||
|
||||
"-g",
|
||||
|
||||
"-D__ELF__",
|
||||
"-D__JSIX__",
|
||||
"-isystem${source_root}/sysroot/include",
|
||||
"-isystem${source_root}/src/libraries/libc/include",
|
||||
"--sysroot='${source_root}/sysroot'",
|
||||
"-U__linux",
|
||||
"-U__linux__",
|
||||
]
|
||||
|
||||
cxxflags = [
|
||||
"-isystem${source_root}/sysroot/include",
|
||||
"-isystem${source_root}/src/libraries/libc/include",
|
||||
"--sysroot='${source_root}/sysroot'" ]
|
||||
|
||||
|
||||
cxxflags: [
|
||||
"-fno-exceptions",
|
||||
"-fno-rtti",
|
||||
"-isystem${source_root}/sysroot/include/c++/v1"
|
||||
]
|
||||
"-isystem${source_root}/sysroot/include/c++/v1" ]
|
||||
|
||||
ldflags = [
|
||||
ldflags: [
|
||||
"-g",
|
||||
"-Bstatic",
|
||||
"--sysroot='${source_root}/sysroot'",
|
||||
"-L", "${source_root}/sysroot/lib",
|
||||
"-z", "separate-code",
|
||||
]
|
||||
"-z", "separate-code" ]
|
||||
|
||||
Reference in New Issue
Block a user