aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2020-02-21 20:48:50 -0500
committerAndrew Kelley <andrew@ziglang.org>2020-02-21 20:48:50 -0500
commitdca19b67573dc46260b318e9253370fbc628834d (patch)
tree4b2d58f8818d22aac2c41ae21639860ef9141ed8 /src/main.cpp
parent6305ce828b0685ceb646fae87a963f034d3bcdf0 (diff)
downloadzig-dca19b67573dc46260b318e9253370fbc628834d.tar.gz
zig-dca19b67573dc46260b318e9253370fbc628834d.zip
fix regression in detecting native glibc version
closes #4519
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index d6148d4587..a4ab719123 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -992,6 +992,14 @@ static int main0(int argc, char **argv) {
}
} else {
target_init_default_glibc_version(&target);
+#if defined(ZIG_OS_LINUX)
+ if (target.is_native) {
+ // TODO self-host glibc version detection, and then this logic can go away
+ if ((err = glibc_detect_native_version(target.glibc_version))) {
+ // Fall back to the default version.
+ }
+ }
+#endif
}
} else if (target_glibc != nullptr) {
fprintf(stderr, "'%s' is not a glibc-compatible target", target_string);