Opened 5 years ago
Closed 5 years ago
#60027 closed defect (fixed)
clang-9.0: static analyzer variant can't be disabled. Error: Cannot disable static analyzer while enabling ARCMT or Z3
Reported by: | kencu (Ken) | Owned by: | kencu (Ken) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | jeremyhu (Jeremy Huddleston Sequoia) | |
Port: | clang-9.0 |
Description
We haven't built clang without the static analyzer in a long time, it appears. On clang-9.0, it can't be disabled due to the above error.
It can be disabled on clang-3.7. Somewhere along the line the cmake build system made it so that it can't be disabled, and yet there is an option still to disable it.
Likely have to enable and disable the relevant options as a group (which I suppose suggests an upstream bug to fix, as if you turn off the analyzer, you shouldn't error out if you don't turn off ARCMT as well).
I am not sure at present how far back this "error" goes -- possibly all the way back to the start of the cmake build system that we defaulted to in clang-3.8, but will have to check. In the standard cmake build of clang, both the analyzer and ARCMT default to ON, so perhaps nobody has built clang with the analyzer OFF in a long time...
Change History (3)
comment:1 Changed 5 years ago by kencu (Ken)
Owner: | set to kencu |
---|---|
Status: | new → assigned |
comment:2 Changed 5 years ago by kencu (Ken)
comment:3 Changed 5 years ago by kencu (Ken)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Oh, here's a pretty good clue. Jeremy had already turned off
CLANG_ENABLE_ARCMT
during the lldb build all the way back tollvm-5.0
so that is where it starts:Just need to add the same to the clang build, and toggle it on on the +analyzer variant, and we're good to go again I would think.