Skip to content

Commit

Permalink
Get compilation of the 32-bit VM to work on 64-bits under msvc (mkNam…
Browse files Browse the repository at this point in the history
…edPrims.exe

must be an x64 executable).
  • Loading branch information
eliotmiranda committed Jun 25, 2022
1 parent f5b6485 commit f616897
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions building/win32x86/common/Makefile.msvc
Expand Up @@ -213,8 +213,8 @@ print-objects:
ignore := $(addsuffix .%, $(basename $(wildcard $(BUILD)/vm/*.ignore)))

mkNamedPrims.exe: $(WIN32UTILDIR)/mkNamedPrims.c
$(CC) -c $< -o mkNamedPrims.obj
$(LD) /out:$@ mkNamedPrims.obj /subsystem:console /defaultlib:libcmt
$(HOSTCC) -c $< -o mkNamedPrims.obj
$(HOSTLD) /out:$@ mkNamedPrims.obj /subsystem:console /defaultlib:libcmt

$(BTOBJ): $(WIN32MISCDIR)/btext.c
$(CC) -c $< -Oy -Os $(DASH_O)$@
Expand Down
6 changes: 4 additions & 2 deletions building/win32x86/common/Makefile.msvc.flags
Expand Up @@ -39,12 +39,14 @@ $(info VCINSTALLDIRSH=$(VCINSTALLDIRSH))
#$(info wildcard VCINSTALLDIR $(wildcard $(VCINSTALLDIR)/.*))
$(info wildcard C:/Program\ Files/LLVM/bin/.* $(wildcard C:/Program\ Files/LLVM/bin/.*))

override TOOLPREFIX:="$(VCToolsInstallDir)bin/HostX64/x86/"
export TOOLPREFIX
override TOOLPREFIX:="$(VCToolsInstallDir)bin/Hostx64/x86/"
override HOSTTOOLPREFIX:="$(VCToolsInstallDir)bin/Hostx64/x64/"
export TOOLPREFIX HOSTTOOLPREFIX
MSVC:=MSVC
undefine Clang
undefine ClangC2
CC:=$(TOOLPREFIX)cl.exe -nologo
HOSTCC:=$(HOSTTOOLPREFIX)cl.exe -nologo

$(info CC=$(CC))

Expand Down
1 change: 1 addition & 0 deletions building/win32x86/common/Makefile.msvc.tools
Expand Up @@ -71,6 +71,7 @@ DEFS:= $(COGDEFS) $(MEMACCESS) $(WINVER) \
# Linker settings
#
LD:= LINK /nologo /MACHINE:$(MACHINE) /INCREMENTAL:NO
HOSTLD:=LINK /nologo /INCREMENTAL:NO
LDCXX:= LINK /nologo /MACHINE:$(MACHINE) /INCREMENTAL:NO
LIBRARIAN:=LIB /nologo
# dlltool is used to create import libraries. The alternatives are
Expand Down

0 comments on commit f616897

Please sign in to comment.