mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 00:14:32 -08:00
[bonnibel] Allow modules to list ld scripts in definition
Previously, to add a custom linker script, a module would need to modify its variables after the fact to add to ldflags. Now module constructors take a new keyword `ld_script` and handle the ldflags and dependencies properly.
This commit is contained in:
@@ -7,6 +7,7 @@ kernel = module("kernel",
|
||||
targets = [ "kernel" ],
|
||||
description = "jsix kernel",
|
||||
deps = [ "util", "cpu", "bootproto", "j6" ],
|
||||
ld_script = "kernel.ld",
|
||||
sources = [
|
||||
"apic.cpp",
|
||||
"assert.cpp",
|
||||
@@ -83,5 +84,3 @@ kernel.add_depends([
|
||||
"syscalls.inc.cog",
|
||||
"syscall_verify.cpp.cog",
|
||||
], definitions)
|
||||
|
||||
kernel.variables['ldflags'] = ["${ldflags}", "-T", "${source_root}/src/kernel/kernel.ld"]
|
||||
|
||||
Reference in New Issue
Block a user