parent
1c28631738
commit
aa78827db2
|
@ -189,6 +189,10 @@ make install
|
|||
./zig build --build-file ../build.zig test
|
||||
```
|
||||
|
||||
#### Windows
|
||||
|
||||
See https://github.com/zig-lang/zig/wiki/Building-Zig-on-Windows
|
||||
|
||||
### Release / Install Build
|
||||
|
||||
Once installed, `ZIG_LIBC_LIB_DIR` and `ZIG_LIBC_INCLUDE_DIR` can be overridden
|
||||
|
|
|
@ -4992,7 +4992,11 @@ static void init(CodeGen *g) {
|
|||
|
||||
LLVMSetTarget(g->module, buf_ptr(&g->triple_str));
|
||||
|
||||
ZigLLVMAddModuleDebugInfoFlag(g->module);
|
||||
if (g->zig_target.oformat == ZigLLVM_COFF) {
|
||||
ZigLLVMAddModuleCodeViewFlag(g->module);
|
||||
} else {
|
||||
ZigLLVMAddModuleDebugInfoFlag(g->module);
|
||||
}
|
||||
|
||||
LLVMTargetRef target_ref;
|
||||
char *err_msg = nullptr;
|
||||
|
|
|
@ -706,6 +706,10 @@ void ZigLLVMAddModuleDebugInfoFlag(LLVMModuleRef module) {
|
|||
unwrap(module)->addModuleFlag(Module::Warning, "Debug Info Version", DEBUG_METADATA_VERSION);
|
||||
}
|
||||
|
||||
void ZigLLVMAddModuleCodeViewFlag(LLVMModuleRef module) {
|
||||
unwrap(module)->addModuleFlag(Module::Warning, "CodeView", 1);
|
||||
}
|
||||
|
||||
static AtomicOrdering mapFromLLVMOrdering(LLVMAtomicOrdering Ordering) {
|
||||
switch (Ordering) {
|
||||
case LLVMAtomicOrderingNotAtomic: return AtomicOrdering::NotAtomic;
|
||||
|
|
|
@ -112,6 +112,7 @@ unsigned ZigLLVMTag_DW_structure_type(void);
|
|||
|
||||
ZigLLVMDIBuilder *ZigLLVMCreateDIBuilder(LLVMModuleRef module, bool allow_unresolved);
|
||||
void ZigLLVMAddModuleDebugInfoFlag(LLVMModuleRef module);
|
||||
void ZigLLVMAddModuleCodeViewFlag(LLVMModuleRef module);
|
||||
|
||||
void ZigLLVMSetCurrentDebugLocation(LLVMBuilderRef builder, int line, int column, ZigLLVMDIScope *scope);
|
||||
void ZigLLVMClearCurrentDebugLocation(LLVMBuilderRef builder);
|
||||
|
|
Loading…
Reference in New Issue