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

Solve the issue of multiple kinds of targets #7

Closed
cppguru opened this issue Aug 18, 2014 · 4 comments
Closed

Solve the issue of multiple kinds of targets #7

cppguru opened this issue Aug 18, 2014 · 4 comments
Assignees

Comments

@cppguru
Copy link

cppguru commented Aug 18, 2014

When I am making a plugin I may have 3 kinds of different ways of building it.

  1. A shared library (that I am going to open with dlopen/LoadLibrary).
  2. A shared library that I link in structurally, just like the C runtime is linked in.
  3. A static library that I fully link in, as if linking in all of its objects.

Side note: These 3 might require differences in the source, which we may have to contain with #if ugliness (unless we can hide the differences in components -- not enough experiences to say which will be true). We assume the "worst case" for the build system: we build all 3 variant from the same source code. In which case we will need:

  1. A way to say (with the executable) not only what plugins we want to build with it, but which variant of the 3
  2. In the plugin sources we would like to know what are we building, so a adding some -Dtarget-type-thing sounds like a good idea
  3. We probably don't want to build all variants of a plugin, just what is asked for, when building for production.
  4. We don't want to build all variants of plugins even when testing, because not all variants may be supported; so we need some sort of capabilities info as well.

The problem is that, at the moment, as a programmer, I cannot have a static and a dynamic plugin, unless I edit the source code of bdemeta; as the tool has no concept of multiple different outputs. So plugins (all plugins) are either static or dynamic. So to step closer to a solution we need to be able to specify for each element (group, plugin) what kind of targets do they support and their users (the dependent executable) should be able to specify what flavor do they want. (This is somewhat similar to thread-aware/single-threaded variants. We don't need groups ending up being shared libraries right now, but BDE is already doing that for Windows.) Whatever way we do these in the metafiles, it has to be the same how BDE wants to do it -- assuming they have one.

@frutiger
Copy link
Owner

This issue will be resolved (at least partially) when I attempt to allow plugins as a first-class citizen of bdemeta.

@frutiger
Copy link
Owner

frutiger commented Feb 2, 2015

As a first cut, I am looking at how to implement option 1:

  1. A shared library (that I am going to open with dlopen/LoadLibrary).

@frutiger
Copy link
Owner

frutiger commented Feb 2, 2015

@cppguru I have broken up the original issue into 4 new issues: #12, #13, #14 and #15. I hope you don't mind if I close this issue. If you see something that you have requested that is not covered in those other issues but is related, then please update them. If it seems somewhat unrelated, please create a new issue.

@frutiger frutiger closed this as completed Feb 2, 2015
@cppguru
Copy link
Author

cppguru commented Feb 2, 2015

If you do not want to bother with dlopen/LoadLibrary you may just link it
in as usual. Don't waste your time on the pligin infrastructure, I am
supposed to implement that. I think we should not have competing ones.
Talk to Brock if you think we should.

On Mon, Feb 2, 2015 at 2:52 AM, Masud Rahman notifications@github.com
wrote:

Closed #7 #7.


Reply to this email directly or view it on GitHub
#7 (comment).

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

No branches or pull requests

2 participants