| ... | @@ -2048,7 +2048,14 @@ pub fn create(gpa: Allocator, arena: Allocator, diag: *CreateDiagnostic, options | ... | @@ -2048,7 +2048,14 @@ pub fn create(gpa: Allocator, arena: Allocator, diag: *CreateDiagnostic, options |
| 2048 | break :s .none; // only LLD can handle ubsan-rt for this target | 2048 | break :s .none; // only LLD can handle ubsan-rt for this target |
| 2049 | } else true, | 2049 | } else true, |
| 2050 | }; | 2050 | }; |
| 2051 | if (have_zcu and (!need_llvm or use_llvm)) break :s .zcu; | 2051 | if (have_zcu and (!need_llvm or use_llvm)) { |
| | 2052 | // ubsan-rt's exports use hidden visibility. If we're building a Windows DLL and |
| | 2053 | // exported functions are going to be dllexported, LLVM will complain that |
| | 2054 | // dllexported functions must use default or protected visibility. So we can't use |
| | 2055 | // the ZCU strategy in this case. |
| | 2056 | if (options.config.dll_export_fns) break :s .lib; |
| | 2057 | break :s .zcu; |
| | 2058 | } |
| 2052 | if (need_llvm and !build_options.have_llvm) break :s .none; // impossible to build without llvm | 2059 | if (need_llvm and !build_options.have_llvm) break :s .none; // impossible to build without llvm |
| 2053 | if (is_exe_or_dyn_lib) break :s .lib; | 2060 | if (is_exe_or_dyn_lib) break :s .lib; |
| 2054 | break :s .obj; | 2061 | break :s .obj; |