mirror of
https://github.com/leejet/stable-diffusion.cpp.git
synced 2026-11-11 11:26:34 +00:00
fix(cmake): build HIP backend with PIC so the static-lib PIE link succeeds (#1593)
This commit is contained in:
1 parent
02f06370a7
commit
7948df8ac1
1 file changed
+6
@@ -125,6 +125,12 @@ endif ()
|
|||||||
if (SD_HIPBLAS)
|
if (SD_HIPBLAS)
|
||||||
message("-- Use HIPBLAS as backend stable-diffusion")
|
message("-- Use HIPBLAS as backend stable-diffusion")
|
||||||
set(GGML_HIP ON)
|
set(GGML_HIP ON)
|
||||||
|
# ggml-hip's device-stub objects must be position-independent, or the
|
||||||
|
# default-PIE sd-cli link fails with `relocation R_X86_64_32 ... cannot be
|
||||||
|
# used when making a PIE object` on distros that default to PIE
|
||||||
|
# (Ubuntu 24.04, Fedora 40+, Debian 12+). The shared-library branch below
|
||||||
|
# already sets this; the static build (the HIP default) did not.
|
||||||
|
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if(SD_MUSA)
|
if(SD_MUSA)
|
||||||
|
|||||||
Reference in new issue
Block a user