forked from qt-creator/qt-creator
Define __strong and __weak to be empty macros, so we "handle" Apple's GC C extension.
This commit is contained in:
@@ -176,11 +176,16 @@ QByteArray GccToolChain::predefinedMacros()
|
|||||||
m_predefinedMacros = cpp.readAllStandardOutput();
|
m_predefinedMacros = cpp.readAllStandardOutput();
|
||||||
|
|
||||||
#ifdef Q_OS_MAC
|
#ifdef Q_OS_MAC
|
||||||
|
// Turn off flag indicating Apple's blocks support
|
||||||
int idx = m_predefinedMacros.indexOf("#define __BLOCKS__ 1");
|
int idx = m_predefinedMacros.indexOf("#define __BLOCKS__ 1");
|
||||||
if (idx != -1) {
|
if (idx != -1) {
|
||||||
idx = m_predefinedMacros.indexOf("1", idx);
|
idx = m_predefinedMacros.indexOf("1", idx);
|
||||||
m_predefinedMacros[idx] = '0';
|
m_predefinedMacros[idx] = '0';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Define __strong and __weak (used for Apple's GC extension of C) to be empty
|
||||||
|
m_predefinedMacros.append("#define __strong");
|
||||||
|
m_predefinedMacros.append("#define __weak");
|
||||||
#endif // Q_OS_MAC
|
#endif // Q_OS_MAC
|
||||||
}
|
}
|
||||||
return m_predefinedMacros;
|
return m_predefinedMacros;
|
||||||
|
|||||||
Reference in New Issue
Block a user