aboutsummaryrefslogtreecommitdiff
path: root/src/codegen.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2019-03-27 13:11:01 -0400
committerGitHub <noreply@github.com>2019-03-27 13:11:01 -0400
commitfbe9233aa7a84a1c382f35510e71f06d597e2a19 (patch)
treec5373e65b70a3ec9ec4d4c3cdeeaed5ae70d9e4b /src/codegen.cpp
parentcf4e9a27c5a0f370197837312307f40bb1d6685f (diff)
parent084724c689215fe3a647ceb9d8622faeb60da1ba (diff)
downloadzig-fbe9233aa7a84a1c382f35510e71f06d597e2a19.tar.gz
zig-fbe9233aa7a84a1c382f35510e71f06d597e2a19.zip
Merge pull request #2107 from shawnl/arm64
fix build on arm64
Diffstat (limited to 'src/codegen.cpp')
-rw-r--r--src/codegen.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/codegen.cpp b/src/codegen.cpp
index 015680b5d2..8de3e81194 100644
--- a/src/codegen.cpp
+++ b/src/codegen.cpp
@@ -7989,15 +7989,9 @@ static void detect_dynamic_linker(CodeGen *g) {
#if defined(ZIG_OS_LINUX)
{
Error err;
- static const char *dyn_tests[] = {
-#if defined(ZIG_ARCH_X86_64)
- "ld-linux-x86-64.so.2",
- "ld-musl-x86_64.so.1",
-#endif
- };
Buf *result = buf_alloc();
- for (size_t i = 0; i < array_length(dyn_tests); i += 1) {
- const char *lib_name = dyn_tests[i];
+ for (size_t i = 0; possible_ld_names[i] != NULL; i += 1) {
+ const char *lib_name = possible_ld_names[i];
if ((err = zig_libc_cc_print_file_name(lib_name, result, false, true))) {
if (err != ErrorCCompilerCannotFindFile) {
fprintf(stderr, "Unable to detect native dynamic linker: %s\n", err_str(err));