premake / premake-core

Premake
https://premake.github.io/
BSD 3-Clause "New" or "Revised" License
3.13k stars 611 forks source link

How to modify the Clang executable value via CLI? #2159

Closed GasimGasimzada closed 6 months ago

GasimGasimzada commented 7 months ago

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.

Jarod42 commented 7 months ago

(Merged) https://github.com/premake/premake-core/pull/2113 should allow to select toolset version with -cc=clang-16.