aboutsummaryrefslogtreecommitdiff
path: root/src/codegen.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2018-03-31 12:13:30 -0400
committerGitHub <noreply@github.com>2018-03-31 12:13:30 -0400
commit51a6ff18d454f4cb0faa0f1837df9f0c55a80b43 (patch)
treebd603e96266978590f4c2d6201829f8817a64f3c /src/codegen.cpp
parent7d66908f294eed1138802c060185721a2e265f3b (diff)
parent8f962a957a3645342fba8219cf8f33d0ac42e16d (diff)
downloadzig-51a6ff18d454f4cb0faa0f1837df9f0c55a80b43.tar.gz
zig-51a6ff18d454f4cb0faa0f1837df9f0c55a80b43.zip
Merge pull request #872 from zig-lang/runtime-libc
find libc and zig std lib at runtime
Diffstat (limited to 'src/codegen.cpp')
-rw-r--r--src/codegen.cpp19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/codegen.cpp b/src/codegen.cpp
index 25b2ffbf16..0ebdf7fa3d 100644
--- a/src/codegen.cpp
+++ b/src/codegen.cpp
@@ -112,10 +112,10 @@ CodeGen *codegen_create(Buf *root_src_path, const ZigTarget *target, OutType out
// that's for native compilation
g->zig_target = *target;
resolve_target_object_format(&g->zig_target);
- g->dynamic_linker = buf_create_from_str("");
- g->libc_lib_dir = buf_create_from_str("");
- g->libc_static_lib_dir = buf_create_from_str("");
- g->libc_include_dir = buf_create_from_str("");
+ g->dynamic_linker = nullptr;
+ g->libc_lib_dir = nullptr;
+ g->libc_static_lib_dir = nullptr;
+ g->libc_include_dir = nullptr;
g->msvc_lib_dir = nullptr;
g->kernel32_lib_dir = nullptr;
g->each_lib_rpath = false;
@@ -123,16 +123,13 @@ CodeGen *codegen_create(Buf *root_src_path, const ZigTarget *target, OutType out
// native compilation, we can rely on the configuration stuff
g->is_native_target = true;
get_native_target(&g->zig_target);
- g->dynamic_linker = buf_create_from_str(ZIG_DYNAMIC_LINKER);
- g->libc_lib_dir = buf_create_from_str(ZIG_LIBC_LIB_DIR);
- g->libc_static_lib_dir = buf_create_from_str(ZIG_LIBC_STATIC_LIB_DIR);
- g->libc_include_dir = buf_create_from_str(ZIG_LIBC_INCLUDE_DIR);
+ g->dynamic_linker = nullptr; // find it at runtime
+ g->libc_lib_dir = nullptr; // find it at runtime
+ g->libc_static_lib_dir = nullptr; // find it at runtime
+ g->libc_include_dir = nullptr; // find it at runtime
g->msvc_lib_dir = nullptr; // find it at runtime
g->kernel32_lib_dir = nullptr; // find it at runtime
-
-#ifdef ZIG_EACH_LIB_RPATH
g->each_lib_rpath = true;
-#endif
if (g->zig_target.os == OsMacOSX ||
g->zig_target.os == OsIOS)