Is the Delphi runtime code open-source or not?

| | August 6, 2015

In this question I’ve called the Delphi runtime source code “open source”, simply because it’s open. Others disagree with this because Delphi itself is a commercial product. According to Wikipedia, open source must comply to a set of rules.

I’ve done a quick scan in the Delphi license but can’t find a clear note about it’s licensing status. It does have a compiler-directive called DECLARE_GPL in system.pas which is the root for all other Delphi units. The system unit is the only unit that you don’t need to add to your units since it’s automatically added. Thus, if system.pas is GPL, anything that uses it would be GPL too! But Delphi is providing a dual-license for these source files so people could choose not to use the GPL license.

Still, if the Delphi source code is available and it supports the GPL, even though it also has a secondary license which could be applied too, would the Delphi runtime source code be open-source or not?

From system.pas of Delphi 2007:

(* The existence of the GPL symbol indicates that the System unit and the rest of the Delphi runtime library were compiled for use and distribution under the terms of the GNU General Public License (GPL).
Under the terms of the GPL, all applications compiled with the GPL version of the Delphi runtime library must also be distributed under the terms of the GPL. For more information about the GNU GPL, see

The GPL symbol does not exist in the Delphi runtime library purchased for commercial/proprietary software development.

If your source code needs to know which licensing model it is being compiled into, you can use {$IF DECLARED(GPL)}…{$IFEND} to test for the existence of the GPL symbol. The value of the symbol itself is not significant. *)

Especially this text inside the source makes me doubt about the license. If it’s distributable as GPL, doesn’t this mean it’s also open-source?

2 Responses to “Is the Delphi runtime code open-source or not?”

  1. Jeroen Wiert Pluimers on November 30, -0001 @ 12:00 AM

    In the Kylix era, the CLX library became available in a dual-license mode. The free version was called FreeCLX, and contained the parts BaseCLX, VisualCLX and DataCLX.

    • Note that NetCLX was never available under open source license.
    • You still can get the open-source licensed FreeCLX from the FreeCLX project on sourceforge.

    All changes since Kylix 3.0 made on the Delphi side, and all VCL things that are not part of CLX have never been available under an open-source license form.

    Though big parts of the VCL are available on for instance Koders, they are in fact illegal copies.

  2. Tobias Langner on November 30, -0001 @ 12:00 AM

    No – it’s not open source. You may take a look at it if you own delphi but that’s it. For my version it says:

    { *********************************************************************** }
    {                                                                         }
    { Delphi / Kylix Cross-Platform Runtime Library                           }
    { System Utilities Unit                                                   }
    {                                                                         }
    { Copyright (c) 1995-2005 Borland Software Corporation                    }
    {                                                                         }
    { Copyright and license exceptions noted in source                        }
    {                                                                         }
    { *********************************************************************** }

    It may contain open-source where there are license exceptions though. If you want to have an open-source version, check out free pascal (

    Borland is the holder of the copyright, so they may license it under different licenses (see for examplel the dual licensing model of MySQL or QT). The part of systems.pas you posted suggests, that they have done so in the past.

    There seems to be a GPL-version of systems.pas, that defines the GPL-symbol. If you write a program using this version, due to the infective nature of the GPL, the code you write has to be placed under the GPL as well. If you bought the commercial version, you have a different license and you do not need to place your code under the GPL.

    I can only guess which version of the Delphi IDE has the GPLed systems.pas. If I’d had to, I’d guess Kylix for Linux (perhaps for Windows as well).

Leave a Reply