sci-misc/llama-cpp: introduce lto USE flag

Signed-off-by: Michael Egger <egger.m@protonmail.com>
This commit is contained in:
Michael Egger
2026-05-22 20:28:35 +02:00
parent 27205a89af
commit 91f8575242
2 changed files with 3 additions and 1 deletions

View File

@@ -40,7 +40,7 @@ SLOT="0"
CPU_FLAGS_X86=( avx avx2 f16c )
# wwma USE explained here: https://github.com/ggml-org/llama.cpp/blob/master/docs/build.md#hip
IUSE="curl openblas +openmp blis rocm cuda opencl openssl vulkan flexiblas wmma webui examples"
IUSE="curl openblas +openmp blis rocm cuda opencl openssl vulkan flexiblas wmma webui lto examples"
REQUIRED_USE="
?? (
@@ -123,6 +123,7 @@ src_configure() {
-DLLAMA_BUILD_SERVER=ON
-DCMAKE_SKIP_BUILD_RPATH=ON
-DGGML_NATIVE=0 # don't set march
-DGGML_LTO=$(usex lto)
-DGGML_RPC=ON
-DLLAMA_CURL=$(usex curl)
-DLLAMA_OPENSSL=$(usex openssl)

View File

@@ -14,6 +14,7 @@
<flag name="opencl">Build an OpenCL backend, so far only works on Adreno and Intel GPUs</flag>
<flag name="openssl">Use openssl to support HTTPS</flag>
<flag name="webui">Enable prebuilt Web UI</flag>
<flag name="lto">Build using Link Time Optimizations</flag>
</use>
<maintainer type="person">
<email>zl29ah@gmail.com</email>