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

Correctly propagate llvm-config errors #46

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

DaniPopes
Copy link

Currently, due to the extra sh/cmd indirection, if the llvm-config fails in the middle of the build script (say in --libnames), it will emit an empty rustc-link-lib name because the error is not propagated. The error is also not shown, and cargo will fail with a mysterious "library name must not be empty".

Remove this extra indirection and improve the error messages by showing the full context if this happens.

Fixes #45

Currently, due to the extra `sh`/`cmd` indirection, if the `llvm-config` fails
in the middle of the build script (say in `--libnames`), it will emit an empty
`rustc-link-lib` name because the error is not propagated. The error is also not
shown, and cargo will fail with a mysterious "library name must not be empty".

Remove this extra indirection and improve the error messages by showing the full
context if this happens.

Fixes mlir-rs#45
@raviqqe
Copy link
Member

raviqqe commented Sep 24, 2024

@femtomc Do you recall why we had the indirection in the first place?

@femtomc
Copy link
Collaborator

femtomc commented Sep 24, 2024

I don't remember -- but I don't think it was for any particularly good reason. I'm in classes right now, but will re-visit when I get out today.

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.

build fails with mlir 18.1.6
3 participants