[lld] 3bdeb2a - [lld] missing doc entry for error handling script

via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 3 02:16:14 PST 2020


Author: serge-sans-paille
Date: 2020-11-03T11:16:02+01:00
New Revision: 3bdeb2ac2efa66de795f161f2f8a1a90b7e49ac8

URL: https://github.com/llvm/llvm-project/commit/3bdeb2ac2efa66de795f161f2f8a1a90b7e49ac8
DIFF: https://github.com/llvm/llvm-project/commit/3bdeb2ac2efa66de795f161f2f8a1a90b7e49ac8.diff

LOG: [lld] missing doc entry for error handling script

Fix http://lab.llvm.org:8011/#/builders/69/builds/67

Added: 
    lld/docs/error_handling_script.rst

Modified: 
    

Removed: 
    


################################################################################
diff  --git a/lld/docs/error_handling_script.rst b/lld/docs/error_handling_script.rst
new file mode 100644
index 000000000000..30905cd00d58
--- /dev/null
+++ b/lld/docs/error_handling_script.rst
@@ -0,0 +1,35 @@
+=====================
+Error Handling Script
+=====================
+
+LLD provides the ability to hook into some error handling routines through a
+user-provided script specified with ``--error-handling-script=<path to the script>``
+when certain errors are encountered. This document specifies the requirements of
+such a script.
+
+Generic Requirements
+====================
+
+The script is expected to be available in the ``PATH`` or to be provided using a
+full path. It must be executable. It is executed in the same environment as the
+parent process.
+
+Arguments
+=========
+
+LLD calls the error handling script using the following arguments::
+
+    error-handling-script <tag> <tag-specific-arguments...>
+
+The following tags are supported:
+
+- ``missing-lib``: indicates that LLD failed to find a library. The library name
+  is specified as the second argument, e.g. ``error-handling-script missing-lib
+  mylib``
+
+Return Value
+============
+
+Upon success, the script is expected to return 0. A non-zero value is
+interpreted as an error and reported to the user. In both cases, LLD still
+reports the original error.


        


More information about the llvm-commits mailing list