Skip to content

Commit

Permalink
Windows: Fix the SqueakCOnsole VMs. They were missing initialization of
Browse files Browse the repository at this point in the history
vmOptions and imageOptions along the main/sqMain path.
SOme minor tweaks to the 64-bit MSVC Makefiles to get the VM to compile under
Clang-cl.exe (v 10).
  • Loading branch information
eliotmiranda committed Apr 15, 2020
1 parent 715b27f commit 92f4161
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 7 deletions.
3 changes: 2 additions & 1 deletion build.win64x64/common/Makefile.msvc.flags
Expand Up @@ -57,14 +57,15 @@ undefine Clang
undefine MSVC
CLANG_ADAPT:=-fmsc-version=1916 # as reported by boost for MSVC Community 2017
else
$(info neither CLang nor Clang/C2 found using MSVC)
$(info neither Clang nor Clang/C2 found using MSVC)
override TOOLPREFIX:="$(VCToolsInstallDir)bin/HostX64/x64/"
MSVC:=MSVC
undefine Clang
undefine ClangC2
CC:=$(TOOLPREFIX)cl.exe -nologo
endif
$(info CC=$(CC))
AS:=ml64


ifeq ($(WindowsSdkDir),)
Expand Down
6 changes: 6 additions & 0 deletions build.win64x64/common/Makefile.msvc.msvc.rules
Expand Up @@ -45,3 +45,9 @@ $(OBJDIR)/%.o: %.cpp

.c.dep:
$(CC) -M -o $(notdir $@) $(CFLAGS) $(INCLUDES) $(DEFS) -c $<

.asm.o:
$(AS) /Fo$(OBJDIR)/$@ $(DEFS) -c $<

$(OBJDIR)/%.o: %.asm
$(AS) /Fo$@ $(DEFS) -c $<
6 changes: 1 addition & 5 deletions build.win64x64/common/Makefile.msvc.plugin
Expand Up @@ -120,11 +120,7 @@ $(PLUGINLIB): $(VMDIR) $(OBJDIR) $(LIBOBJ)
-$(RM) $(PLUGINLIB)
$(LIBRARIAN) $(LIBOBJ) $(EXTRALIBS) -out:$(subst /,\\,$(PLUGINLIB))

PLUGINDLL_LIBS:=WinMM.lib ole32.lib dsound.lib msdmo.lib kernel32.lib

ifdef Clang
PLUGINDLL_LIBS+=libconcrt.lib /NODEFAULTLIB:msvcrt.lib
endif
PLUGINDLL_LIBS:=WinMM.lib ole32.lib dsound.lib msdmo.lib kernel32.lib /NODEFAULTLIB:libc /NODEFAULTLIB:libcmt /DEFAULTLIB:msvcrt

$(PLUGINDLL): $(VMDIR) $(OBJDIR) $(LIBOBJ)
$(LD) $(VMLIB) $(LDFLAGS) -DLL $(LIBOBJ) $(PLUGINDLL_LIBS) $(EXTRALIBS) \
Expand Down
1 change: 0 additions & 1 deletion platforms/win32/plugins/JPEGReadWriter2Plugin/stub

This file was deleted.

2 changes: 2 additions & 0 deletions platforms/win32/vm/sqWin32Main.c
Expand Up @@ -1858,6 +1858,8 @@ main(int argc, char *argv[])

SQ_LAUNCH_DROP = RegisterWindowMessage(TEXT("SQUEAK_LAUNCH_DROP"));

vmOptions = calloc(argc + 1, sizeof(char *));
imageOptions = calloc(argc + 1, sizeof(char *));
/* start the non-service version */
sqMain(argc, argv);
return 0;
Expand Down

0 comments on commit 92f4161

Please sign in to comment.