Skip to content

Commit 1a369be

Browse files
authored
Merge branch 'OpenSmalltalk:Cog' into Cog
2 parents 554ab1a + 6131793 commit 1a369be

55 files changed

Lines changed: 764 additions & 189 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

building/win32x86/HowToBuild

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,16 @@ Option C' - WinSDK via x86 Native Tools Command Prompt substitutes Cygwin for MS
133133
install Cygwin instead of MSYS2, and use "..\common\SETPATH_CYGWIN.BAT"
134134
instead of "..\common\SETPATH_MSYS2.BAT"
135135

136+
Option D - cygwin, clang-12, and MSVC, as used by ELiot Miranda, Dec 2025
137+
Install clang-12, the last clang version to support x86, from
138+
https://prereleases.llvm.org/win-snapshots/LLVM-12.0.0-6923b0a7-win32.exe
139+
Install it to \LLVM12-32.
140+
Install an MSVC Community Edition
141+
Open the x86 MSVC build shell, e.g. create a shortcut to
142+
%comspec% /k "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars32.bat"
143+
cd to either squeak.cog.spur.MSVC or squeak.stack.spur.MSVC
144+
evaluate ..\common\SETPATH_CYGWIN.BAT
145+
evaluate ..\common\MAKEALL.BAT
136146

137147

138148
Tailoring the VM build

building/win32x86/common/Makefile.msvc.flags

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#############################################################################
2-
# Common Makefile for Win32 VM using MSVC, e.g. 2017 Community, and gnu make
2+
# Common Makefile for Win32 VM using clang/MSVC, e.g. 2017 Community, and gnu make
33
# Copyright (c) 2020 3D Immersive Collaboration Consulting, LLC
44
#
55
# Compilation rules and flags for plugins built with the MSVC toolchain, such
@@ -30,23 +30,19 @@ override VCINSTALLDIRSH:=$(shell echo "$(VCINSTALLDIR)" | sed 's/[()]/\\&/g')
3030
#############################################################################
3131
# C compiler settings assuming Visual C++ 2017 Community Edition
3232
#
33-
# Try and choose a compiler. Alas clang-cl does not appear to support x86.
34-
# And ClangC2 is broken. So just use MSVC
3533
#
3634

3735
$(info VCINSTALLDIR=$(VCINSTALLDIR))
3836
$(info VCINSTALLDIRSH=$(VCINSTALLDIRSH))
39-
#$(info wildcard VCINSTALLDIR $(wildcard $(VCINSTALLDIR)/.*))
40-
$(info wildcard C:/Program\ Files/LLVM/bin/.* $(wildcard C:/Program\ Files/LLVM/bin/.*))
4137

42-
override TOOLPREFIX:="$(VCToolsInstallDir)bin/Hostx64/x86/"
43-
override HOSTTOOLPREFIX:="$(VCToolsInstallDir)bin/Hostx64/x64/"
44-
export TOOLPREFIX HOSTTOOLPREFIX
45-
MSVC:=MSVC
46-
undefine Clang
47-
undefine ClangC2
48-
CC:=$(TOOLPREFIX)cl.exe -nologo
49-
HOSTCC:=$(HOSTTOOLPREFIX)cl.exe -nologo
38+
CC:=clang.exe
39+
HOSTCC:=$(CC)
40+
Clang:=Clang32
41+
undefine MSVC
42+
export TOOLPREFIX
43+
$(info CC=$(CC))
44+
AS:=as --32
45+
XCFLAGS+=-DRGBMul32BitFallBack=1
5046

5147
$(info CC=$(CC))
5248

@@ -68,9 +64,18 @@ endif
6864
MSVCINCLUDES:=-I"$(subst \,/,$(subst ;," -I",$(INCLUDE)))"
6965
#$(info MSVCINCLUDES is $(MSVCINCLUDES))
7066

67+
ifdef Clang32
68+
PRODUCTION_OFLAGS:=-Os
69+
ASSERT_OFLAGS:=-Od
70+
DEBUG_OFLAGS:=-O0
71+
DASH_O:=-o
72+
OFLAGS=-O3
73+
CFLAGS= -m32 -MD -DLP32=1 -DWIN32=1 -gcodeview $(OFLAGS) \
74+
-Dalloca=_alloca -Dhuge=my_huge \
75+
$(XCFLAGS) $(NOBUILTIN) $(WARNINGS)
76+
else ifdef MSVC
7177
# DO NOT USE := FOR OFLAGS BECAUSE SOME PLUGINS REDEFINE THIS!!
7278
# -Z7 debug info in files; -Zi debug info in PDB
73-
ifdef MSVC
7479
PRODUCTION_OFLAGS:=-Ox -Ob1 -Oi -Oy
7580
ASSERT_OFLAGS:=-Os -Oi- -Oy-
7681
DEBUG_OFLAGS:=-Od
@@ -79,7 +84,7 @@ OFLAGS= -Ot
7984
CFLAGS= -MD -DLP32=1 -DWIN32=1 -Z7 $(OFLAGS) \
8085
-Dalloca=_alloca -Dhuge=my_huge \
8186
-EHsc $(XCFLAGS) $(NOBUILTIN) $(WARNINGS)
82-
else ifdef ClangC2
87+
else
8388
PRODUCTION_OFLAGS:=-Os
8489
ASSERT_OFLAGS:=-Od
8590
DEBUG_OFLAGS:=-O0

