Remove the static lib builder creation in the D tools.

#477 Merged at fdae73a
Repository
Deleted repository
Branch
default (fdae73a5c223)
Repository
SCons
Branch
default
Author
  1. Russel Winder
Reviewers
Description

It has struck me over the last couple of days that, despite the "all at once builder" the D tools are front end tools, and that defining a library builder is the job of a linker tool, not the job of a frontend tool. This pull request therefore removes the optional definition of a static library builder. This came to light due to lack of symmetry: there is no shared library builder definition, and yet building shared libraries works entirely as expected. None of the C, C++, Fortran frontend tools define a library builder, so why should the D frontend tools.

This change makes no difference to the tests, they behave the same with or without the lines.

Comments (10)

  1. Russel Winder author

    It maybe this pull request has to be declined.

    It seems that the link tool does not provide StaticLibrary builder, but only SharedLibrary. Since D has to be able to statically link as well as dynamically link in all build situations, having StaticLibrary is essential. More research happening. But for now this should not be merged.

    1. William Deegan

      O.k. Not surprising that the staticlibrary is not provide by the link command. For posix systems static library is usually generated by ar command.. Take a look there.

      1. Russel Winder author

        It seems though that SharedLibrary is brought in by the link tool as well as it providing the Program builder. So there is an architecture question here of which tools provide which builders.

          1. Russel Winder author

            I can cope with not doing something. :-)

            I guess in the short term the issue is whether the D compiler tools should put StaticLibrary into the environment, when none of the other compiler tools do (as far as I know), at the penalty of having to use the ar tool. The D compiler tools do not put SharedLibrary into the environment, requiring use of link, so are inconsistent on this. I have an inkling of how history has led us to this point, but I don't like this sort of inconsistency, and would prefer to remove the StaticLibrary builder introduction in the D tools.

            However, given the data I now have, I have a suspicion someone very soon now is about to say "this is a breaking change, isn't it". And yes, given the data, it is.

  2. Russel Winder author

    I am not sure how long to leave it, but no-one has responded to my email, not even people I know use SCons for D. Given we are going SCons 2.5 → 3 I propose this is the time for breaking changes, so on reflection I think this change should be merged on the grounds of consistency with other tools.

  3. Russel Winder author

    As agreed via email, I have added removal of the deprecated code relating to the naming of the LDC version of the Phobos shared object on Fedora at some time in the past.

    It appears the notice for this added change is still in src/CHANGES.txt – it must not have been removed during the earlier pull request dealing with this bit of code.

    1. William Deegan

      Go ahead and add the text below the 3.0.0.alpha bit. I'll change it for the next release. I'm not going to retain alpha releases in the CHANGES.txt, just fold them into the actual release.