On Friday, 16 December 2016 at 13:55:55 UTC, Guillaume Piolat wrote:
Trying to answer with the existing dub.

On Friday, 16 December 2016 at 13:21:53 UTC, Ilya Yaroshenko wrote:
We need
1. a post fetch (build) options. GLAS should be builded only in release, and in single file mode. It is a betterC library with extern C interface.

--combined -b release-nobounds

2. ability to build C/C++ code, run makefiles.

As Rikki said.

3. ability to compose libraries.

Not sure what you mean.

4. ability to override a compiler for betterC libraries.

Not sure what you mean. The selected compiler is outside the dub configurations with --compiler.
You probably know can have special LDC flags:


DUB allows to set only compiler flags. I want to define how betterC libraries should be builded inside their dub configs instead of unified compiler/build options for all libs like it works now.

Dub configurations and dependencies sub-configurations let you define version identifiers from outside the library, and can have different "dflags" too.

Example from product:

----------------

        "configurations": [
        {
            "name": "VST-EE",
            "versions": ["VST", "full"],
            "targetType": "dynamicLibrary",
"lflags-osx": [ "-exported_symbols_list", "source/module-vst.lst", "-dead_strip" ]
        },

----------------

The tricky thing is to recognize where "lflags" or "dflags" are needed, and how this interact with --combined (dflags and lflags get merged then).

Investment in dub pays dividend by being unified and makes sense after a while.

This approach does not work for Mir GLAS.
http://forum.dlang.org/post/dfqcgdfnxmnkreywo...@forum.dlang.org

I can build a Mir GLAS library with DUB. But I can not do it automatically with DUB, but want to do it.

For example:
---
"dependencies": {
    "mir-glas": "<its recent version>"
}
---
will not work for a user because mir-glas should be prebuilded with the following command:

dub build --config=static --build=target-native --compiler=ldmd2 --build-mode=singleFile --parallel

And it should be builded this way whatever compiler and dub options user use for his project.

Ilya

Reply via email to