Skip to content

Commit

Permalink
Merge pull request #392 from coldav/colin/fix_link_shared_target
Browse files Browse the repository at this point in the history
Use PIC_ reloc model when link_shared is set in cookie target
  • Loading branch information
coldav committed Mar 5, 2024
2 parents a7cd218 + 05db4ab commit a390b0f
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,8 @@ static llvm::TargetMachine *createTargetMachine(const {{cookiecutter.target_name

return llvm_target->createTargetMachine(
target.llvm_triple, target.llvm_cpu, target.llvm_features, options,
llvm::Reloc::Model::Static, llvm::CodeModel::Small,
{{cookiecutter.link_shared}} ? llvm::Reloc::Model::PIC_ : llvm::Reloc::Model::Static,
llvm::CodeModel::Small,
multi_llvm::CodeGenOptLevel::Aggressive);
}

Expand Down

0 comments on commit a390b0f

Please sign in to comment.