Commit Graph

5 Commits

Author SHA1 Message Date
Peter Jung
0faa0efe74
get_clang_ver: Fix regex for LLVM RC Versions
Signed-off-by: Peter Jung <admin@ptr1337.dev>
2024-08-25 00:49:00 +02:00
Violet Purcell
2341b67971
Support LLVM_VERSION_SUFFIX in clang version parsing regex
If LLVM is compiled with the LLVM_VERSION_SUFFIX cmake option, then the
version may have an additional suffix, for example "18.1.7+libcxx".
Gentoo for example uses this to fend off ABI issues between libstdc++
and libc++.

Signed-off-by: Violet Purcell <vimproved@inventati.org>
2024-06-12 11:58:27 -04:00
Breno Leitao
1745daea0f meson: support clang built from git
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>
2024-03-14 03:39:09 -07:00
Andrea Righi
00cd15a3ae build: properly detect clang version in Ubuntu
Some distro may add their own prefix to the version string of clang, for
example in Ubuntu:

 $ clang --version
 Ubuntu clang version 17.0.5 (1ubuntu1)
 ...

That triggers the following meson error during the setup phase:

 meson.build:25:44: ERROR: String '' cannot be converted to int

Change the regexp used to evaluate the clang version to avoid this
build failure.

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2023-12-07 19:24:12 +01:00
Tejun Heo
6ec509b3b6 build, scx_utils: Misc improvements
- build: Check clang version like scx_utils does.

- scx_utils: Generate rerun-if-env-changed directives.
2023-12-01 10:20:06 -10:00