-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libbpf-cargo: Remove clang version check logic
Remove the logic for checking the clang version in use. This logic is worrisome and insufficient for a couple of reasons. It is insufficient, because we don't actually know what clang version we require -- that is a moving target. Nobody is actively testing against the lowest supported clang version to make sure that our stuff actually works with it. At this point, the stated minimum of 10.0.0 is also increasingly unlikely to be found in the wild, rendering the check less and less useful with every passing year. Ultimately, if a necessary feature really is not available, one would hope that the emitted error isn't too cryptic for anybody to make sense of it. On the "worrisome" front, the over reliance on anything and everything clang (not just with this check, but with naming more generally) boxes us into a single-compiler world. It is entirely conceivable that a GCC BPF backend arrives eventually (has it already?), which, if past is any guidance, shoulder understand roughly the same arguments as clang itself and, hence, potentially being a drop-in replacement. We should be ready to support this future without shenanigans such as "gcc" being passed to an API asking for "clang". Furthermore, parsing the compiler's output using regular expressions is at best a fragile endeavor. What's more, the amount of dependencies (direct + transitive) pulled in just in service of this one feature is penalizing everybody, for no obvious value-add. Lastly, the plumping necessary for this feature is part of the reason we have nonsensical call sites such as the following to deal with: make( true, Some(&cargo_toml), None, Vec::new(), true, true, Vec::new(), None, ) In short, removal of this checking logic is our best option. Take it. Signed-off-by: Daniel Müller <deso@posteo.net>
- Loading branch information
Showing
8 changed files
with
24 additions
and
164 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.