building/win32x86/common/Makefile.msvc.rules

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@
66
#
77
#############################################################################
88

9-
ifdef MSVC
10-
include ../common/Makefile.msvc.msvc.rules
11-
else ifdef Clang
12-
include ../common/Makefile.msvc.msvc.rules
13-
else ifdef ClangC2
14-
include ../common/Makefile.msvc.clangc2.rules
15-
endif
9+
#ifdef Clang32
10+
include ../common/Makefile.msvc.clang12.rules
11+
#else ifdef MSVC
12+
#include ../common/Makefile.msvc.msvc.rules
13+
#else ifdef Clang
14+
#include ../common/Makefile.msvc.msvc.rules
15+
#else ifdef ClangC2
16+
#include ../common/Makefile.msvc.clangc2.rules
17+
#endif

building/win32x86/common/SETPATH_CYGWIN.BAT

100644100755
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
REM It is best to install LLVM/clang in /c/LLVM because the space in
2-
REM Program Files can confuse configure programs (e.g. x264's)
3-
set PATH=%PATH%;c:\cygwin64\bin;c:\LLVM\bin;c:\Program Files\LLVM\bin
1+
REM The last version of clang to support 32-bit x86 is version 12.
2+
REM Install it in C:\LLVM12-32. This is better than C:\Program Files\LLVM12-32
3+
REM because the space in Program Files can confuse configure programs (e.g. x264's)
4+
set PATH=%PATH%;c:\cygwin64\bin;c:\LLVM12-32\bin
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
; Set the total stack size to 4 megabytes (0x400000), reserving 4Mb and
2+
; committing 64k (0x10000)
3+
STACKSIZE 0x400000,0x10000
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2+
<assembly
3+
xmlns="urn:schemas-microsoft-com:asm.v1"
4+
manifestVersion="1.0"
5+
xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
6+
<assemblyIdentity
7+
version="1.0.0.0"
8+
processorArchitecture="*"
9+
name="www.opensmalltalk.org.Cog.Croquet"
10+
type="win32"
11+
/>
12+
<description>Croquet Smalltalk Virtual Machine</description>
13+
<asmv3:application>
14+
<asmv3:windowsSettings>
15+
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/pm</dpiAware>
16+
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitor</dpiAwareness>
17+
</asmv3:windowsSettings>
18+
</asmv3:application>
19+
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
20+
<application>
21+
<!-- Windows 10 -->
22+
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
23+
<!-- Windows 8.1 -->
24+
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
25+
<!-- Windows 8 -->
26+
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
27+
<!-- Windows 7 -->
28+
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
29+
</application>
30+
</compatibility>
31+
<dependency>
32+
<dependentAssembly>
33+
<assemblyIdentity
34+
type="win32"
35+
name="Microsoft.Windows.Common-Controls"
36+
version="6.0.0.0"
37+
processorArchitecture="*"
38+
publicKeyToken="6595b64144ccf1df"
39+
language="*"
40+
/>
41+
</dependentAssembly>
42+
</dependency>
43+
</assembly>
1.37 KB
Binary file not shown.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#ifdef _WIN32
2+
1 ICON DISCARDABLE "Croquet.ico"
3+
2 ICON DISCARDABLE "Croquet.ico"
4+
3 ICON DISCARDABLE "Croquet.ico"
5+
6+
1 VERSIONINFO
7+
FILEVERSION FILEVERSIONVALUES
8+
PRODUCTVERSION 5,0,0,0
9+
FILEFLAGSMASK 0x3fL
10+
FILEFLAGS 0xaL
11+
FILEOS 0x10001L
12+
FILETYPE 0x1L
13+
FILESUBTYPE 0x0L
14+
BEGIN
15+
BLOCK "StringFileInfo"
16+
BEGIN
17+
BLOCK "040904E4" // Lang=US English, CharSet=Windows Multilin
18+
BEGIN
19+
VALUE "CompanyName", "Squeak.org\0"
20+
VALUE "FileDescription", "Croquet Cog Spur Virtual Machine\0"
21+
VALUE "FileVersion", FILEVERSIONSTRING
22+
VALUE "LegalCopyright", "Copyright \251 Squeak.org 1996-2014\0"
23+
VALUE "ProductName", "Croquet Cog Spur\0"
24+
VALUE "ProductVersion", "5.0\0"
25+
END
26+
END
27+
BLOCK "VarFileInfo"
28+
BEGIN
29+
VALUE "Translation", 0x409, 1252
30+
END
31+
END
32+
#endif
68.3 KB
Binary file not shown.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#############################################################################
2+
# Makefile for Win32 Cog Spur Squeak VM using gcc-3.4.x and cygwin
3+
# Do make init to allow make -n to function.
4+
#############################################################################
5+
6+
VM:=Squeak
7+
VMSRCDIR:=../../../src/spur32.cog
8+
9+
# This variable is set by VS Native Tools Command Prompts, not for cygwin wins
10+
VSCMD_ARG_HOST_ARCH := $(shell echo $$VSCMD_ARG_HOST_ARCH)
11+
ifeq ($(VSCMD_ARG_HOST_ARCH),)
12+
include ../common/Makefile
13+
else
14+
include ../common/Makefile.msvc
15+
endif

0 commit comments

Comments
 (0)