aboutsummaryrefslogtreecommitdiff
path: root/lib/std
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2020-10-04 17:48:07 -0700
committerAndrew Kelley <andrew@ziglang.org>2020-10-04 17:59:44 -0700
commit1d777e99588be047ec4d7650f048b043d6e52da0 (patch)
treec6155fb3f8b3d9f6218942bbce293bab355d2bf8 /lib/std
parentda596b7e4febc95ec5249c9f489166944fbe69b9 (diff)
downloadzig-1d777e99588be047ec4d7650f048b043d6e52da0.tar.gz
zig-1d777e99588be047ec4d7650f048b043d6e52da0.zip
add --image-base support
Based on #6121 by Jay Petacat.
Diffstat (limited to 'lib/std')
-rw-r--r--lib/std/build.zig8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/std/build.zig b/lib/std/build.zig
index 8749c7ce2d..bb9744859c 100644
--- a/lib/std/build.zig
+++ b/lib/std/build.zig
@@ -1232,6 +1232,9 @@ pub const LibExeObjStep = struct {
installed_path: ?[]const u8,
install_step: ?*InstallArtifactStep,
+ /// Base address for an executable image.
+ image_base: ?u64 = null,
+
libc_file: ?[]const u8 = null,
valgrind_support: ?bool = null,
@@ -2041,6 +2044,11 @@ pub const LibExeObjStep = struct {
try zig_args.append("--pkg-end");
}
+ if (self.image_base) |image_base| {
+ try zig_args.append("--image-base");
+ try zig_args.append(image_base);
+ }
+
if (self.filter) |filter| {
try zig_args.append("--test-filter");
try zig_args.append(filter);