Recent

Author Topic: What are the text mode equivalents of build modes?  (Read 3369 times)

vfclists

  • Hero Member
  • *****
  • Posts: 1165
    • HowTos Considered Harmful?
What are the text mode equivalents of build modes?
« on: July 10, 2014, 04:35:18 pm »
What kind of compiler and linker commands to build modes generate?

Is it possible to use build modes in source code only, thus making them easier to compare?

In fact I would like to know how IDE settings in general get translated to compiling and linking commands.

Does it all go into ppas.bat?
« Last Edit: July 10, 2014, 04:39:28 pm by vfclists »
Lazarus 3.0/FPC 3.2.2

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12944
  • FPC developer.
Re: What are the text mode equivalents of build modes?
« Reply #1 on: July 10, 2014, 05:30:11 pm »
ppas.bat is generated by the compiler.

Buildmodes is a pure Lazarus concept. So both are unrelated.

Probably you can access buildmodes commandline using lazbuild, but that might only be for running, not editing.


Leledumbo

  • Hero Member
  • *****
  • Posts: 8836
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: What are the text mode equivalents of build modes?
« Reply #2 on: July 10, 2014, 05:39:13 pm »
Quote
What kind of compiler and linker commands to build modes generate?
None, build modes are IDE concept. The compiler knows nothing about it.
Quote
Is it possible to use build modes in source code only, thus making them easier to compare?
I don't quite understand what you mean.
Quote
In fact I would like to know how IDE settings in general get translated to compiling and linking commands.
Each settings represent a compiler option, the IDE simply concat and pass them to the compiler. We normally don't need to call the linker manually, the compiler will do that automatically, both for internal and external linker. There are compiler options for controlling what to pass to the linker, though.
Quote
Does it all go into ppas.bat?
AFAIK this file is only generated when "omit linking stage" (or the less "Do not call assembler and linker) option is given, to allow manual modification before building the executable.

vfclists

  • Hero Member
  • *****
  • Posts: 1165
    • HowTos Considered Harmful?
Re: What are the text mode equivalents of build modes?
« Reply #3 on: July 11, 2014, 08:45:55 pm »
ppas.bat is generated by the compiler.

Buildmodes is a pure Lazarus concept. So both are unrelated.

Probably you can access buildmodes commandline using lazbuild, but that might only be for running, not editing.

Does the IDE have an option to generate lazbuild commands which can be saved as a file and executed as needed, or does it create a file for the last build which remains  until overwritten by the next build?

On a general note can the IDE compiling commands be saved to files and executed?
Lazarus 3.0/FPC 3.2.2

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4718
  • I like bugs.
Re: What are the text mode equivalents of build modes?
« Reply #4 on: July 11, 2014, 11:11:29 pm »
Lazarus trunk now has a feature of building many buildmodes at one go. See Run -> Build many Modes ...

Generated options for the current mode can be seen from Project options -> "Show Options" button (at bottom of the dialog). There select the text and copy.

If you want to compare the modes in textual form, it is possible because they are stored in XML files. The default location is the project .lpi file which has XML format.
A mode is stored in session .lps file if the Build Mode Manager window (on top of project options) has "In session" checked for that mode. The session .lps file has a similar XML format.
Now in trunk you can also export many modes to an XML file of your choice. See Project options -> Export (at bottom of the dialog).

This is not exactly what you wanted but close.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

 

TinyPortal © 2005-2018