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

Build-script command statuses are not checked #1684

Open
smoelius opened this issue Dec 19, 2024 · 0 comments
Open

Build-script command statuses are not checked #1684

smoelius opened this issue Dec 19, 2024 · 0 comments

Comments

@smoelius
Copy link
Contributor

The build scripts use Command::output to run make and llvm-config:

solang/build.rs

Lines 8 to 17 in 32a45ea

Command::new("make")
.args(["-C", "stdlib"])
.output()
.expect("Could not build stdlib");
// compile our linker
let cxxflags = Command::new("llvm-config")
.args(["--cxxflags"])
.output()
.expect("could not execute llvm-config");

However, the status fields of the returned Output structs are not checked. So if either command completes with a non-zero exit code, it will go unnoticed.

Moreover, Command::output has the unfortunate side effect of capturing the output, i.e., stdout and stderr are not forwarded to the terminal. So if an error occurs, it could be hidden.

Would you consider a PR to check the commands' statuses?

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

No branches or pull requests

1 participant