| ... | ... | @@ -99,7 +99,39 @@ pub const Options = struct { |
| 99 | 99 | rdynamic: ?bool = null, |
| 100 | 100 | }; |
| 101 | 101 | |
| 102 | | pub fn resolve(options: Options) !Config { |
| 102 | pub const ResolveError = error{ |
| 103 | WasiExecModelRequiresWasi, |
| 104 | SharedMemoryIsWasmOnly, |
| 105 | ObjectFilesCannotShareMemory, |
| 106 | SharedMemoryRequiresAtomicsAndBulkMemory, |
| 107 | ThreadsRequireSharedMemory, |
| 108 | UnknownTargetEntryPoint, |
| 109 | NonExecutableEntryPoint, |
| 110 | EmittingLlvmModuleRequiresLlvmBackend, |
| 111 | LlvmLacksTargetSupport, |
| 112 | ZigLacksTargetSupport, |
| 113 | EmittingBinaryRequiresLlvmLibrary, |
| 114 | LldIncompatibleObjectFormat, |
| 115 | LtoRequiresLld, |
| 116 | SanitizeThreadRequiresLibCpp, |
| 117 | LibCppRequiresLibUnwind, |
| 118 | OsRequiresLibC, |
| 119 | LibCppRequiresLibC, |
| 120 | LibUnwindRequiresLibC, |
| 121 | TargetCannotDynamicLink, |
| 122 | LibCRequiresDynamicLinking, |
| 123 | SharedLibrariesRequireDynamicLinking, |
| 124 | ExportMemoryAndDynamicIncompatible, |
| 125 | DynamicLibraryPrecludesPie, |
| 126 | TargetRequiresPie, |
| 127 | SanitizeThreadRequiresPie, |
| 128 | BackendLacksErrorTracing, |
| 129 | LlvmLibraryUnavailable, |
| 130 | LldUnavailable, |
| 131 | ClangUnavailable, |
| 132 | }; |
| 133 | |
| 134 | pub fn resolve(options: Options) ResolveError!Config { |
| 103 | 135 | const target = options.resolved_target.result; |
| 104 | 136 | |
| 105 | 137 | // WASI-only. Resolve the optional exec-model option, defaults to command. |