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 C static bindings to the CI pipeline. #59

Merged
merged 2 commits into from
May 21, 2021
Merged

Conversation

emgre
Copy link
Contributor

@emgre emgre commented May 20, 2021

Fix #58

  • The CI pipeline now includes static libraries.
  • The generated CMake now includes two targets: foo and foo_static. The first one needs a DLL/.so file to work, while the other wants compiles statically.
  • Because static libraries require to explicitly state the system dependencies at link time, the CMake was revised to include all the required system dependencies.
  • Note on Windows: we currently build the Windows bindings by linking statically to the C release runtime. You should therefore use an ABI compliant version of MSVC and link statically to the release version of the C runtime. This means that you should use the /MT flag. If you want to use the dynamic C runtime (/MD), you will need to compile the bindings by yourself. I think that Rust cannot link with the debug versions of the runtime, but I can't confirm that.

@emgre emgre force-pushed the feature/c-static-bindings branch 4 times, most recently from 65bfe37 to c554938 Compare May 20, 2021 21:41
@emgre emgre force-pushed the feature/c-static-bindings branch from c554938 to 93069e2 Compare May 21, 2021 13:24
@emgre emgre force-pushed the feature/c-static-bindings branch from 93069e2 to b3ae533 Compare May 21, 2021 15:46
@emgre emgre merged commit 6de10f8 into master May 21, 2021
@jadamcrain jadamcrain deleted the feature/c-static-bindings branch November 3, 2021 18:08
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.

Provide C static libraries
1 participant