Recent

Author Topic: Lazarus for Windows on aarch64 (ARM64) - Native Compiler  (Read 43360 times)

msintle

  • Sr. Member
  • ****
  • Posts: 373
Re: Lazarus for Windows on aarch64 (ARM64) - Native Compiler
« Reply #135 on: October 19, 2025, 02:10:19 pm »
There really is no point to inject AI generated slop on this page, makes scrolling very difficult (it would be another thing had it been tested and found to work, of course).

Fred vS

  • Hero Member
  • *****
  • Posts: 3776
    • StrumPract is the musicians best friend
Re: Lazarus for Windows on aarch64 (ARM64) - Native Compiler
« Reply #136 on: October 19, 2025, 02:36:06 pm »
There really is no point to inject AI generated slop on this page, makes scrolling very difficult (it would be another thing had it been tested and found to work, of course).
OK, I'll delete my post (but maybe Alfred found something interesting in it).
« Last Edit: October 19, 2025, 02:47:57 pm by Fred vS »
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

msintle

  • Sr. Member
  • ****
  • Posts: 373
Re: Lazarus for Windows on aarch64 (ARM64) - Native Compiler
« Reply #137 on: October 23, 2025, 09:39:29 pm »
I appreciate that very much.

Note to everyone: Claude seems to be the best AI to be using. ChatGPT is absolutely retarded, at least when it comes to Free Pascal.

Wallaby

  • Full Member
  • ***
  • Posts: 130
Re: Lazarus for Windows on aarch64 (ARM64) - Native Compiler
« Reply #138 on: October 24, 2025, 02:19:25 am »
Note to everyone: Claude seems to be the best AI to be using. ChatGPT is absolutely retarded, at least when it comes to Free Pascal.

Agreed! I've trialled Codex (ChatGPT), Gemini and Claude Code and likewise Codex was dumb, Gemini was even dumber, yet Claude Code demonstrated solid understanding of Pascal. Now I use Claude Code even more than the Lazarus IDE itself.

msintle

  • Sr. Member
  • ****
  • Posts: 373
Re: Lazarus for Windows on aarch64 (ARM64) - Native Compiler
« Reply #139 on: January 21, 2026, 12:38:37 pm »
So the Free Pascal compiler for aarch64 (ARM64) on Windows - does it generate ARM64 binaries, or this new thing called ARM64EC binaries?

ARM64EC binaries are a watered-down version of true ARM64 binaries primarily designed to combine AMD64 (x64) code with aarch64 (ARM64) code in the same ABI (application binary interface).

Thus, they cannot actually be used for things like shell extensions, Windows PE/RE environments - basically everything we actually DO need TRUE ARM64 for, that emulation does NOT help us with AT ALL.

I would love to hear if anybody knows - thanks!
« Last Edit: January 21, 2026, 12:54:13 pm by msintle »

Wallaby

  • Full Member
  • ***
  • Posts: 130
Re: Lazarus for Windows on aarch64 (ARM64) - Native Compiler
« Reply #140 on: January 21, 2026, 12:58:01 pm »
True ARM64, but with broken exception handling, as we all know.

ARM64EC is a MS extension for ARM64 to allow interoperability with x86_64 libraries, to allow gradual app conversion. With it apps can include a mix of ARM64 and x86_64 code, typically when some components cannot be recompiled or migrated.

I doubt FPC will ever support ARM64EC.

Thaddy

  • Hero Member
  • *****
  • Posts: 18729
  • To Europe: simply sell USA bonds: dollar collapses
Re: Lazarus for Windows on aarch64 (ARM64) - Native Compiler
« Reply #141 on: January 21, 2026, 01:35:48 pm »
I doubt FPC will ever support ARM64EC.
It does not have to. It is transparent, much like Rosetta on Apple AARCH64 software.

Freepascal/Lazarus for Windows on AARCH64 is an ongoing development and is NOT a release version. Hence you may try that emulation layer: it should be processor agnostic if MS did a proper job like Apple did.
« Last Edit: January 21, 2026, 01:39:35 pm by Thaddy »
If Europe sells their USA bonds the USD will collapse. Europe can affort that given average state debts. The USA can't affort that. Just an advice...

msintle

  • Sr. Member
  • ****
  • Posts: 373
Re: Lazarus for Windows on aarch64 (ARM64) - Native Compiler
« Reply #142 on: January 21, 2026, 03:11:13 pm »
True ARM64, but with broken exception handling, as we all know.

