diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2016-02-02 15:04:14 -0700 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2016-02-02 15:04:14 -0700 |
| commit | 7af59c76e40d185ed1a8962c2d5fd0f88680d5a7 (patch) | |
| tree | fbd8eeaf799fbea424a546b0ae199ce91a7e70ad /src/analyze.cpp | |
| parent | 5824b15249c8fb42aba5ca347d7dc702a4a00a9f (diff) | |
| download | zig-7af59c76e40d185ed1a8962c2d5fd0f88680d5a7.tar.gz zig-7af59c76e40d185ed1a8962c2d5fd0f88680d5a7.zip | |
build: fix libc path finding
Diffstat (limited to 'src/analyze.cpp')
| -rw-r--r-- | src/analyze.cpp | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/src/analyze.cpp b/src/analyze.cpp index a0bd943a19..7af8632b96 100644 --- a/src/analyze.cpp +++ b/src/analyze.cpp @@ -5486,20 +5486,12 @@ bool handle_is_ptr(TypeTableEntry *type_entry) { } void find_libc_path(CodeGen *g) { - if (!g->libc_path || buf_len(g->libc_path) == 0) { - g->libc_path = buf_create_from_str(ZIG_LIBC_DIR); - if (!g->libc_path || buf_len(g->libc_path) == 0) { - // later we can handle this better by reporting an error via the normal mechanism - zig_panic("Unable to determine libc path. You can use `--libc-path`"); - } - } - if (!g->libc_lib_path) { - g->libc_lib_path = buf_alloc(); - os_path_join(g->libc_path, buf_create_from_str("lib"), g->libc_lib_path); + // later we can handle this better by reporting an error via the normal mechanism + if (!g->libc_lib_dir || buf_len(g->libc_lib_dir) == 0) { + zig_panic("Unable to determine libc lib path. probably need to reconfigure"); } - if (!g->libc_include_path) { - g->libc_include_path = buf_alloc(); - os_path_join(g->libc_path, buf_create_from_str("include"), g->libc_include_path); + if (!g->libc_include_dir || buf_len(g->libc_include_dir) == 0) { + zig_panic("Unable to determine libc include path. probably need to reconfigure"); } } |
