mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-11 18:33:14 +01:00
Workaround for --help output being truncated when redirecting to file.
This commit is contained in:
@@ -96,6 +96,11 @@ void printVersion() {
|
||||
if (CPU == "generic") CPU = "(unknown)";
|
||||
printf(" Host CPU: %s\n", CPU.c_str());
|
||||
printf("\n");
|
||||
|
||||
// Without explicitly flushing here, only the target list is visible when
|
||||
// redirecting stdout to a file.
|
||||
fflush(stdout);
|
||||
|
||||
llvm::TargetRegistry::printRegisteredTargetsForVersion();
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user