File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -927,8 +927,8 @@ int link_executable(const std::vector<std::string> &infiles,
927
927
std::cout << " The command '" + cmd + " ' failed." << std::endl;
928
928
return 10 ;
929
929
}
930
- if (outfile == " a.out " && compiler_options.arg_o == " " ) {
931
- err = system (" a.out " );
930
+ if (compiler_options.arg_o == " " ) {
931
+ err = system (outfile. c_str () );
932
932
if (err != 0 ) {
933
933
if (0 < err && err < 256 ) {
934
934
return err;
@@ -962,8 +962,8 @@ int link_executable(const std::vector<std::string> &infiles,
962
962
std::cout << " The command '" + cmd + " ' failed." << std::endl;
963
963
return 10 ;
964
964
}
965
- if (outfile == " a.out " && compiler_options.arg_o == " " ) {
966
- err = system (" ./a.out " );
965
+ if (compiler_options.arg_o == " " ) {
966
+ err = system (( " ./" + outfile). c_str () );
967
967
if (err != 0 ) {
968
968
if (0 < err && err < 256 ) {
969
969
return err;
@@ -1441,7 +1441,7 @@ int main(int argc, char *argv[])
1441
1441
} else if (show_wat) {
1442
1442
outfile = basename + " .wat" ;
1443
1443
} else {
1444
- outfile = " a .out" ;
1444
+ outfile = basename + " .out" ;
1445
1445
}
1446
1446
1447
1447
// if (arg_E) {
You can’t perform that action at this time.
0 commit comments