projects
/
ldk-c-bindings
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a7ad891
)
Properly parse Fedora's clang version string
author
Matt Corallo
<git@bluematt.me>
Thu, 16 Nov 2023 02:34:43 +0000
(
02:34
+0000)
committer
Matt Corallo
<git@bluematt.me>
Thu, 16 Nov 2023 05:22:49 +0000
(
05:22
+0000)
genbindings.sh
patch
|
blob
|
history
diff --git
a/genbindings.sh
b/genbindings.sh
index dcfc5ac9a3199593c0cb0b33bd399a276b4f59ad..4c15d307f6ba82818a4a9858c11d996f9652e4c1 100755
(executable)
--- a/
genbindings.sh
+++ b/
genbindings.sh
@@
-429,7
+429,9
@@
if [ "$HOST_OSX" = "true" ]; then
fi
fi
else
fi
fi
else
- CLANG_LLVM_V=$(clang --version | head -n1 | awk '{ print substr($4, 0, 2); }')
+ # Output is something like clang version 17.0.3 (Fedora 17.0.3-1.fc39) or Debian clang version 14.0.6
+ CLANG_LLVM_V=$(clang --version | head -n1 | awk '{ print substr($3, 0, 2); }')
+ [ "$CLANG_LLVM_V" = "ve" ] && CLANG_LLVM_V=$(clang --version | head -n1 | awk '{ print substr($4, 0, 2); }')
if [ -x "$(which ld.lld)" ]; then
LLD_LLVM_V="$(ld.lld --version | awk '{ print $2; }')"
if [ "$LLD_LLVM_V" = "LLD" ]; then # eg if the output is "Debian LLD ..."
if [ -x "$(which ld.lld)" ]; then
LLD_LLVM_V="$(ld.lld --version | awk '{ print $2; }')"
if [ "$LLD_LLVM_V" = "LLD" ]; then # eg if the output is "Debian LLD ..."