Skip to content
This repository has been archived by the owner on Feb 5, 2019. It is now read-only.

Commit

Permalink
Disable indirect symbols via GOT pcrel on Mach-O 64-bit
Browse files Browse the repository at this point in the history
This commit currently causes LLVM to segfault when compiling Rust code on 64-bit
OSX platforms, reported as this LLVM bug:

    https://llvm.org/bugs/show_bug.cgi?id=23779

A bisection turned up r230264 as the offending commit, the review of which is at
http://reviews.llvm.org/D6922. To the best of my knowledge this looks like it's
an optimization for OSX which is fine to omit, so this commit just flips the
flag to *not* perform this optimization, allowing Rust to bootstrap and pass all
tests on OSX 64-bit.
  • Loading branch information
alexcrichton committed Jun 12, 2015
1 parent 0023fb9 commit 993e1fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/CodeGen/TargetLoweringObjectFileImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ TargetLoweringObjectFileELF::InitializeELF(bool UseInitArray_) {

TargetLoweringObjectFileMachO::TargetLoweringObjectFileMachO()
: TargetLoweringObjectFile() {
SupportIndirectSymViaGOTPCRel = true;
SupportIndirectSymViaGOTPCRel = false;

This comment has been minimized.

Copy link
@brson

brson Jun 12, 2015

Please add insightful comment for future helpless hackers.

}

/// getDepLibFromLinkerOpt - Extract the dependent library name from a linker
Expand Down

0 comments on commit 993e1fe

Please sign in to comment.