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

support for building shared objects #106

Open
gizmomogwai opened this issue Sep 6, 2012 · 10 comments
Open

support for building shared objects #106

gizmomogwai opened this issue Sep 6, 2012 · 10 comments

Comments

@gizmomogwai
Copy link
Collaborator

No description provided.

@qinqon
Copy link
Contributor

qinqon commented Jan 8, 2013

Is there a workaround to construct shared libraries ?

@gizmomogwai
Copy link
Collaborator Author

right now there is no workaround.
if you really really need them, we could try to create all source-libs as shared libs. especially in linux this is not hard.
usually i prefer statically linked executables, as they are much easier to deploy

@qinqon
Copy link
Contributor

qinqon commented Jan 9, 2013

I have just move all my project from cmake to buildr + cxxproject, only some shared libraries are pending.
I can help you guys with the task. Did I have to create a new building block similar to source_library or just configure source_library differently ?

@gizmomogwai
Copy link
Collaborator Author

mhh .. thats a design decision.
i would opt for a flag for SourceLibrary. something like
source_lib 'test', :sources => [...], :shared => true with default to :shared == false
depending on this we would have to generate a shared object. for linux this should not be a big problem ... instead of creating an archive we would link a shared object and when linking the executable we would use this.

@marcmo @aschaal what do you guys think

@qinqon
Copy link
Contributor

qinqon commented Jan 9, 2013

Looking into the code there isn't much in common betwen the ar command and the linker, in fact is much more similar to the executable.rb both are linkin using the LINKER from the toolchain.
My suggestion is to have a linkable.rb that are extended by executable.rb and shared_library.rb. Or some kind of HasLinkables.rb mixing.

@gizmomogwai
Copy link
Collaborator Author

from the toolchains point of view you are right.
both shared libraries and executables are linked.
you can go ahead and fork cxxproject and put the stuff into it as you wish, we will gladly merge your changes back into the main project.

@qinqon
Copy link
Contributor

qinqon commented Jan 9, 2013

I have also to change the gcctoolchain project and the cxx project.

@qinqon
Copy link
Contributor

qinqon commented Jan 9, 2013

I don't find the cxx gem project at github with the eval_context.rb

@gizmomogwai
Copy link
Collaborator Author

@gizmomogwai
Copy link
Collaborator Author

https://github.com/gizmomogwai/cxxproject_examples/tree/master/shared_lib
should show in the shell scripts how to work with shared libraries

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

No branches or pull requests

2 participants