[all-commits] [llvm/llvm-project] fd0ab3: [lldb] Pass -fPIC flag even when DYLIB_ONLY is set

Raphael Isemann via All-commits all-commits at lists.llvm.org
Sat May 30 09:05:48 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: fd0ab3b3eb88de3fe4792c34b50084595e22d68d
      https://github.com/llvm/llvm-project/commit/fd0ab3b3eb88de3fe4792c34b50084595e22d68d
  Author: Raphael Isemann <teemperor at gmail.com>
  Date:   2020-05-30 (Sat, 30 May 2020)

  Changed paths:
    M lldb/packages/Python/lldbsuite/test/make/Makefile.rules

  Log Message:
  -----------
  [lldb] Pass -fPIC flag even when DYLIB_ONLY is set

Summary:
It seems that when we rewrite a few rules to only build a dylib (i.e., when DYLIB_ONLY is set),
the rule for setting the CFLAGS for the dylib's object file compilation will no longer work. From what I can
see this is because in DYLIB_ONLY mode we pretend to compile the main executable so
the DYLIB_OBJECTS scope is actually never used.

This patch makes `-fPIC` unstopped if DYLIB_ONLY is set so that -fPIC actually ends up in the
CFLAGS for the dylib object file compilation.

The test for this is D80798 which only compiles on Linux with this patch.

Reviewers: friss, labath

Reviewed By: friss

Subscribers: JDevlieghere

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




More information about the All-commits mailing list