| ... | ... | @@ -60,6 +60,33 @@ PackageTableEntry *new_anonymous_package(void) { |
| 60 | 60 | return new_package("", ""); |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | static const char *symbols_that_llvm_depends_on[] = { |
| 64 | "memcpy", |
| 65 | "memset", |
| 66 | "sqrt", |
| 67 | "powi", |
| 68 | "sin", |
| 69 | "cos", |
| 70 | "pow", |
| 71 | "exp", |
| 72 | "exp2", |
| 73 | "log", |
| 74 | "log10", |
| 75 | "log2", |
| 76 | "fma", |
| 77 | "fabs", |
| 78 | "minnum", |
| 79 | "maxnum", |
| 80 | "copysign", |
| 81 | "floor", |
| 82 | "ceil", |
| 83 | "trunc", |
| 84 | "rint", |
| 85 | "nearbyint", |
| 86 | "round", |
| 87 | // TODO probably all of compiler-rt needs to go here |
| 88 | }; |
| 89 | |
| 63 | 90 | CodeGen *codegen_create(Buf *root_src_path, const ZigTarget *target, OutType out_type, BuildMode build_mode, |
| 64 | 91 | Buf *zig_lib_dir) |
| 65 | 92 | { |
| ... | ... | @@ -94,6 +121,10 @@ CodeGen *codegen_create(Buf *root_src_path, const ZigTarget *target, OutType out |
| 94 | 121 | g->want_h_file = (out_type == OutTypeObj || out_type == OutTypeLib); |
| 95 | 122 | buf_resize(&g->global_asm, 0); |
| 96 | 123 | |
| 124 | for (size_t i = 0; i < array_length(symbols_that_llvm_depends_on); i += 1) { |
| 125 | g->external_prototypes.put(buf_create_from_str(symbols_that_llvm_depends_on[i]), nullptr); |
| 126 | } |
| 127 | |
| 97 | 128 | if (root_src_path) { |
| 98 | 129 | Buf *src_basename = buf_alloc(); |
| 99 | 130 | Buf *src_dir = buf_alloc(); |