mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-24 04:09:45 +00:00
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283151 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1596f9b429
commit
3d8b8c8458
@ -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()))
|
||||
|
Loading…
Reference in New Issue
Block a user