-
Notifications
You must be signed in to change notification settings - Fork 399
bail out in CMake when minimum required LLVM version is not satisfied #1741
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
base: master
Are you sure you want to change the base?
Conversation
Informational: IWYU dogfood resultsinclude-what-you-use (exit: 1)
fix_includes.py (exit: 0)
diff --git a/iwyu_include_picker.cc b/iwyu_include_picker.cc
index a7faf4e..3a14472 100644
--- a/iwyu_include_picker.cc
+++ b/iwyu_include_picker.cc
@@ -9,6 +9,7 @@
#include "iwyu_include_picker.h"
+#include <pstl/glue_algorithm_defs.h>
#include <algorithm> // for find
#include <cstddef> // for size_t
// not hash_map: it's not as portable and needs hash<string>. |
I'm personally not a fan of this, for small-minded reasons, because it creates another point that I need to remember to update around each release. I feel like it's also creating some artificial constraints -- there's nothing that says IWYU at revision X cannot work with Clangs from a wide range of versions. It usually doesn't, but you can easily test by explicitly specifying which LLVM you want to test with, e.g.
I kind-of like that there's room for experiments there, but I see that it's a bit inconvenient that the default is always broken. As I asked on the associated issue -- what do you hope to accomplish by not specifying the LLVM root as |
Sorry, if I did not address everything or was a bit rambly, but I am a bit absent-minded right now.
The specified version should also be the minimum required version. So if you specify 21, it should also allow 22. So you only need to bump it when you have an API breakage you cannot workaround. But ... IIRC the handling of the compatible version but be package-dependent. So that needs to be tested.
The current trunk only compiles with LLVM 21. This would also provide proper feedback to users which still try to use an older version.
If you want to support that you would need to run that matrix in the CI to make sure that these are all working as expected. And do you really want to address issues with outdated LLVM versions? I think LLVM itself only supports two versions at most (it is documented in the terms of libc++). |
I want to do as little as humanly possible, but I want to leave the code base open to experiments. |
refs #1740