Moved build options to more sensible locations.
This commit is contained in:
parent
2e65e20090
commit
ba5d239073
@ -1,7 +1,8 @@
|
|||||||
{.link: "boot.o".}
|
{.link: "boot.o".}
|
||||||
{.passL: "-T kernel/arch/i386/linker.ld".}
|
{.passL: "-ffreestanding -target i386 -nostdlib -T kernel/arch/i386/linker.ld".}
|
||||||
|
{.passC: "-ffreestanding -nostdlib --target=i386-pc-none-elf -march=i386".}
|
||||||
|
|
||||||
import tty, gdt, irq, serial
|
import tty, gdt, serial
|
||||||
|
|
||||||
type
|
type
|
||||||
MemoryPointer{.unchecked.} = ptr array[0, char]
|
MemoryPointer{.unchecked.} = ptr array[0, char]
|
||||||
|
12
kernel/nim.cfg
Normal file
12
kernel/nim.cfg
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
cc=clang
|
||||||
|
|
||||||
|
path="$lib/core"
|
||||||
|
path="$lib/pure"
|
||||||
|
path="$lib/pure/collections"
|
||||||
|
path="arch/i386"
|
||||||
|
|
||||||
|
deadCodeElim=on
|
||||||
|
boundChecks=on
|
||||||
|
gc=regions
|
||||||
|
cpu=i386
|
||||||
|
os=standalone
|
@ -2,7 +2,7 @@ import nake
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
const
|
const
|
||||||
standardOptions = """--skipCfg --forceBuild --cc:clang --deadCodeElim:on --gc:regions --boundChecks:on --path:"kernel/arch/i386" --cpu:i386 --os:standalone --passC:"-ffreestanding -nostdlib --target=i386-pc-none-elf -march=i386" --passL:"-ffreestanding -target i386 -nostdlib" kernel/kernel.nim"""
|
standardOptions = """--skipCfg kernel.nim"""
|
||||||
outputFile = "myos.bin"
|
outputFile = "myos.bin"
|
||||||
|
|
||||||
task "clean", "Removes build files.":
|
task "clean", "Removes build files.":
|
||||||
@ -21,7 +21,8 @@ task "build", "Builds the operating system.":
|
|||||||
runTask("clean")
|
runTask("clean")
|
||||||
runTask("bootloader")
|
runTask("bootloader")
|
||||||
echo "Compiling and linking."
|
echo "Compiling and linking."
|
||||||
direShell "nim cc -o:", outputFile, standardOptions
|
withDir("kernel"):
|
||||||
|
direShell "nim cc -o:", "../" & outputFile, standardOptions
|
||||||
runTask("checkMultiboot")
|
runTask("checkMultiboot")
|
||||||
echo "Done."
|
echo "Done."
|
||||||
|
|
||||||
@ -29,7 +30,8 @@ task "build-release", "Builds the operating system, release mode.":
|
|||||||
runTask("clean")
|
runTask("clean")
|
||||||
runTask("bootloader")
|
runTask("bootloader")
|
||||||
echo "Compiling and linking (release mode)."
|
echo "Compiling and linking (release mode)."
|
||||||
direShell "nim cc --skipCfg -d:release -o:", outputFile, standardOptions
|
withDir("kernel"):
|
||||||
|
direShell "nim cc -d:release -o:", "../" & outputFile, standardOptions
|
||||||
runTask("checkMultiboot")
|
runTask("checkMultiboot")
|
||||||
echo "Done."
|
echo "Done."
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user