Licensing of PGO instrumented code.

Johan Engelen via digitalmars-d-ldc digitalmars-d-ldc at puremagic.com
Thu Sep 15 15:23:38 PDT 2016


Hi all,
   I just discovered an important licensing issue with the use of 
LLVM compiler-rt's code for _instrumenting_ code for PGO. The 
problem is that with -fprofile-instr-generate, we link with a 
piece of LLVM's compiler-rt code. The compiler-rt license reads:
"Redistributions in binary form must reproduce the above 
copyright notice, this list of conditions and the following 
disclaimer in the documentation and/or other materials provided 
with the distribution."

Basically, a program compiled with `-fprofile-instr-generate` 
will have a piece of compiler-rt inside of it, and redistributing 
that file will need to be accompanied with the compiler-rt 
license and the other requirements.

Important note: this does not concern programs compiled with 
`-fprofile-instr-use`. So only PGO instrumented binaries need the 
compiler-rt license when distributed, not PGO optimized binaries. 
In practice, I think it is rare to distribute instrumented 
binaries, but not unthinkable.

There is currently an LLVM discussion about relicensing 
compiler-rt to allow unattributed binary form distribution, to 
solve this problem as far as I understand.
http://lists.llvm.org/pipermail/llvm-dev/2016-September/104778.html

How do we address this issue?

(I think we need to have information on this ASAP in our LICENSE 
file. Tomorrow, I will work on it.)

-Johan



More information about the digitalmars-d-ldc mailing list