diff --git a/modules/gmake2/gmake2_cpp.lua b/modules/gmake2/gmake2_cpp.lua index 01f1e2ce..9d37f6b6 100644 --- a/modules/gmake2/gmake2_cpp.lua +++ b/modules/gmake2/gmake2_cpp.lua @@ -455,8 +455,7 @@ -- $(LDFLAGS) moved to end (http://sourceforge.net/p/premake/patches/107/) -- $(LIBS) moved to end (http://sourceforge.net/p/premake/bugs/279/) - local cc = iif(p.languages.isc(cfg.language), "CC", "CXX") - p.outln('LINKCMD = $(' .. cc .. ') -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)') + p.outln('LINKCMD = -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)') end end @@ -663,10 +662,12 @@ targets = targets .. ' $(RESOURCES)' end + local cc = iif(p.languages.isc(cfg.language), "CC", "CXX") _p('$(TARGET): %s | $(TARGETDIR)', targets) _p('\t$(PRELINKCMDS)') _p('\t@echo Linking %s', cfg.project.name) - _p('\t$(SILENT) $(LINKCMD)') + _p('\t$(file > $(OBJDIR)/linkcmds.cli, $(LINKCMD))') + _p('\t$(' .. cc .. ') @$(OBJDIR)/linkcmds.cli') _p('\t$(POSTBUILDCMDS)') _p('') end