Commit b2126d3345

Isaac Freund <ifreund@ifreund.xyz>
2021-05-21 14:07:47
stage2: only pass -lm -lc -ldl for android libc
The other libc components are not available on android.
1 parent 742d588
Changed files (1)
src/target.zig
@@ -387,13 +387,20 @@ pub fn libcFullLinkFlags(target: std.Target) []const []const u8 {
             "-lc",
             "-lutil",
         },
-        else => &[_][]const u8{
-            "-lm",
-            "-lpthread",
-            "-lc",
-            "-ldl",
-            "-lrt",
-            "-lutil",
+        else => switch (target.abi) {
+            .android => &[_][]const u8{
+                "-lm",
+                "-lc",
+                "-ldl",
+            },
+            else => &[_][]const u8{
+                "-lm",
+                "-lpthread",
+                "-lc",
+                "-ldl",
+                "-lrt",
+                "-lutil",
+            },
         },
     };
 }