Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add libclang dependency #23

Merged
merged 7 commits into from
Aug 28, 2023
Merged

Add libclang dependency #23

merged 7 commits into from
Aug 28, 2023

Conversation

Galarius
Copy link
Owner

@Galarius Galarius commented Aug 27, 2023

This pull request integrates several key updates and improvements to the build and workflow processes. Notably, a dependency on libclang has been introduced, and several refinements have been made to the build and release workflows.

libclang is a significant dependency, essential for implementing certain advanced language server features (e.g., #17, #48, kernel preprocessing). Unfortunately, there aren't any existing Conan 2.0-compatible recipes to incorporate it. As a result, it was decided to download prebuilt static libraries hosted by the Qt community. Cmake is responsible for the acquisition of the prebuilt static libraries during the configuration stage.

Details:

  • Libclang Integration:

    • Introduced a new dependency on libclang.
    • Implemented caching for libclang to enhance build performance/cost when using GitHub actions.
    • The step to create a Conan package in the build workflow has been removed (there's no need for a packaged language server, and this step consumes considerable time).
    • The default build type has been set to Release, as prebuilt libclang static libraries are available only for the Release configuration and this is crucial on Windows. Other platforms will also default to the Release configuration, especially since the package creation step was eliminated.
    • [win32] Updated Windows conan profiles to use the dynamic "compiler.runtime" setting to avoid mismatches when linking to libclang. Moreover, prebuilt conan packages are available for this configuration.
    • [linux] Added the -no-pie linker flag because the prebuilt libclang static library is position-dependent.
  • Other changes:

    • Addressed potential header inclusion problems by adding the missing #pragma once directive.

@Galarius Galarius force-pushed the feature/libclang branch 5 times, most recently from 9b1eb1e to a174ef4 Compare August 28, 2023 17:06
@Galarius Galarius marked this pull request as ready for review August 28, 2023 18:42
@Galarius Galarius merged commit 1bd4944 into main Aug 28, 2023
3 checks passed
@Galarius Galarius deleted the feature/libclang branch August 28, 2023 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant