╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ zig_llvm.h ───────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭ find file ─ ─ ─ ─ ─ ─ ─ ─ ─ ─╮ ╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │ │ │http│ ssh │ │ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─╯ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
74 bool sancov; 75 ZigLLVMThinOrFullLTOPhase lto; 76 bool allow_fast_isel; 77 bool allow_machine_outliner; 78 const char *asm_filename; 79 const char *bin_filename; 80 const char *llvm_ir_filename; 81 const char *bitcode_filename; 82 ZigLLVMCoverageOptions coverage; 83 }; 84 85 // synchronize with llvm/include/Object/Archive.h::Object::Archive::Kind 86 // synchronize with codegen/llvm/bindings.zig::ArchiveKind 87 enum ZigLLVMArchiveKind { 88 ZigLLVMArchiveKind_GNU, 89 ZigLLVMArchiveKind_GNU64, 90 ZigLLVMArchiveKind_BSD, 91 ZigLLVMArchiveKind_DARWIN, 92 ZigLLVMArchiveKind_DARWIN64, 93 ZigLLVMArchiveKind_COFF, 94 ZigLLVMArchiveKind_AIXBIG, 95 }; 96 97 // synchronize with llvm/include/Target/TargetOptions.h::FloatABI::ABIType 98 // synchronize with codegen/llvm/bindings.zig::TargetMachine::FloatABI 99 enum ZigLLVMFloatABI { 100 ZigLLVMFloatABI_Default, // Target-specific (either soft or hard depending on triple, etc). 101 ZigLLVMFloatABI_Soft, // Soft float. 102 ZigLLVMFloatABI_Hard // Hard float. 103 }; 104 105 ZIG_EXTERN_C bool ZigLLVMTargetMachineEmitToFile(LLVMTargetMachineRef targ_machine_ref, LLVMModuleRef module_ref, 106 char **error_message, const ZigLLVMEmitOptions *options); 107 108 ZIG_EXTERN_C LLVMTargetMachineRef ZigLLVMCreateTargetMachine(LLVMTargetRef T, const char *Triple, 109 const char *CPU, const char *Features, LLVMCodeGenOptLevel Level, LLVMRelocMode Reloc, 110 LLVMCodeModel CodeModel, bool function_sections, bool data_sections, ZigLLVMFloatABI float_abi, 111 const char *abi_name, bool emulated_tls); 112 113 ZIG_EXTERN_C void ZigLLVMSetOptBisectLimit(LLVMContextRef context_ref, int limit); 114 115 ZIG_EXTERN_C void ZigLLVMEnableBrokenDebugInfoCheck(LLVMContextRef context_ref); 116 ZIG_EXTERN_C bool ZigLLVMGetBrokenDebugInfo(LLVMContextRef context_ref); 117 118 ZIG_EXTERN_C void ZigLLVMParseCommandLineOptions(size_t argc, const char *const *argv); 119 120 ZIG_EXTERN_C bool ZigLLDLinkCOFF(int argc, const char **argv, bool can_exit_early, bool disable_output); 121 ZIG_EXTERN_C bool ZigLLDLinkELF(int argc, const char **argv, bool can_exit_early, bool disable_output); 122 ZIG_EXTERN_C bool ZigLLDLinkWasm(int argc, const char **argv, bool can_exit_early, bool disable_output); 123 124 // On error, populates `*err_file_index_out` and `*err_msg_out` and returns `true`. The caller is 125 // responsible for freeing `*err_msg_out` using `free`. 126 // 127 // If an error occurs reading an input file, `*err_file_index_out` is set to the index of that input 128 // file in `file_names`. Otherwise, `*err_file_index_out` is set to `file_name_count`. 129 ZIG_EXTERN_C bool ZigLLVMWriteArchive(const char *archive_name, const char **file_names, size_t file_name_count, 130 ZigLLVMArchiveKind archive_kind, size_t *err_file_index_out, char **err_msg_out); 131 132 #endif 133