File tree 3 files changed +3
-1
lines changed
3 files changed +3
-1
lines changed Original file line number Diff line number Diff line change 45
45
46
46
have_fma (@nospecialize (target:: AbstractCompilerTarget ), T:: Type ) = false
47
47
48
+ dwarf_version (target:: AbstractCompilerTarget ) = Int32 (4 ) # It seems every target supports v4 bar cuda
48
49
49
50
# # params
50
51
Original file line number Diff line number Diff line change @@ -608,7 +608,7 @@ function compile_method_instance(@nospecialize(job::CompilerJob))
608
608
datalayout! (mod, julia_datalayout (job. config. target))
609
609
end
610
610
flags (mod)[" Dwarf Version" , LLVM. API. LLVMModuleFlagBehaviorWarning] =
611
- Metadata (ConstantInt (Int32 ( 4 )))
611
+ Metadata (ConstantInt (dwarf_version (job . config . target )))
612
612
flags (mod)[" Debug Info Version" , LLVM. API. LLVMModuleFlagBehaviorWarning] =
613
613
Metadata (ConstantInt (DEBUG_METADATA_VERSION ()))
614
614
end
Original file line number Diff line number Diff line change @@ -70,6 +70,7 @@ llvm_datalayout(target::PTXCompilerTarget) =
70
70
71
71
have_fma (@nospecialize (target:: PTXCompilerTarget ), T:: Type ) = true
72
72
73
+ dwarf_version (target:: PTXCompilerTarget ) = Int32 (2 ) # Cuda only supports dwarfv2
73
74
74
75
# # job
75
76
You can’t perform that action at this time.
0 commit comments