mirror of
https://github.com/sched-ext/scx.git
synced 2024-12-05 00:37:11 +00:00
1745daea0f
get_clang_ver fails if clang is built from scratch. Teach get_clang_ver to recognize the clang version even for clang built from git. These are the tests I ran: # /usr/local/bin/clang --version clang version 18.0.0git (https://github.com/llvm/llvm-project.git c458f928fad7bbcf08ab1da9949eb2969fc9f89c) # meson-scripts/get_clang_ver /usr/local/bin/clang 18.0.0 # /usr/bin/clang --version clang version 17.0.6 (CentOS 17.0.6-5.el9) # meson-scripts/get_clang_ver /usr/bin/clang 17.0.6 Signed-off-by: Breno Leitao <leitao@debian.org>
4 lines
88 B
Bash
Executable File
4 lines
88 B
Bash
Executable File
#!/bin/bash
|
|
|
|
"$1" --version | sed -nr 's/^.*clang version ([\.0-9]*)(git)?( .*)?$/\1/p'
|