| ... | ... | @@ -7906,6 +7906,9 @@ static void init(CodeGen *g) { |
| 7906 | 7906 | static void detect_dynamic_linker(CodeGen *g) { |
| 7907 | 7907 | if (g->dynamic_linker_path != nullptr) |
| 7908 | 7908 | return; |
| 7909 | const char *standard_ld_path = target_dynamic_linker(g->zig_target); |
| 7910 | if (standard_ld_path == nullptr) |
| 7911 | return; |
| 7909 | 7912 | |
| 7910 | 7913 | if (g->zig_target->is_native) { |
| 7911 | 7914 | // target_dynamic_linker is usually correct. However on some systems, such as NixOS |
| ... | ... | @@ -7944,8 +7947,7 @@ static void detect_dynamic_linker(CodeGen *g) { |
| 7944 | 7947 | #endif |
| 7945 | 7948 | } |
| 7946 | 7949 | |
| 7947 | | // Otherwise go with the standard linker path. |
| 7948 | | g->dynamic_linker_path = buf_create_from_str(target_dynamic_linker(g->zig_target)); |
| 7950 | g->dynamic_linker_path = buf_create_from_str(standard_ld_path); |
| 7949 | 7951 | } |
| 7950 | 7952 | |
| 7951 | 7953 | static void detect_libc(CodeGen *g) { |
| ... | ... | @@ -9091,7 +9093,7 @@ static Error check_cache(CodeGen *g, Buf *manifest_dir, Buf *digest, bool *c_obj |
| 9091 | 9093 | cache_buf(ch, &g->libc->msvc_lib_dir); |
| 9092 | 9094 | cache_buf(ch, &g->libc->kernel32_lib_dir); |
| 9093 | 9095 | } |
| 9094 | | cache_buf(ch, g->dynamic_linker_path); |
| 9096 | cache_buf_opt(ch, g->dynamic_linker_path); |
| 9095 | 9097 | |
| 9096 | 9098 | *c_objects_generated = gen_c_objects(g); |
| 9097 | 9099 | |