# gollvm: -fPIC is not supported, if using ld or lld, with Clang++

**URL:** <https://discourse.cmake.org/t/gollvm-fpic-is-not-supported-if-using-ld-or-lld-with-clang/1921>\
**Category:** Code\
**Created:** [September 26, 2020, 4:07pm UTC](https://discourse.cmake.org/t/gollvm-fpic-is-not-supported-if-using-ld-or-lld-with-clang/1921 "2020-09-26T16:07:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ivan\_Serdyuk](https://discourse.cmake.org/user_avatar/discourse.cmake.org/ivan_serdyuk/32/217_2.png) [@Ivan\_Serdyuk](https://discourse.cmake.org/u/Ivan_Serdyuk)\
**Post date:** [September 26, 2020, 4:07pm UTC](https://discourse.cmake.org/t/gollvm-fpic-is-not-supported-if-using-ld-or-lld-with-clang/1921/1 "2020-09-26T16:07:15Z")

</div>

It appears that there is a misconfigured CMake file, for gollvm project.

[https://github.com/golang/go/issues/41527](https://github.com/golang/go/issues/41527) - this is my description.

So to be short: there is a confusing warning, not proven by build attempts or release experiments: some linker are reported to no being supported. Even if so - it is not clear what is the case.  
Probably updating CMake configs could have more sense, for supporting lld.

Ivan

---

<div class="post-metadata">

**Author:** ![Ivan\_Serdyuk](https://discourse.cmake.org/user_avatar/discourse.cmake.org/ivan_serdyuk/32/217_2.png) [@Ivan\_Serdyuk](https://discourse.cmake.org/u/Ivan_Serdyuk)\
**Post date:** [September 26, 2020, 4:09pm UTC](https://discourse.cmake.org/t/gollvm-fpic-is-not-supported-if-using-ld-or-lld-with-clang/1921/2 "2020-09-26T16:09:17Z")

</div>

[https://github.com/golang/go/files/5256185/fpic\_bug\_with-lld.zip](https://github.com/golang/go/files/5256185/fpic_bug_with-lld.zip)

This archive contains generated files, for the of lld linker.

Ivan
