So I'm using NSTask to run an assembler on a bitcode file using the following code:
NSTask *task = [[NSTask alloc] init];
task.launchPath = @"/usr/local/bin/llc";
task.arguments = @[bitcodePath, @"-o", asmPath];
[task launch];
[task waitUntilExit];
However the task doesn't seem to successfully complete, it only prints out a stub of the assembly it should generate. However if I comment out [task waitUntilExit]
, it appears to complete successfully, generating the full assembly file. However this doesn't help as I need to perform some cleanup AFTER the task finishes. Any idea why [task waitUntilExit]
(or any code after [task launch]
for that matter) would be causing issues?