Build Delphi Action -- consider adding "16" for record field alignment compiler option (default for Linux64)

This is obscure, and I’m mostly posting here in case someone else runs into a similar issue because there is a work-around.

We have a project where we made a slight change to one of the Delphi VCL source files (gasp). This modified file is included in the project. When attempting to build the project for Linux64 with the Build Delphi Action, the compiler error that was generated reported it could not find another VCL source file. This has me looking at the directories for an entire day, but that was not the issue. The default $A compiler switch for Linux64 is $A16. The setting coming from the action was $A8, which triggered an attempt to recompile the other VCL source file(s) since the binary in the "$(BDSLIB)$(Platform)\release " folder was not compatible.

The work-around was to add an {$IF DEFINED(LINUX64)} {$A16} {$ENDIF} to the modified VCL source file in our project.

If someone else reports what appears to be a directory issue compiling a Linux64 project, this might be what is happening.

Hi Wynn

Thanks for the info, I have added A16 support to the action for the next update.

The delphi dcu format is incredibly fragile, seemingly minor changes in one unit (such as a compiler option) can completely break dcu compatibility… it’s an issue we have seen many times over the last 20+ years! I do wish they would move to a IL format that has better forwards compatibility but given the lack of resources at embarcadero these days I can’t see that happening.

1 Like