Move linker script
This commit is contained in:
		
							parent
							
								
									72269c28cc
								
							
						
					
					
						commit
						cec5d3c68d
					
				
					 2 changed files with 6 additions and 4 deletions
				
			
		|  | @ -31,7 +31,8 @@ pub fn build(b: *Builder) !void { | |||
|     b.default_step.dependOn(&fmt_step.step); | ||||
| 
 | ||||
|     const main_src = "src/kernel/kmain.zig"; | ||||
|     const constants_path = try fs.path.join(b.allocator, &[_][]const u8{ "src/kernel/arch", arch, "constants.zig" }); | ||||
|     const arch_root = "src/kernel/arch"; | ||||
|     const constants_path = try fs.path.join(b.allocator, &[_][]const u8{ arch_root, arch, "constants.zig" }); | ||||
| 
 | ||||
|     const build_mode = b.standardReleaseOptions(); | ||||
|     const rt_test = b.option(bool, "rt-test", "enable/disable runtime testing") orelse false; | ||||
|  | @ -41,7 +42,8 @@ pub fn build(b: *Builder) !void { | |||
|     exec.setOutputDir(b.cache_root); | ||||
|     exec.addBuildOption(bool, "rt_test", rt_test); | ||||
|     exec.setBuildMode(build_mode); | ||||
|     exec.setLinkerScriptPath("link.ld"); | ||||
|     const linker_script_path = try fs.path.join(b.allocator, &[_][]const u8{ arch_root, arch, "link.ld" }); | ||||
|     exec.setLinkerScriptPath(linker_script_path); | ||||
|     exec.setTarget(target); | ||||
| 
 | ||||
|     const output_iso = try fs.path.join(b.allocator, &[_][]const u8{ b.exe_dir, "pluto.iso" }); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Sam Tebbs
						Sam Tebbs