summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/X86TargetMachine.cpp
diff options
context:
space:
mode:
authorMitch Phillips <31459023+hctim@users.noreply.github.com>2019-12-17 07:31:31 -0800
committerMitch Phillips <31459023+hctim@users.noreply.github.com>2019-12-17 07:36:59 -0800
commit2423774cc2a040d34d32aacaf261805cb195ebd2 (patch)
tree591f108d8f676b9d5c8bb3e10fd6c6767834429c /llvm/lib/Target/X86/X86TargetMachine.cpp
parent9ab15f303efdfc841f475918535ab4e13960491b (diff)
downloadbcm5719-llvm-2423774cc2a040d34d32aacaf261805cb195ebd2.tar.gz
bcm5719-llvm-2423774cc2a040d34d32aacaf261805cb195ebd2.zip
Revert "Honor -fuse-init-array when os is not specified on x86"
This reverts commit aa5ee8f244441a8ea103a7e0ed8b6f3e74454516. This change broke the sanitizer buildbots. See comments at the patchset (https://reviews.llvm.org/D71360) for more information.
Diffstat (limited to 'llvm/lib/Target/X86/X86TargetMachine.cpp')
-rw-r--r--llvm/lib/Target/X86/X86TargetMachine.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/llvm/lib/Target/X86/X86TargetMachine.cpp b/llvm/lib/Target/X86/X86TargetMachine.cpp
index 20ce87941c0..21f1ef9cb06 100644
--- a/llvm/lib/Target/X86/X86TargetMachine.cpp
+++ b/llvm/lib/Target/X86/X86TargetMachine.cpp
@@ -92,9 +92,19 @@ static std::unique_ptr<TargetLoweringObjectFile> createTLOF(const Triple &TT) {
return std::make_unique<TargetLoweringObjectFileMachO>();
}
+ if (TT.isOSFreeBSD())
+ return std::make_unique<X86FreeBSDTargetObjectFile>();
+ if (TT.isOSLinux() || TT.isOSNaCl() || TT.isOSIAMCU())
+ return std::make_unique<X86LinuxNaClTargetObjectFile>();
+ if (TT.isOSSolaris())
+ return std::make_unique<X86SolarisTargetObjectFile>();
+ if (TT.isOSFuchsia())
+ return std::make_unique<X86FuchsiaTargetObjectFile>();
+ if (TT.isOSBinFormatELF())
+ return std::make_unique<X86ELFTargetObjectFile>();
if (TT.isOSBinFormatCOFF())
return std::make_unique<TargetLoweringObjectFileCOFF>();
- return std::make_unique<X86ELFTargetObjectFile>();
+ llvm_unreachable("unknown subtarget type");
}
static std::string computeDataLayout(const Triple &TT) {
OpenPOWER on IntegriCloud