Dear LLVM community!
I’m new to the community, thank you for the community membership acceptance!
I’m used to developing some apps in C/C++ with GNU GCC (and Windows’ port, minGW), and, as far as I know, your LLVM Clang compiler is rather similar (in usage) to the minGW. I have downloaded it recently on my Windows computer, used “clang” instead of “g++” foa a simple C++ app, and it worked. Of course, things are not that simple for an entire application.
I’m creating an application that needs a compiler in order to run, since its structure (topology) is dynamic (parts are user-defined during program execution).
Therefore, my topic is a rather simple one, and I’m sure you can give me an answer:
- may I ship the LLVM Clang compiler/toolchain within my C++ application (probably created with an IDE, possibly with another compiler (not decided yet)) ?
To further explain: I’m creating an app (.exe) which includes a GUI and performs things, such as simulation. But, for user-defined components (typically, console interfacing with the user), he/she will need to define either a function or a class… Thereby requiring the presence of a compiler / toolchain on his/her computer → otherwise the functionality will not work (the structure, or topology, must be dynamic - here I mean, not OOP only (e.g., selecting from a limited number of classes to create objects), since the user is supposed to define his/her own class at runtime - during program execution/usage). The structure should be dynamic (and fast - otherwise I would have tried Python).
The portions of C/C++ code that the user might create (or the application will automatically generate for him/her) will be compiled either to .dll (then, attached to my shipped large .exe), or to a standalone (small) executable → to perform the program’s task, i.e. to simulate a process.
I know that LLVM Clang (C++) compiler, as toolchain for Windows, is a free tool. But, may I ship / distribute it together with my app (within a subfolder of my app) ? I’m not very accustomed to reading software licenses, to be honest (portions of the clauses I might not fully comprehend (what I may, what I may not)). However, from what I have read so far on your website, I found that the rather permissive license would practically allow me to do that (to ship/redistribute the Clang C++ compiler). This is what sets you apart (in a far better way) than other compilers (if I understood correctly, reading the license section of the compiler/toolchain).
Essentially, the (main) app I’m shipping (which may be built with Intel C++ or not - I do not know now at this point) should remain closed – source, because there will be some IP associated with the tool I’m developing. This app will create the .cpp codes that the user, at a push of a button, will trigger, under the hood, the compiler/toolchain invoking, in order to obtain:
- either a .dll to be attached to the shipped .exe,
- or a standalone executable, that will be run as an external process by the shipped (application) .exe.
Of course, I can mention that parts of the software tool I’m creating are built using LLVM Clang C/C++ compiler → in the readme.txt file, also in the Help/About, in the documentation etc.
Hence, under these conditions, may I ship the LLVM Clang C++ compiler with my application, as a subfolder of the installation folder ?
Thank you for your answer and your support!
P.S. As I’m new to your forum and community, please accept my apologies for potentially having post the question/topic on a wrong category.