While upgrading a truckload of Delphi stuff for a client, I came across the IMPLICITBUILDING
directive in a few .dpk files that Delphi XE2 sometimes inserts but XE8 doesn’t.
This appears to be a Delphi XE2 specific thing that in younger Delphi versions has been solved properly SolarWind‘s answer on Stack Overflow:
The compiler directives which appear between the $IFDEF IMPLICITBUILDING and $ENDIF are normally passed as parameters by the compiler when explicitly compiling a package. Because these options change based on the configuration (debug / release) and target platform (Win32, Win64, OSX32) it’s problematic to have them statically defined in the package project source. When defined in the project source they will always override the options passed by the compiler. The $IFDEF prevents these options from being used during explicit compilation.
Source: Delphi XE2: What is the purpose of IMPLICITBUILDING directive found in package – Stack Overflow
and comment by Andreas Hausladen:
That seems to be a workaround for the problem that compiling packages with the msbuild script ignored all dproj compiler options because they were read from the dpk file by the compiler.
Some more references (I’ve saved them in the WayBack machine as the forums auto-expire posts):
- Embarcadero Discussion Forums: Why does Delphi change Indy’s dpk …
- https://forums.embarcadero.com/thread.jspa?threadID=61656 (has expired, could not save)
- Source: Embarcadero Discussion Forums: I would like Indy to not have Debug Info. How?…
–jeroen