Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is the executable produced by Delphi 2009 IDE different to that produced on the command line?

I'm producing builds using MSBuild, and build configurations set up in the dproj on the command line. It's slightly disconcerting that the size of the executables thus produced are different (not by much, but still!) to what an IDE build produces. Any ideas why? I would have thought the same compiler is used?

like image 709
Steve Avatar asked May 22 '09 11:05

Steve


3 Answers

The main power of building from the Delphi command-line compiler is standardization - you explicitly identify the options (on the command line, in the .cfg files, etc), and the compiler follows the options provided exclusively. In contrast, the IDE has many other behaviors that are not clear and explicit - for example, it may search library paths not specified in the Project Options. My guess is that something's happening in the IDE build of which you're not entirely aware - and this is why standardized builds are done from the command line.

like image 90
Argalatyr Avatar answered Nov 18 '22 05:11

Argalatyr


To see what IDE is doind, check

Tools | Options | Environment Options | Compiling and Running | Show Command Line

And you can check the compiler messages.

like image 37
Cesar Romero Avatar answered Nov 18 '22 05:11

Cesar Romero


The first answer on using the command line for build consistency is right on and it is probably something you needn't worry about if you are relying on a build system where production files are always sourced from the console builds.

On the other hand, if you really do want to figure out what is going on you should turn on map files (at the full detail level) and compare/diff them. If there are differences between the two they will show up there. Any other differences that may exist are likely a result of a commmand line option being different (such as a conditional flag that may be set in the IDE settings).

like image 3
Ryan VanIderstine Avatar answered Nov 18 '22 05:11

Ryan VanIderstine