Bug 20338 – dmd, phobos, and druntime build systems should be updated

Status
NEW
Severity
enhancement
Priority
P4
Component
dlang.org
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2019-10-30T05:01:52Z
Last change time
2024-12-15T15:25:25Z
Assigned to
No Owner
Creator
Alan.W.Irwin1234
Moved to GitHub: dlang.org#4098 →

Comments

Comment #0 by Alan.W.Irwin1234 — 2019-10-30T05:01:52Z
Comment #1 by Alan.W.Irwin1234 — 2019-10-30T05:25:37Z
I have recently cleaned, rebuilt, reinstalled, and tested dmd, phobos, and the druntime components needed by phobos with success for the Posix case. However, I believe the following issues in these interdependent build systems need attention: * The local repositories get contaminated with build files. (This issue can be addressed by implementing separate build trees for such file to receive such files.) * There are obscure interactions between the phobos build and druntime build, clean, and install targets that violate the principle of least surprise. For example, the phobos build indirectly builds druntime, but the phobos clean and install do not clean and install druntime. * There appears to be a separate build procedure for Windows and Posix systems. * The install tree has a hard-coded location which makes it difficult to package dmd, phobos, and druntime for free software distributions. All of these issues can be straightforwardly addressed by a "super-build" set of modern CMake-based build systems for dmd, phobos, and druntime that would coexist peacefully with your present build systems. If some dmd/phobos/druntime developer is keen on such an update I would be happy to lend my decade+ experience with CMake to help get them started.
Comment #2 by Alan.W.Irwin1234 — 2019-10-30T17:42:16Z
I forgot to mention another issue with your present build and test system is the dmd test target cannot be built with the GNU make parallel build (-jN) option. So my script drops that possibility for dmd and phobos on the assumption that the phobos build/test system has the same issue. CMake provides a powerful environment (for example, dependencies between tests) to solve such parallel build issues. Also, to expand on my remarks about different build systems for Posix (where you currently use a Makefile approach) and Windows (where you currently appear to have a build system that works for Visual Studio), CMake has different generators which allow it, for example, to configure Posix Makefiles, a Visual Studio project, and many other possibilities (such as nmake Makefiles). However, I don't want to over-advocate CMake so I also want to emphasize this parallel test issue, and all the other Posix build-system issues I have mentioned could be addressed at the Makefile level and assuming the same or similar issues exist for your Visual Studio build could also be addressed for that build system. Or maybe [Digger](https://github.com/CyberShadow/Digger) (which I have not tried) is the answer. But the fundamental point is all these current build-system issues I have mentioned need to be addressed whatever build system you decide to adopt.
Comment #3 by robert.schadek — 2024-12-15T15:25:25Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dlang.org/issues/4098 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB