Commit 13e5968e authored by Laszlo Agocs's avatar Laszlo Agocs
Browse files

Change xcrun metal invocation to be compatible with XCode 10

sigh! Add some helpful notes about this mess.
parent 2ec06299
......@@ -376,6 +376,7 @@ int main(int argc, char **argv)
typeArg.constData(),
tempOutFileName.constData(),
inFileName.constData());
qDebug("%s", qPrintable(cmd));
QByteArray output;
QByteArray errorOutput;
bool success = runProcess(cmd, &output, &errorOutput);
......@@ -428,9 +429,13 @@ int main(int argc, char **argv)
const QByteArray inFileName = QDir::toNativeSeparators(tmpIn).toUtf8();
const QByteArray tempIntermediateFileName = QDir::toNativeSeparators(tmpInterm).toUtf8();
QString cmd = QString::asprintf("xcrun -sdk macosx metal %s -o %s",
qDebug("About to invoke xcrun with metal and metallib.\n"
" qsb is set up for XCode 10. For earlier versions the -c argument may need to be removed.\n"
" If getting unable to find utility \"metal\", do xcode-select --switch /Applications/Xcode.app/Contents/Developer");
QString cmd = QString::asprintf("xcrun -sdk macosx metal -c %s -o %s",
inFileName.constData(),
tempIntermediateFileName.constData());
qDebug("%s", qPrintable(cmd));
QByteArray output;
QByteArray errorOutput;
bool success = runProcess(cmd, &output, &errorOutput);
......@@ -447,6 +452,7 @@ int main(int argc, char **argv)
cmd = QString::asprintf("xcrun -sdk macosx metallib %s -o %s",
tempIntermediateFileName.constData(),
tempOutFileName.constData());
qDebug("%s", qPrintable(cmd));
output.clear();
errorOutput.clear();
success = runProcess(cmd, &output, &errorOutput);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment