aboutsummaryrefslogtreecommitdiff
path: root/src/compiler.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2020-02-29 01:57:06 -0500
committerGitHub <noreply@github.com>2020-02-29 01:57:06 -0500
commit76176104001420ea04840f9b31e706289e4ebf11 (patch)
tree4ba46044adc883630a3452b33f9d70541581d7ae /src/compiler.cpp
parent1b41f2d77ea14de27b0655a35a727d664cfc4ca4 (diff)
parent3cba603eae1a1c8b0338f5584041c73d55682c0a (diff)
downloadzig-76176104001420ea04840f9b31e706289e4ebf11.tar.gz
zig-76176104001420ea04840f9b31e706289e4ebf11.zip
Merge pull request #4550 from ziglang/os-version-ranges
introduce operating system version ranges as part of the target; self-host native dynamic linker detection and native glibc version detection
Diffstat (limited to 'src/compiler.cpp')
-rw-r--r--src/compiler.cpp25
1 files changed, 0 insertions, 25 deletions
diff --git a/src/compiler.cpp b/src/compiler.cpp
index 31bac4ee24..cddecc2025 100644
--- a/src/compiler.cpp
+++ b/src/compiler.cpp
@@ -4,31 +4,6 @@
#include <stdio.h>
-Buf *get_self_libc_path(void) {
- static Buf saved_libc_path = BUF_INIT;
- static bool searched_for_libc = false;
-
- for (;;) {
- if (saved_libc_path.list.length != 0) {
- return &saved_libc_path;
- }
- if (searched_for_libc)
- return nullptr;
- ZigList<Buf *> lib_paths = {};
- Error err;
- if ((err = os_self_exe_shared_libs(lib_paths)))
- return nullptr;
- for (size_t i = 0; i < lib_paths.length; i += 1) {
- Buf *lib_path = lib_paths.at(i);
- if (buf_ends_with_str(lib_path, "libc.so.6")) {
- buf_init_from_buf(&saved_libc_path, lib_path);
- return &saved_libc_path;
- }
- }
- searched_for_libc = true;
- }
-}
-
Error get_compiler_id(Buf **result) {
static Buf saved_compiler_id = BUF_INIT;