codechecker icon indicating copy to clipboard operation
codechecker copied to clipboard

minimum Clang version requirements of ctu

Open Logyiyi opened this issue 2 years ago • 4 comments

If I want to use the ctu mode, what is the minimum version requirements of Clang?

Logyiyi avatar Apr 27 '22 02:04 Logyiyi

Uh... Well, recent versions of Clang most certainly support CTU. At least as old as 10.0 definitely does.

If you're self-compiling, you need to also have the clang-extdef-mapping tool installed. It's supplied together with Clang in the repository, but is its own build target.

whisperity avatar Apr 27 '22 07:04 whisperity

Uh... Well, recent versions of Clang most certainly support CTU. At least as old as 10.0 definitely does.

If you're self-compiling, you need to also have the clang-extdef-mapping tool installed. It's supplied together with Clang in the repository, but is its own build target.

May I ask that if 4.0.0 support CTU?

Logyiyi avatar Apr 27 '22 08:04 Logyiyi

4.0.0

Release date: 2017. March 13.

Unlikely.


The earliest mentions of the necessary libraries within Clang, libClangCrossTU and clang-func-mapping (later renamed to clang-extdef-mapping!) are in the 6.0 branch.

The rename to clang-extdef-mapping happened in 8.0. I am not sure whether calling the old binary (and its potentially dated output format) is supported by CodeChecker at this point, so you should definitely use at least 8.0.

whisperity avatar Apr 27 '22 09:04 whisperity

I would highly recommend using the latest released clang. We frequently fix crashes and bugs, especially related to CTU. In the past, the situation was much worse than it is today. Nowadays one can still expect some crashes though, especially for 'new' c++ constructs.

steakhal avatar Apr 28 '22 13:04 steakhal