mirror of
https://github.com/ziglang/zig.git
synced 2026-01-20 22:35:24 +00:00
Build: Use LazyPath for version scripts
This commit is contained in:
parent
4cbf74bd9b
commit
9c8c9b7cc8
@ -25,7 +25,7 @@ root_module: Module,
|
||||
|
||||
name: []const u8,
|
||||
linker_script: ?LazyPath = null,
|
||||
version_script: ?[]const u8 = null,
|
||||
version_script: ?LazyPath = null,
|
||||
out_filename: []const u8,
|
||||
out_lib_filename: []const u8,
|
||||
linkage: ?Linkage = null,
|
||||
@ -481,6 +481,12 @@ pub fn setLinkerScript(self: *Compile, source: LazyPath) void {
|
||||
source.addStepDependencies(&self.step);
|
||||
}
|
||||
|
||||
pub fn setVersionScript(self: *Compile, source: LazyPath) void {
|
||||
const b = self.step.owner;
|
||||
self.version_script = source.dupe(b);
|
||||
source.addStepDependencies(&self.step);
|
||||
}
|
||||
|
||||
pub fn forceUndefinedSymbol(self: *Compile, symbol_name: []const u8) void {
|
||||
const b = self.step.owner;
|
||||
self.force_undefined_symbols.put(b.dupe(symbol_name), {}) catch @panic("OOM");
|
||||
@ -1443,7 +1449,7 @@ fn make(step: *Step, prog_node: *std.Progress.Node) !void {
|
||||
|
||||
if (self.version_script) |version_script| {
|
||||
try zig_args.append("--version-script");
|
||||
try zig_args.append(b.pathFromRoot(version_script));
|
||||
try zig_args.append(version_script.getPath(b));
|
||||
}
|
||||
|
||||
if (self.kind == .@"test") {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user