premake / premake-core

Premake

Home Page:https://premake.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to modify the Clang executable value via CLI?

GasimGasimzada opened this issue · comments

What's your question?

I am installing LLVM using the llvm.sh file:

./llvm.sh 16 all

This creates versioned executables for clang and clang++ files: clang-16 and clang++-16 respectively. Is there a way to define the version in premake5 via CLI. Currently, I am setting the toolset using --cc flag:

premake5 --cc=clang gmake

and manually creating a link for clang that points to the default version:

sudo update-alternatives /usr/bin/clang clang /usr/bin/clang-16 0
sudo update-alternatives /usr/bin/clang++ clang++ /usr/bin/clang++-16 0

But I would rather use premake for this without modifying executable paths. Is there any way to set these values? I tried ot use --cc=clang-16 but it says the value is invalid.

(Merged) #2113 should allow to select toolset version with -cc=clang-16.