Recent

Author Topic: Custom compiler options / defines  (Read 244 times)

julkas

  • Sr. Member
  • ****
  • Posts: 438
  • KISS principle / Lazarus 2.0.0 / FPC 3.0.4
Custom compiler options / defines
« on: November 12, 2019, 02:12:01 pm »
Where I can find definition of following options / defines -
-dBorland -dVer150 -dDelphi7 -dCompiler6_Up -dPUREPASCAL?
procedure mulu64(a, b: QWORD; out clo, chi: QWORD); assembler;
asm
  mov rax, a
  mov rdx, b
  mul rdx
  mov [clo], rax
  mov [chi], rdx
end;

PascalDragon

  • Hero Member
  • *****
  • Posts: 735
  • Compiler Developer
Re: Custom compiler options / defines
« Reply #1 on: November 12, 2019, 03:16:34 pm »
Judging from the names these are probably defined in some include file (jedi.inc is a good candidate should you work with a 3rd party source). Neither FPC nor any of the Lazarus packages defines these.

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 7630
Re: Custom compiler options / defines
« Reply #2 on: November 12, 2019, 04:12:21 pm »
Yes, these are mostly to deal with Delphi specific versioning, and don't relate to FPC which has its own versioning.

Thaddy

  • Hero Member
  • *****
  • Posts: 9293
Re: Custom compiler options / defines
« Reply #3 on: November 12, 2019, 04:53:30 pm »
-dXXXX means simply to instruct the compiler to define a certain option that resides anywhere in the source code. Any option as possibly defined like -dwhatever will be parsed  ($ifdef  whatever}... {$endif}
also related to equus asinus.

julkas

  • Sr. Member
  • ****
  • Posts: 438
  • KISS principle / Lazarus 2.0.0 / FPC 3.0.4
Re: Custom compiler options / defines
« Reply #4 on: November 12, 2019, 06:05:23 pm »
Judging from the names these are probably defined in some include file (jedi.inc is a good candidate should you work with a 3rd party source). Neither FPC nor any of the Lazarus packages defines these.
Seems you are right.
procedure mulu64(a, b: QWORD; out clo, chi: QWORD); assembler;
asm
  mov rax, a
  mov rdx, b
  mul rdx
  mov [clo], rax
  mov [chi], rdx
end;