[llvm] [Docs][LTO] Updated HowToSubmitABug.rst for LTO crashes (PR #68389)

Matheus Izvekov via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 6 00:39:40 PDT 2023


================
@@ -153,6 +153,57 @@ Please run this, then file a bug with the instructions and reduced .bc file
 that bugpoint emits.  If something goes wrong with bugpoint, please submit
 the "foo.bc" file and the option that llc crashes with.
 
+​.. _lto-crash:
+
+LTO bugs
+---------------------------
+
+If you find a bug that crashes llvm in LTO phase (by using -flto option),
+compile your source file to a .bc file by passing
+"``-flto -fuse-ld=lld -Wl,-plugin-opt=save-temps``"
+to clang (in addition to the options you already pass). If you are building
+a project, pass the appropriate CFLAGS, CXXFLAG​S and LDFLAGS for example -
+
+.. code-block:: bash
+
+   export CFLAGS="-flto -fuse-ld=lld" CXXFLAGS="-flto -fuse-ld=lld" LDFLAGS="-Wl,-plugin-opt=save-temps"
----------------
mizvekov wrote:

Would be nice if this covered the clang-cl / lld-link case as well.

https://github.com/llvm/llvm-project/pull/68389


More information about the llvm-commits mailing list