[llvm-c] Copyright notice in language bindings

Hi,

If I write LLVM bindings for a language X, in which I obviously
need to at least use parts of the llvm-c headers (constants, enums, typedefs, function names and
signatures) do I need to include the LLVM copyright notice?

Whereas llvm-c has multiple headers (e.g. Analysis.h, BitReader.h, Core.h, etc.) my bindings
only have three files constants.d, types.d and functions.d which respectively contain all
of the previously mentioned parts.
This means I can't just copy-paste the copyright notice from the llvm-c headers
and add LLVM's license.txt as these header license notices contain the headers' filenames
(which do not translate to my bindings).
So the most sensible thing would be to put the complete LLVM license at the top of
those three files - if that is necessary; I'm not sure if it is, though, because since I'm not
copy-pasting the code but adapting it to another language it may not strictly count as redistributing
- especially since I don't copy any of LLVM's algorithms, but *only* the C API itself.

Any help regarding this would be appreciated, because I have finished writing
the bindings but do not risk publishing them without a correct copyright notice if it is
needed.

Thank you for your time,
     Moritz

Hi Moritz,

LLVM's license includes a binary redistribution clause:
http://llvm.org/docs/DeveloperPolicy.html#license

Including a note in the documentation that ships with your product (or something similar) is enough, but you do need to acknowledge that you use llvm.

-Chris

Hi Chris, the problem with the binary redistribution clause is that the bindings will not be linked with any part of LLVM. The bindings will load an LLVM shared library (dll/so/dylib) at runtime and thus an application compiled with said bindings will contain no binary of LLVM (as these will seperately resign in the shared library, which itself has to be distributed together with the license of course, but that is not of a concern to the bindings, as they will not provide this shared library) so as far as I can tell the clause would not apply. Another point is that the binding themselves don’t do anything other than interfacing with LLVM and are only provided in source code. The binary redistribution clause would only apply to people then in return using these bindings to access LLVM. Would something like this be appropriate then (README.md resides in the bindings’ root folder), seeing as there is no binary being distributed? – Moritz

Hi Chris, the problem with the binary redistribution clause is that the bindings will not be linked with any part of LLVM. The bindings will load an LLVM shared library (dll/so/dylib) at runtime and thus an application compiled with said bindings will contain no binary of LLVM (as these will seperately resign in the shared library, which itself has to be distributed together with the license of course, but that is not of a concern to the bindings, as they will not provide this shared library) so as far as I can tell the clause would not apply. Another point is that the binding themselves don’t do anything other than interfacing with LLVM and are only provided in source code. The binary redistribution clause would only apply to people then in return using these bindings to access LLVM.

The license is very clear: obviously the dynamic library that is loaded would have to carry the notice somehow.

If you consider inclusion of symbol names into the application binary to be a “redistribution in binary form” of LLVM, then your application would need to carry the notice. I would recommend either consulting with a lawyer to decide whether that is the case, or to just include it to be safe.

Would something like this be appropriate then (README.md resides in the bindings’ root folder),

Something like that is fine, but you need to include the copyright notice as stated in the license. I’m not going to weigh in on whether (or not) the binary is being distributed in your case, check with a lawyer.

-Chris

Hi again,

I just finished putting the README.md together and I would like to know if there’s anything
relevant to LLVM’S copyright notice/license that I overlooked:

License

llvm-d is released under the MIT license, see LICENSE.txt
or here for details. llvm-d uses code fragments from LLVM’s C API headers to provide its bindings to LLVM. The above paragraph does not apply to these code fragments, instead the following two paragraphs apply to them: LLVM is Copyright (c) 2003-2013 University of Illinois at Urbana-Champaign. All rights reserved. LLVM is distributed under the University of Illinois Open Source License. See for details.

Thank you again for your time,

– Moritz