Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the --run flag #2931

Merged
merged 5 commits into from
Dec 2, 2023
Merged

Remove the --run flag #2931

merged 5 commits into from
Dec 2, 2023

Conversation

Shaikh-Ubaid
Copy link
Member

@certik
Copy link
Contributor

certik commented Nov 30, 2023

I think it is fine, but let me try to test it by hand first, since the modifications are quite extensive in the driver.

Copy link
Member

@Thirumalai-Shaktivel Thirumalai-Shaktivel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have left two comments; otherwise, this looks good. Thank you!

if (0 < err && err < 256) {
return err;
} else {
return 1;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See: lcompilers/lpython#1352 (comment)

Suggested change
return 1;
return LCompilers::get_exit_status(err);

} else {
LCOMPILERS_ASSERT(false);
return 1;
}

if (outfile != file_name + ".out" || compiler_options.arg_o != "") {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is very rare case, but I think this might fail for the case lfortran x.f90 -o x.out, so let's only do?

Suggested change
if (outfile != file_name + ".out" || compiler_options.arg_o != "") {
if ( compiler_options.arg_o != "" ) {

@Shaikh-Ubaid
Copy link
Member Author

Ready.

std::string run_cmd = "";
if (backend == Backend::wasm) {
// for node version less than 16, we need to also provide flag --experimental-wasm-bigint
run_cmd = "node --experimental-wasi-unstable-preview1 " + outfile + ".js";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if we want to support all the wasm runtimes. I usually use wasmtime for example.

Copy link
Contributor

@certik certik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that this is fine enough to merge. If we discover any bugs, we'll fix them.

@certik certik merged commit 584572b into lfortran:main Dec 2, 2023
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants