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

[Makefile] Check for LLVM_CONFIG only when LLVM is used #11519

Merged
merged 5 commits into from Dec 4, 2021

Conversation

straight-shoota
Copy link
Member

This is a re-issue of #11509 with an improved implementation of #11454 that does not use prerequisites. It adds a custom function call to every recipe that requires LLVM to be available. That function only runs once for the entire Makefile execution, so you won't get multiple Using llvm-config prints.

Additionally fixes some use cases around colorized output. This should now work with every shell and output only gets colorized if the terminal supports that (tput makes sure of that).

@j8r
Copy link
Contributor

j8r commented Dec 1, 2021

What was wrong with shell escapes? I spawned an alpine container, and tput is not pre-installed.

@straight-shoota
Copy link
Member Author

It looks ugly when your terminal doesn't support escape codes.

tput not being available by default is a bummer. I was happy to have a simple solution. But I can work around it and check for TERM explicitly. I had done this in an experiment already, but tput is easier.
I suppose we could alternatively ignore missing tput. Then you only get color when it's available 🤷

Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Co-authored-by: Sijawusz Pur Rahnama <sija@sija.pl>
Makefile Outdated Show resolved Hide resolved
Copy link
Member

@beta-ziliani beta-ziliani left a comment

Choose a reason for hiding this comment

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

LGTM

@straight-shoota straight-shoota added this to the 1.3.0 milestone Dec 2, 2021
@straight-shoota straight-shoota merged commit 5df9f26 into master Dec 4, 2021
@straight-shoota straight-shoota deleted the ci/feature/make-llvm_config-check branch December 4, 2021 14:13
@straight-shoota straight-shoota changed the title [Makefile] Check for LLVM_CONFIG only when LLVM is used [Makefile] Check for LLVM_CONFIG only when LLVM is used Jan 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants