-
Notifications
You must be signed in to change notification settings - Fork 207
Set up a client-side C library to talk with C APIs exposed from the compiler #381
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
Conversation
@swift-ci please test |
Is the idea to use this for llvm? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I try to build this with CMake, I get:
CMake Error at Sources/CMakeLists.txt:9 (add_subdirectory): The source directory /Volumes/Data/GHWorkspace1/swift-driver/Sources/_CSwiftDriver/src
does not contain a CMakeLists.txt file.
Is there perhaps a file missing from this PR?
This target's CMakeLists
should define it as a library, and we need to take care to link it in statically when building libSwiftDriver
to avoid having to install another shared library into the toolchain.
@cltnschlosser, something like this will be an example of where this is useful: |
@cltnschlosser, this is to allow libSwiftDriver to talk with Swift compiler from different toolchains. In that case, we cannot statically link against libraries vendored from a compiler. We need to rely on C APIs like |
@artemcm hmm, will take a look at the cmake issue. |
sourcekit-lsp does this already: Move some shared code to TSC? |
@tschuett yeah, refactoring those pieces seem to me a good idea. Regardless of whether we need to invoke |
e71ca65
to
5064adc
Compare
No worries. You are missing some newlines at the end of files in a couple of places. |
5064adc
to
dec4b14
Compare
…ompiler We could use functions like dlopen and dlsym in this client-side library to talk with compiler-side C APIs.
dec4b14
to
497ad4f
Compare
@swift-ci please test |
We could use functions like dlopen and dlsym in this client-side library to talk with
compiler-side C APIs.