[all-commits] [llvm/llvm-project] cfc322: Provide a hook to customize missing library error ...

serge-sans-paille via All-commits all-commits at lists.llvm.org
Tue Nov 3 02:06:26 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: cfc32267e27f77211ee5eb6e30c52ab2c7740e6e
      https://github.com/llvm/llvm-project/commit/cfc32267e27f77211ee5eb6e30c52ab2c7740e6e
  Author: serge-sans-paille <sguelton at redhat.com>
  Date:   2020-11-03 (Tue, 03 Nov 2020)

  Changed paths:
    M lld/Common/ErrorHandler.cpp
    M lld/ELF/Driver.cpp
    M lld/ELF/Options.td
    M lld/docs/ReleaseNotes.rst
    M lld/docs/index.rst
    M lld/docs/ld.lld.1
    M lld/include/lld/Common/ErrorHandler.h
    A lld/test/ELF/error-handling-script-linux.test
    A lld/test/ELF/error-handling-script-windows.bat
    M lld/test/ELF/lit.local.cfg

  Log Message:
  -----------
  Provide a hook to customize missing library error handling

Make it possible for lld users to provide a custom script that would help to
find missing libraries. A possible scenario could be:

    % clang /tmp/a.c -fuse-ld=lld -loauth -Wl,--error-handling-script=/tmp/addLibrary.py
    unable to find library -loauth
    looking for relevant packages to provides that library

        liboauth-0.9.7-4.el7.i686
        liboauth-devel-0.9.7-4.el7.i686
        liboauth-0.9.7-4.el7.x86_64
        liboauth-devel-0.9.7-4.el7.x86_64
        pix-1.6.1-3.el7.x86_64

Where addLibrary would be called with the missing library name as first argument
(in that case addLibrary.py oauth)

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




More information about the All-commits mailing list