Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2026-07

Compile fpc with llvm

3 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Adriaan van Os

With success I have built and used an fpc-3.3.1 based LLVM compiler. The FPC LLVM Wiki <https://wiki.freepascal.org/LLVM> says that "the compiler itself on x86-64 is about 10% faster when compiled with LLVM on an Intel Haswell processor, or 18% if you also enable link-time optimization." I could not find how to do that (build the compiler itself with llvm) as it requires starting with an fpc-3.2.2 compiler.

Thanks,

Adriaan van Os

Reply by email

Jonas Maebe
to Adriaan van Os
Adriaan van Os wrote 7 lines
With success I have built and used an fpc-3.3.1 based LLVM compiler. The FPC LLVM Wiki <https://wiki.freepascal.org/LLVM> [1] says that "the compiler itself on x86-64 is about 10% faster when compiled with LLVM on an Intel Haswell processor, or 18% if you also enable link-time optimization." I could not find how to do that (build the compiler itself with llvm) as it requires starting with an fpc-3.2.2 compiler.

You can add OVERRIDEVERSIONCHECK=1 to the make command disable the version check. It's not advertised because using it in general is not supported (only when building the exact same FPC revision from which the compiler was built).

Jonas

Reply by email

Adriaan van Os
to Jonas Maebe
Jonas Maebe wrote 13 lines
On 2026-07-18 15:27, Adriaan van Os via fpc-devel wrote: > With success I have built and used an fpc-3.3.1 based LLVM compiler. > The FPC LLVM Wiki <https://wiki.freepascal.org/LLVM> [1] says that > "the compiler itself on x86-64 is about 10% faster when compiled with > LLVM on an Intel Haswell processor, or 18% if you also enable > link-time optimization." I could not find how to do that (build the > compiler itself with llvm) as it requires starting with an fpc-3.2.2 > compiler. You can add OVERRIDEVERSIONCHECK=1 to the make command disable the version check. It's not advertised because using it in general is not supported (only when building the exact same FPC revision from which the compiler was built).

Thanks, I will try that.

Regards,

Adriaan van Os

Reply by email