fix Issue 15374 - Move genCmain into Compiler struct.#7534
fix Issue 15374 - Move genCmain into Compiler struct.#7534dlang-bot merged 2 commits intodlang:masterfrom
Conversation
|
Thanks for your pull request, @ibuclaw! Bugzilla references
|
|
Regarding: The other targets do seem to have |
|
I'm not sure what that has to do with this PR. It built locally just fine for me. |
Maybe you didn't diff --git a/src/posix.mak b/src/posix.mak
index a025bb42f..9a42370ab 100644
--- a/src/posix.mak
+++ b/src/posix.mak
@@ -442,7 +442,7 @@ $G/backend.a: $(G_OBJS) $(SRC_MAKE)
$(AR) rcs $@ $(G_OBJS)
$G/lexer.a: $(LEXER_SRCS) $(LEXER_ROOT) $(HOST_DMD_PATH) $(SRC_MAKE)
- CC="$(HOST_CXX)" $(HOST_DMD_RUN) -lib -of$@ $(MODEL_FLAG) -J$G -L-lstdc++ $(DFLAGS) $(LEXER_SRCS) $(LEXER_ROOT)
+ CC="$(HOST_CXX)" $(HOST_DMD_RUN) -lib -of$@ $(MODEL_FLAG) -J$G -J../res -L-lstdc++ $(DFLAGS) $(LEXER_SRCS) $(LEXER_ROOT)
$G/dmd_frontend: $(FRONT_SRCS) $D/gluelayer.d $(ROOT_SRCS) $G/newdelete.o $G/lexer.a $(STRING_IMPORT_FILES) $(HOST_DMD_PATH)
CC="$(HOST_CXX)" $(HOST_DMD_RUN) -of$@ $(MODEL_FLAG) -vtls -J$G -J../res -L-lstdc++ $(DFLAGS) $(filter-out $(STRING_IMPORT_FILES) $(HOST_DMD_PATH),$^) -version=NoBackendBut I'm still not sure why your changes are leading to the |
|
Problem is due to |
|
Rebased. |
PetarKirov
left a comment
There was a problem hiding this comment.
LGTM, just fix the build errors.
src/dmd/compiler.d
Outdated
| import dmd.id; | ||
| import dmd.identifier; | ||
| import dmd.parse; | ||
| import dmd.semantic; |
There was a problem hiding this comment.
Import dmd.semantic2 and dmd.semantic3 instead.
😨 |
|
Perhaps the module constructor in |
Yes, let's kill the module constructor with CTFE 🔥 |
|
Regarding the requirement of |
DMD only does lazy imports for templates. Anyhow we shouldn't need to add |
|
What about the (currently unused) dmd.frontend? |
|
|
Yep and we want to be able to use Phobos for that to provide nice high-level wrappers.
OTOH considering how much pain |
I thought that was removed. |
Still there: https://github.com/dlang/dmd/blob/master/src/posix.mak#L432 CC @RazvanN7 |
|
If |
|
Indeed, however there are a couple settings that should be set up outside of global module, notably the vendor and version string. Both of which are used by the parser. Perhaps now there's a frontend module I can dissolve |
|
Rebased. |
|
Rebased again, reapplying auto-merge. |
Probably a good time to think about what to do with
entrypointandrootHasMain. Keep as top-level vars? Or move intoGlobal.