lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hello,

This is how Omnia determines the compiler:
https://github.com/tongson/omnia/blob/master/lib/configure/test-cc.sh

Checks for Clang then everything else is GCC.

Good luck.


On Mon, Jul 16, 2018 at 3:48 AM, Sarah <morningcrafter0603@gmail.com> wrote:
> I am writing a build script in Lua for my language and I need to find
> out if the user has either Clang or GCC installed. My first idea was
> to run os.execute("clang") and check the return code, but clang just
> errors straight to the console.
>
> I don't want to search through directories to detect compilers as it
> is quite an overhead for a build script. Any ideas on how I could
> solve this issue?
>