-O# with no file fails

This commit is contained in:
George Lu
2018-06-01 18:02:56 -07:00
parent e355f0a580
commit 5e586aa025
+6 -1
View File
@@ -889,6 +889,7 @@ int optimizeForSize(const char* inFileName, U32 targetSpeed)
/* end summary */ /* end summary */
BMK_printWinner(stdout, 99, winner.result, winner.params, benchedSize); BMK_printWinner(stdout, 99, winner.result, winner.params, benchedSize);
BMK_translateAdvancedParams(winner.params);
DISPLAY("grillParams size - optimizer completed \n"); DISPLAY("grillParams size - optimizer completed \n");
/* clean up*/ /* clean up*/
@@ -1005,7 +1006,6 @@ int main(int argc, const char** argv)
DISPLAY("invalid --zstd= format\n"); DISPLAY("invalid --zstd= format\n");
return 1; /* check the end of string */ return 1; /* check the end of string */
} }
break;
//if not return, success //if not return, success
} else if (argument[0]=='-') { } else if (argument[0]=='-') {
argument++; argument++;
@@ -1114,7 +1114,12 @@ int main(int argc, const char** argv)
} }
if (filenamesStart==0) { if (filenamesStart==0) {
if (optimizer) {
DISPLAY("Optimizer Expects File")
return 1;
} else {
result = benchSample(); result = benchSample();
}
} else { } else {
if (optimizer) { if (optimizer) {
result = optimizeForSize(input_filename, targetSpeed); result = optimizeForSize(input_filename, targetSpeed);