Skip to content

Commit

Permalink
Use ELFv2 ABI on powerpc64 musl (LLVM half)
Browse files Browse the repository at this point in the history
  • Loading branch information
smaeul committed Sep 28, 2018
1 parent 106a31d commit e8eaa2a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/rustllvm/PassWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,12 @@ extern "C" LLVMTargetMachineRef LLVMRustCreateTargetMachine(
Options.ThreadModel = ThreadModel::Single;
}

// See https://reviews.llvm.org/D52013
if (Trip.getArch() == llvm::Triple::ArchType::ppc64 &&
Trip.getEnvironment() == llvm::Triple::EnvironmentType::Musl) {
Options.MCOptions.ABIName = "elfv2";
}

#if LLVM_VERSION_GE(6, 0)
Optional<CodeModel::Model> CM;
#else
Expand Down

0 comments on commit e8eaa2a

Please sign in to comment.