Merge pull request #223 from mz2/fpic-fix
Fix CUDA linking error by ensuring -fPIC for position-independent code
This commit is contained in:
commit
35adcfdbb3
1 changed files with 2 additions and 0 deletions
|
|
@ -175,6 +175,8 @@ fn main() {
|
||||||
|
|
||||||
if cfg!(feature = "cuda") {
|
if cfg!(feature = "cuda") {
|
||||||
config.define("GGML_CUDA", "ON");
|
config.define("GGML_CUDA", "ON");
|
||||||
|
config.define("CMAKE_POSITION_INDEPENDENT_CODE", "ON");
|
||||||
|
config.define("CMAKE_CUDA_FLAGS", "-Xcompiler=-fPIC");
|
||||||
}
|
}
|
||||||
|
|
||||||
if cfg!(feature = "hipblas") {
|
if cfg!(feature = "hipblas") {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue