[all-commits] [llvm/llvm-project] 21c24a: [runtimes] Always build libc++, libc++abi and libu...

Louis Dionne via All-commits all-commits at lists.llvm.org
Tue Jul 27 11:19:51 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 21c24ae9029a1fcd1c76b61b1c48b81b5c66c606
      https://github.com/llvm/llvm-project/commit/21c24ae9029a1fcd1c76b61b1c48b81b5c66c606
  Author: Louis Dionne <ldionne.2 at gmail.com>
  Date:   2021-07-27 (Tue, 27 Jul 2021)

  Changed paths:
    M libcxx/src/CMakeLists.txt
    M libcxxabi/src/CMakeLists.txt
    M libunwind/src/CMakeLists.txt

  Log Message:
  -----------
  [runtimes] Always build libc++, libc++abi and libunwind with -fPIC

Building the libraries with -fPIC ensures that we can link an executable
against the static libraries with -fPIE. Furthermore, there is apparently
basically no downside to building the libraries with position independent
code, since modern toolchains are sufficiently clever.

This commit enforces that we always build the runtime libraries with -fPIC.
This is another take on D104327, which instead makes the decision of whether
to build with -fPIC or not to the build script that drives the runtimes'
build.

Fixes http://llvm.org/PR43604.

Differential Revision: https://reviews.llvm.org/D104328




More information about the All-commits mailing list