[libcxx-commits] [PATCH] D104328: [libc++] Always build libc++ and libc++abi with -fPIC

James Nagurne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Jul 30 12:31:35 PDT 2021


JamesNagurne added a comment.

Hi all,

This change has broken my team's downstream validations which utilize the ARM backend.

Specifically, our linker has a method to choose the most correct library to link against, given a sort of binary 'specification' pseudo-library that maps the qualities of a compilation to a particular real library.
One of these qualities is PIC.

Our runtimes build cache file already had to set the following variables to OFF to avoid building runtimes (specifically, using llvm/runtimes to build with just-built compiler) with PIC:

- CMAKE_POSITION_INDEPENDENT_CODE
- LLVM_ENABLE_PIC
- LIBCXXABI_ENABLE_PIC (Deleted recently)
- COMPILER_RT_BUILTINS_ENABLE_PIC

I do also vaguely recall having to make a downstream change to a configuration file so that -fPIC wasn't unconditionally added to some compilation commands

I note that @MaskRay asks why a toolchain would turn PIC support off for runtimes. For our team, the decision is historical (we are moving away from a proprietary backend and library), and may certainly need to be reviewed. However, I'm slightly frustrated by the number of things our team has to do to avoid something that, in my eyes, seems to be amenable to configuration customization.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D104328/new/

https://reviews.llvm.org/D104328



More information about the libcxx-commits mailing list