ARM64EC is a MS extension for ARM64 to allow interoperability with x86_64 libraries, to allow gradual app conversion. With it apps can include a mix of ARM64 and x86_64 code, typically when some components cannot be recompiled or migrated.

I doubt FPC will ever support ARM64EC.

That is great to know.

My company is willing to sponsor this fix to the tune of US$10,000 at this time.

PM me if you are interested in claiming this offer.

Thaddy

  • Hero Member
  • *****
  • Posts: 18729
  • To Europe: simply sell USA bonds: dollar collapses
Re: Lazarus for Windows on aarch64 (ARM64) - Native Compiler
« Reply #143 on: January 23, 2026, 07:26:30 am »
Keep the 10.000. Didn't you read my reply?
It is an emulation layer for X86 code, just like Apple has: you do not need to change anything.
And in time the Win/AARCH64 NATIVE version will also get a release.
« Last Edit: January 23, 2026, 07:29:05 am by Thaddy »
If Europe sells their USA bonds the USD will collapse. Europe can affort that given average state debts. The USA can't affort that. Just an advice...

Wallaby

  • Full Member
  • ***
  • Posts: 130
Re: Lazarus for Windows on aarch64 (ARM64) - Native Compiler
« Reply #144 on: January 23, 2026, 12:50:34 pm »
That is great to know. My company is willing to sponsor this fix to the tune of US$10,000 at this time. PM me if you are interested in claiming this offer.

I'll have a look into this hopefully next month, at the moment pretty busy working on my own projects.

But yes, the bounty sounds enticing, and it's also a priority for me to get this working as myprojects require aarch64 builds.

Thaddy

  • Hero Member
  • *****
  • Posts: 18729
  • To Europe: simply sell USA bonds: dollar collapses
Re: Lazarus for Windows on aarch64 (ARM64) - Native Compiler
« Reply #145 on: January 23, 2026, 01:02:34 pm »
The bounty would be given to a cheat. >:D >:D >:D
After asking some MS people I know, the emulation layer is quite like Apple did.
If Europe sells their USA bonds the USD will collapse. Europe can affort that given average state debts. The USA can't affort that. Just an advice...

Luc

  • Jr. Member
  • **
  • Posts: 60
Re: Lazarus for Windows on aarch64 (ARM64) - Native Compiler
« Reply #146 on: January 23, 2026, 06:17:03 pm »

Lazarus works well on Windows 11 ARM. You can target Win32/Win64 Intel processors and use DLLs without issues - the OS handles everything through its compatibility layer.
Debugging works quite reliably, and I've found it performs better when targeting x64 rather than x86.
The main tradeoff is the performance hit from the emulation layer. Compilation times and final executable speed are noticeably slower compared to native x64 machines. My setup probably doesn't help (Mac M1 + Parallels + Win11 ARM), since I'm running virtualization on top of emulation, but even accounting for that, there's a clear speed penalty.
Native ARM64 support in FPC for Windows would be a significant improvement - eliminating the emulation overhead would likely bring both compilation and runtime performance much closer to what we see on native x64 systems.
For regular development work the current setup is perfectly usable, but be aware of the speed difference if you're doing heavy compilation or performance-critical work.
Just my experience so far!
Win 11 ARM (Running in Parallel VM - Mac OSX) - Lazarus 2.2.6 - i386-win32/win64

Wallaby

  • Full Member
  • ***
  • Posts: 130
Re: Lazarus for Windows on aarch64 (ARM64) - Native Compiler
« Reply #147 on: January 24, 2026, 06:19:18 am »
That is great to know.

My company is willing to sponsor this fix to the tune of US$10,000 at this time.

PM me if you are interested in claiming this offer.

aaaaaannd, success! I was able to identify ~3 separate compiler bugs that led to crashes. Here is a screenshot of the IDE running natively on Win64 Aarch64. More details to come soon!


ALLIGATOR

  • Sr. Member
  • ****
  • Posts: 370
  • I use FPC [main] 💪🐯💪
Re: Lazarus for Windows on aarch64 (ARM64) - Native Compiler
« Reply #148 on: January 24, 2026, 12:57:38 pm »
aaaaaannd, success!
Woohooo 😃🎉🎊
I may seem rude - please don't take it personally

Wallaby

  • Full Member
  • ***
  • Posts: 130
Re: Lazarus for Windows on aarch64 (ARM64) - Native Compiler
« Reply #149 on: January 24, 2026, 01:36:50 pm »
Compiled some apps of my own and fpcupdeluxe, all looks very promising, see attachment:

 

TinyPortal © 2005-2018