Skip to content

Commit

Permalink
codegen: set ModFlag for Debug Info Version to Warning (JuliaLang#4…
Browse files Browse the repository at this point in the history
…0653)

This allows linking the resulting code against another bitcode library (such as libopencilk-abi.bc) that was built with a different version of llvm debug info.
  • Loading branch information
vchuravy authored and antoine-levitt committed May 9, 2021
1 parent 7a0e3f8 commit 890c952
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/codegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1689,7 +1689,7 @@ static void jl_setup_module(Module *m, const jl_cgparams_t *params = &jl_default
m->addModuleFlag(llvm::Module::Warning, "Dwarf Version", dwarf_version);
}
if (!m->getModuleFlag("Debug Info Version"))
m->addModuleFlag(llvm::Module::Error, "Debug Info Version",
m->addModuleFlag(llvm::Module::Warning, "Debug Info Version",
llvm::DEBUG_METADATA_VERSION);
m->setDataLayout(jl_data_layout);
m->setTargetTriple(jl_TargetMachine->getTargetTriple().str());
Expand Down

0 comments on commit 890c952

Please sign in to comment.