diff options
author | Matthias Braun <matze@braunis.de> | 2016-10-03 22:12:37 +0000 |
---|---|---|
committer | Matthias Braun <matze@braunis.de> | 2016-10-03 22:12:37 +0000 |
commit | 9baa3e80a9abcc4ebb72e5a83a3269b36021de78 (patch) | |
tree | ed2dfa7fad13db84e6486aebd5546c6b5b50b2f4 /llvm/lib/Target/TargetMachine.cpp | |
parent | 16fa0d81596e967aef62a0a41f761a769d138c9a (diff) | |
download | bcm5719-llvm-9baa3e80a9abcc4ebb72e5a83a3269b36021de78.tar.gz bcm5719-llvm-9baa3e80a9abcc4ebb72e5a83a3269b36021de78.zip |
TargetMachine: Make the win32-macho workaround more specific.
This is to avoid problems with win32 + ELF which surprisingly happens a
lot in practice: If a user just specifies -march on the commandline the
object format changes along with the architecture to ELF in many
instances while the OS stays with the default/host OS.
llvm-svn: 283151
Diffstat (limited to 'llvm/lib/Target/TargetMachine.cpp')
-rw-r--r-- | llvm/lib/Target/TargetMachine.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/TargetMachine.cpp b/llvm/lib/Target/TargetMachine.cpp index d7b34f84afc..f58535d8767 100644 --- a/llvm/lib/Target/TargetMachine.cpp +++ b/llvm/lib/Target/TargetMachine.cpp @@ -131,7 +131,7 @@ bool TargetMachine::shouldAssumeDSOLocal(const Module &M, // Make an exception for windows OS in the triple: Some firmwares builds use // *-win32-macho triples. This (accidentally?) produced windows relocations // without GOT tables in older clang versions; Keep this behaviour. - if (TT.isOSBinFormatCOFF() || TT.isOSWindows()) + if (TT.isOSBinFormatCOFF() || (TT.isOSWindows() && TT.isOSBinFormatMachO())) return true; if (GV && (GV->hasLocalLinkage() || !GV->hasDefaultVisibility())) |