aboutsummaryrefslogtreecommitdiff
path: root/src/codegen.cpp
diff options
context:
space:
mode:
authorJosh Wolfe <thejoshwolfe@gmail.com>2015-11-26 02:49:40 -0700
committerJosh Wolfe <thejoshwolfe@gmail.com>2015-11-26 14:42:46 -0700
commitbd5cb3e50e9f9a887cd23a24f8c766914a5c4496 (patch)
treecddd5282153a953b624dbf621f8b39bdce857eb4 /src/codegen.cpp
parent00a7936c9f80f780b4e1f215f323c90799335786 (diff)
downloadzig-bd5cb3e50e9f9a887cd23a24f8c766914a5c4496.tar.gz
zig-bd5cb3e50e9f9a887cd23a24f8c766914a5c4496.zip
add hook for environment variable ZIG_DEBIAN_HACK. see #1.
Diffstat (limited to 'src/codegen.cpp')
-rw-r--r--src/codegen.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/codegen.cpp b/src/codegen.cpp
index d59eff336e..26c189a4e9 100644
--- a/src/codegen.cpp
+++ b/src/codegen.cpp
@@ -721,6 +721,11 @@ void code_gen_link(CodeGen *g, const char *out_file) {
if (g->is_static) {
args.append("-static");
}
+ if (getenv("ZIG_DEBIAN_HACK") != nullptr) {
+ // XXX: hack. see https://github.com/andrewrk/zig/issues/1
+ args.append("-dynamic-linker");
+ args.append("/lib64/ld-linux-x86-64.so.2");
+ }
args.append("-o");
args.append(out_file);
args.append((const char *)buf_ptr(&out_file_o));