Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

Investigate upgrade to clang 13 #89

Open
3 tasks
varungandhi-src opened this issue Jul 7, 2022 · 5 comments
Open
3 tasks

Investigate upgrade to clang 13 #89

varungandhi-src opened this issue Jul 7, 2022 · 5 comments

Comments

@varungandhi-src
Copy link
Contributor

varungandhi-src commented Jul 7, 2022

It seems like there were some concurrency related bugs fixed between clang 11 and clang 13. (discussion)

I'm a little hesitant to make such a big change* without testing infrastructure... Ideally, we'd have at least some testing with sanitizers + on higher core count machines, whereas GitHub Action's default runners are relatively underpowered at 2 vCPUs. 😐

Maybe we can do it smaller pieces:

The "investigate" in the title is deliberate; this issue isn't a commitment to upgrade to LLVM 13.

*The merge may be small, but there is a chance around broken invariants, or some random null pointers in places where they weren't coming up before.

@jlisee
Copy link
Contributor

jlisee commented Jul 7, 2022

Notes on my Clang 13 based version:

I am most likely going to be force pushing that branch occasionally as I re-merge the upstream main branch with the llvm-main branch in my fork from the to capture the latest lsif-clang changes.

@kkpattern
Copy link

On recent macOS, clang-11 fails to build some projects. For example https://trac.macports.org/ticket/64152. With lsif-clang built with llvm-11 on macOS, we encounter a similar problem when lsif-clang processing our source code. It would be nice to be able to upgrade lsif-clang to clang-13.

@varungandhi-src
Copy link
Contributor Author

@kkpattern did you try using the fork mentioned above and did that fix the issue? (Trying to understand if your point is mainly that we should merge those changes in or whether you tried the clang-13 based fork and it did work.)

@kkpattern
Copy link

@kkpattern did you try using the fork mentioned above and did that fix the issue? (Trying to understand if your point is mainly that we should merge those changes in or whether you tried the clang-13 based fork and it did work.)

I haven't tried the forked yet. For other clang-based tools we use, switch clang-11 to clang-13 will solve the problem. I will try the above fork soon once I get some time.

@kkpattern
Copy link

I have tried the https://github.com/jlisee/lsif-clang/tree/jlisee/llvm-13.0.1-upgrade-v2 branch. At first, it could not correctly find the clang config on my machine. In this line it set the clang_search_path to "${LLVM_DIR}/../lib/cmake/clang". In my environment, the LLVM_DIR is set to /path/to/llvm/lib/cmake/llvm so this line needs to be changed to set(clang_search_path "${LLVM_DIR}/../clang").

After that, the build succeeds with LLVM-13 on macOS Monterey.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants