Add wasm32 CPU handling in embedded target

This commit is contained in:
Pierre Muller 2022-01-04 11:14:58 +00:00
parent b02b3b79b4
commit 1c9280de56
3 changed files with 25 additions and 0 deletions

View File

@ -530,6 +530,9 @@ ifeq ($(CPU_UNITS_DEFINED),)
$(error No CPUs enabled for given SUBARCH, pass either a SUBARCH or set CPU_UNITS_DEFINED=1 if you know what you are doing)
endif
endif
ifeq ($(ARCH),wasm32)
CPU_SPECIFIC_COMMON_UNITS=sysutils math classes fgl macpas typinfo types rtlconsts getopts
endif
OBJPASDIR=$(RTL)/objpas
GRAPHDIR=$(INC)/graph
ifeq ($(FULL_TARGET),i386-linux)

View File

@ -238,6 +238,11 @@ $(error No CPUs enabled for given SUBARCH, pass either a SUBARCH or set CPU_UNIT
endif
endif
ifeq ($(ARCH),wasm32)
CPU_SPECIFIC_COMMON_UNITS=sysutils math classes fgl macpas typinfo types rtlconsts getopts
# lineinfo
endif
# Paths
OBJPASDIR=$(RTL)/objpas
GRAPHDIR=$(INC)/graph

View File

@ -274,3 +274,20 @@
-SfRTTI
-SfSOFTFPU
#endif
# wasm32 is powerful enough to handle most object pascal constructs
# it is only a matter of size, it does not need softfpu
#ifdef CPUWASM32
-SfCLASSES
-SfEXCEPTIONS
-SfANSISTRINGS
-SfRTTI
-SfWIDESTRINGS
-SfDYNARRAYS
-SfTHREADING
-SfVARIANTS
-SfOBJECTS
-SfCOMMANDARGS
-SfRANDOM
-SfRESOURCES
#endif CPUWASM32