一、判断CPU类型:
{$if not defined(cpuloongarch64)} {$endif}
fpc默认的CPU名称:
CPU16 cpui386 cpux86_64 cpupowerpc32 cpupowerpc64 cpualpha cpuiA64 cpusparc cpusparc64 cpuarm cpuavr cpumipsel cpumipseb cpumips64el cpumips64eb cpuaarch64 cpuriscv32 cpuriscv64 cpuxtensa cpuz80 cpuwasm32 cpuloongarch64
二、判断fpc版本号:
{$if FPC_FULLVERSION>30301}//fpc>3.3.1
系统是这样定义FPC_FULLVERSION:
set_system_macro('FPC_FULLVERSION',Format('%d%.02d%.02d',[StrToInt(version_nr),StrToInt(release_nr),StrToInt(patch_nr)]));
三、取lazarus版本号
LazarusVersionStr