Skip to content

Commit

Permalink
codegen: set ModFlag for Debug Info Version to Warning (#40653)
Browse files Browse the repository at this point in the history
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.

(cherry picked from commit 0f2ad74)
  • Loading branch information
vchuravy authored and KristofferC committed May 11, 2021
1 parent f0cc40a commit 70bfa4d
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 @@ -1681,7 +1681,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 70bfa4d

Please sign in to comment.