452 lines
25 KiB
HTML
452 lines
25 KiB
HTML
<!DOCTYPE HTML>
|
|
<html lang="en" class="light sidebar-visible" dir="ltr">
|
|
<head>
|
|
<!-- Book generated using mdBook -->
|
|
<meta charset="UTF-8">
|
|
<title>Debugging LLVM - Rust Compiler Development Guide</title>
|
|
|
|
|
|
<!-- Custom HTML head -->
|
|
|
|
<meta name="description" content="A guide to developing the Rust compiler (rustc)">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<meta name="theme-color" content="#ffffff">
|
|
|
|
<link rel="icon" href="../favicon.svg">
|
|
<link rel="shortcut icon" href="../favicon.png">
|
|
<link rel="stylesheet" href="../css/variables.css">
|
|
<link rel="stylesheet" href="../css/general.css">
|
|
<link rel="stylesheet" href="../css/chrome.css">
|
|
<link rel="stylesheet" href="../css/print.css" media="print">
|
|
|
|
<!-- Fonts -->
|
|
<link rel="stylesheet" href="../FontAwesome/css/font-awesome.css">
|
|
<link rel="stylesheet" href="../fonts/fonts.css">
|
|
|
|
<!-- Highlight.js Stylesheets -->
|
|
<link rel="stylesheet" id="highlight-css" href="../highlight.css">
|
|
<link rel="stylesheet" id="tomorrow-night-css" href="../tomorrow-night.css">
|
|
<link rel="stylesheet" id="ayu-highlight-css" href="../ayu-highlight.css">
|
|
|
|
<!-- Custom theme stylesheets -->
|
|
|
|
|
|
<!-- Provide site root and default themes to javascript -->
|
|
<script>
|
|
const path_to_root = "../";
|
|
const default_light_theme = "light";
|
|
const default_dark_theme = "navy";
|
|
</script>
|
|
<!-- Start loading toc.js asap -->
|
|
<script src="../toc.js"></script>
|
|
</head>
|
|
<body>
|
|
<div id="body-container">
|
|
<!-- Work around some values being stored in localStorage wrapped in quotes -->
|
|
<script>
|
|
try {
|
|
let theme = localStorage.getItem('mdbook-theme');
|
|
let sidebar = localStorage.getItem('mdbook-sidebar');
|
|
|
|
if (theme.startsWith('"') && theme.endsWith('"')) {
|
|
localStorage.setItem('mdbook-theme', theme.slice(1, theme.length - 1));
|
|
}
|
|
|
|
if (sidebar.startsWith('"') && sidebar.endsWith('"')) {
|
|
localStorage.setItem('mdbook-sidebar', sidebar.slice(1, sidebar.length - 1));
|
|
}
|
|
} catch (e) { }
|
|
</script>
|
|
|
|
<!-- Set the theme before any content is loaded, prevents flash -->
|
|
<script>
|
|
const default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? default_dark_theme : default_light_theme;
|
|
let theme;
|
|
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
|
|
if (theme === null || theme === undefined) { theme = default_theme; }
|
|
const html = document.documentElement;
|
|
html.classList.remove('light')
|
|
html.classList.add(theme);
|
|
html.classList.add("js");
|
|
</script>
|
|
|
|
<input type="checkbox" id="sidebar-toggle-anchor" class="hidden">
|
|
|
|
<!-- Hide / unhide sidebar before it is displayed -->
|
|
<script>
|
|
let sidebar = null;
|
|
const sidebar_toggle = document.getElementById("sidebar-toggle-anchor");
|
|
if (document.body.clientWidth >= 1080) {
|
|
try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { }
|
|
sidebar = sidebar || 'visible';
|
|
} else {
|
|
sidebar = 'hidden';
|
|
}
|
|
sidebar_toggle.checked = sidebar === 'visible';
|
|
html.classList.remove('sidebar-visible');
|
|
html.classList.add("sidebar-" + sidebar);
|
|
</script>
|
|
|
|
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
|
|
<!-- populated by js -->
|
|
<mdbook-sidebar-scrollbox class="sidebar-scrollbox"></mdbook-sidebar-scrollbox>
|
|
<noscript>
|
|
<iframe class="sidebar-iframe-outer" src="../toc.html"></iframe>
|
|
</noscript>
|
|
<div id="sidebar-resize-handle" class="sidebar-resize-handle">
|
|
<div class="sidebar-resize-indicator"></div>
|
|
</div>
|
|
</nav>
|
|
|
|
<div id="page-wrapper" class="page-wrapper">
|
|
|
|
<div class="page">
|
|
<div id="menu-bar-hover-placeholder"></div>
|
|
<div id="menu-bar" class="menu-bar sticky">
|
|
<div class="left-buttons">
|
|
<label id="sidebar-toggle" class="icon-button" for="sidebar-toggle-anchor" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
|
|
<i class="fa fa-bars"></i>
|
|
</label>
|
|
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
|
|
<i class="fa fa-paint-brush"></i>
|
|
</button>
|
|
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
|
|
<li role="none"><button role="menuitem" class="theme" id="default_theme">Auto</button></li>
|
|
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
|
|
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
|
|
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
|
|
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
|
|
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
|
|
</ul>
|
|
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
|
|
<i class="fa fa-search"></i>
|
|
</button>
|
|
</div>
|
|
|
|
<h1 class="menu-title">Rust Compiler Development Guide</h1>
|
|
|
|
<div class="right-buttons">
|
|
<a href="../print.html" title="Print this book" aria-label="Print this book">
|
|
<i id="print-button" class="fa fa-print"></i>
|
|
</a>
|
|
<a href="https://github.com/rust-lang/rustc-dev-guide" title="Git repository" aria-label="Git repository">
|
|
<i id="git-repository-button" class="fa fa-github"></i>
|
|
</a>
|
|
<a href="https://github.com/rust-lang/rustc-dev-guide/edit/master/src/backend/debugging.md" title="Suggest an edit" aria-label="Suggest an edit">
|
|
<i id="git-edit-button" class="fa fa-edit"></i>
|
|
</a>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div id="search-wrapper" class="hidden">
|
|
<form id="searchbar-outer" class="searchbar-outer">
|
|
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
|
|
</form>
|
|
<div id="searchresults-outer" class="searchresults-outer hidden">
|
|
<div id="searchresults-header" class="searchresults-header"></div>
|
|
<ul id="searchresults">
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
|
|
<script>
|
|
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
|
|
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
|
|
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
|
|
link.setAttribute('tabIndex', sidebar === 'visible' ? 0 : -1);
|
|
});
|
|
</script>
|
|
|
|
<div id="content" class="content">
|
|
<main>
|
|
<h2 id="debugging-llvm"><a class="header" href="#debugging-llvm">Debugging LLVM</a></h2>
|
|
<blockquote>
|
|
<p>NOTE: If you are looking for info about code generation, please see <a href="./codegen.html">this
|
|
chapter</a> instead.</p>
|
|
</blockquote>
|
|
<p>This section is about debugging compiler bugs in code generation (e.g. why the
|
|
compiler generated some piece of code or crashed in LLVM). LLVM is a big
|
|
project on its own that probably needs to have its own debugging document (not
|
|
that I could find one). But here are some tips that are important in a rustc
|
|
context:</p>
|
|
<h3 id="minimize-the-example"><a class="header" href="#minimize-the-example">Minimize the example</a></h3>
|
|
<p>As a general rule, compilers generate lots of information from analyzing code.
|
|
Thus, a useful first step is usually to find a minimal example. One way to do
|
|
this is to</p>
|
|
<ol>
|
|
<li>
|
|
<p>create a new crate that reproduces the issue (e.g. adding whatever crate is
|
|
at fault as a dependency, and using it from there)</p>
|
|
</li>
|
|
<li>
|
|
<p>minimize the crate by removing external dependencies; that is, moving
|
|
everything relevant to the new crate</p>
|
|
</li>
|
|
<li>
|
|
<p>further minimize the issue by making the code shorter (there are tools that
|
|
help with this like <code>creduce</code>)</p>
|
|
</li>
|
|
</ol>
|
|
<p>For more discussion on methodology for steps 2 and 3 above, there is an
|
|
<a href="https://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/">epic blog post</a> from pnkfelix specifically about Rust program minimization.</p>
|
|
<h3 id="enable-llvm-internal-checks"><a class="header" href="#enable-llvm-internal-checks">Enable LLVM internal checks</a></h3>
|
|
<p>The official compilers (including nightlies) have LLVM assertions disabled,
|
|
which means that LLVM assertion failures can show up as compiler crashes (not
|
|
ICEs but "real" crashes) and other sorts of weird behavior. If you are
|
|
encountering these, it is a good idea to try using a compiler with LLVM
|
|
assertions enabled - either an "alt" nightly or a compiler you build yourself
|
|
by setting <code>[llvm] assertions=true</code> in your bootstrap.toml - and see whether
|
|
anything turns up.</p>
|
|
<p>The rustc build process builds the LLVM tools into
|
|
<code>./build/<host-triple>/llvm/bin</code>. They can be called directly.
|
|
These tools include:</p>
|
|
<ul>
|
|
<li><a href="https://llvm.org/docs/CommandGuide/llc.html"><code>llc</code></a>, which compiles bitcode (<code>.bc</code> files) to executable code; this can be used to
|
|
replicate LLVM backend bugs.</li>
|
|
<li><a href="https://llvm.org/docs/CommandGuide/opt.html"><code>opt</code></a>, a bitcode transformer that runs LLVM optimization passes.</li>
|
|
<li><a href="https://llvm.org/docs/Bugpoint.html"><code>bugpoint</code></a>, which reduces large test cases to small, useful ones.</li>
|
|
<li>and many others, some of which are referenced in the text below.</li>
|
|
</ul>
|
|
<p>By default, the Rust build system does not check for changes to the LLVM source code or
|
|
its build configuration settings. So, if you need to rebuild the LLVM that is linked
|
|
into <code>rustc</code>, first delete the file <code>.llvm-stamp</code>, which should be located
|
|
in <code>build/<host-triple>/llvm/</code>.</p>
|
|
<p>The default rustc compilation pipeline has multiple codegen units, which is
|
|
hard to replicate manually and means that LLVM is called multiple times in
|
|
parallel. If you can get away with it (i.e. if it doesn't make your bug
|
|
disappear), passing <code>-C codegen-units=1</code> to rustc will make debugging easier.</p>
|
|
<h3 id="get-your-hands-on-raw-llvm-input"><a class="header" href="#get-your-hands-on-raw-llvm-input">Get your hands on raw LLVM input</a></h3>
|
|
<p>For rustc to generate LLVM IR, you need to pass the <code>--emit=llvm-ir</code> flag. If
|
|
you are building via cargo, use the <code>RUSTFLAGS</code> environment variable (e.g.
|
|
<code>RUSTFLAGS='--emit=llvm-ir'</code>). This causes rustc to spit out LLVM IR into the
|
|
target directory.</p>
|
|
<p><code>cargo llvm-ir [options] path</code> spits out the LLVM IR for a particular function
|
|
at <code>path</code>. (<code>cargo install cargo-asm</code> installs <code>cargo asm</code> and <code>cargo llvm-ir</code>). <code>--build-type=debug</code> emits code for debug builds. There are also
|
|
other useful options. Also, debug info in LLVM IR can clutter the output a lot:
|
|
<code>RUSTFLAGS="-C debuginfo=0"</code> is really useful.</p>
|
|
<p><code>RUSTFLAGS="-C save-temps"</code> outputs LLVM bitcode (not the same as IR) at
|
|
different stages during compilation, which is sometimes useful. The output LLVM
|
|
bitcode will be in <code>.bc</code> files in the compiler's output directory, set via the
|
|
<code>--out-dir DIR</code> argument to <code>rustc</code>.</p>
|
|
<ul>
|
|
<li>
|
|
<p>If you are hitting an assertion failure or segmentation fault from the LLVM
|
|
backend when invoking <code>rustc</code> itself, it is a good idea to try passing each
|
|
of these <code>.bc</code> files to the <code>llc</code> command, and see if you get the same
|
|
failure. (LLVM developers often prefer a bug reduced to a <code>.bc</code> file over one
|
|
that uses a Rust crate for its minimized reproduction.)</p>
|
|
</li>
|
|
<li>
|
|
<p>To get human readable versions of the LLVM bitcode, one just needs to convert
|
|
the bitcode (<code>.bc</code>) files to <code>.ll</code> files using <code>llvm-dis</code>, which should be in
|
|
the target local compilation of rustc.</p>
|
|
</li>
|
|
</ul>
|
|
<p>Note that rustc emits different IR depending on whether <code>-O</code> is enabled, even
|
|
without LLVM's optimizations, so if you want to play with the IR rustc emits,
|
|
you should:</p>
|
|
<pre><code class="language-bash">$ rustc +local my-file.rs --emit=llvm-ir -O -C no-prepopulate-passes \
|
|
-C codegen-units=1
|
|
$ OPT=./build/$TRIPLE/llvm/bin/opt
|
|
$ $OPT -S -O2 < my-file.ll > my
|
|
</code></pre>
|
|
<p>If you just want to get the LLVM IR during the LLVM pipeline, to e.g. see which
|
|
IR causes an optimization-time assertion to fail, or to see when LLVM performs
|
|
a particular optimization, you can pass the rustc flag <code>-C llvm-args=-print-after-all</code>, and possibly add <code>-C llvm-args='-filter-print-funcs=EXACT_FUNCTION_NAME</code> (e.g. <code>-C llvm-args='-filter-print-funcs=_ZN11collections3str21_$LT$impl$u20$str$GT$\ 7replace17hbe10ea2e7c809b0bE'</code>).</p>
|
|
<p>That produces a lot of output into standard error, so you'll want to pipe that
|
|
to some file. Also, if you are using neither <code>-filter-print-funcs</code> nor <code>-C codegen-units=1</code>, then, because the multiple codegen units run in parallel, the
|
|
printouts will mix together and you won't be able to read anything.</p>
|
|
<ul>
|
|
<li>
|
|
<p>One caveat to the aforementioned methodology: the <code>-print</code> family of options
|
|
to LLVM only prints the IR unit that the pass runs on (e.g., just a
|
|
function), and does not include any referenced declarations, globals,
|
|
metadata, etc. This means you cannot in general feed the output of <code>-print</code>
|
|
into <code>llc</code> to reproduce a given problem.</p>
|
|
</li>
|
|
<li>
|
|
<p>Within LLVM itself, calling <code>F.getParent()->dump()</code> at the beginning of
|
|
<code>SafeStackLegacyPass::runOnFunction</code> will dump the whole module, which
|
|
may provide better basis for reproduction. (However, you
|
|
should be able to get that same dump from the <code>.bc</code> files dumped by
|
|
<code>-C save-temps</code>.)</p>
|
|
</li>
|
|
</ul>
|
|
<p>If you want just the IR for a specific function (say, you want to see why it
|
|
causes an assertion or doesn't optimize correctly), you can use <code>llvm-extract</code>,
|
|
e.g.</p>
|
|
<pre><code class="language-bash">$ ./build/$TRIPLE/llvm/bin/llvm-extract \
|
|
-func='_ZN11collections3str21_$LT$impl$u20$str$GT$7replace17hbe10ea2e7c809b0bE' \
|
|
-S \
|
|
< unextracted.ll \
|
|
> extracted.ll
|
|
</code></pre>
|
|
<h3 id="investigate-llvm-optimization-passes"><a class="header" href="#investigate-llvm-optimization-passes">Investigate LLVM optimization passes</a></h3>
|
|
<p>If you are seeing incorrect behavior due to an optimization pass, a very handy
|
|
LLVM option is <code>-opt-bisect-limit</code>, which takes an integer denoting the index
|
|
value of the highest pass to run. Index values for taken passes are stable
|
|
from run to run; by coupling this with software that automates bisecting the
|
|
search space based on the resulting program, an errant pass can be quickly
|
|
determined. When an <code>-opt-bisect-limit</code> is specified, all runs are displayed
|
|
to standard error, along with their index and output indicating if the
|
|
pass was run or skipped. Setting the limit to an index of -1 (e.g.,
|
|
<code>RUSTFLAGS="-C llvm-args=-opt-bisect-limit=-1"</code>) will show all passes and
|
|
their corresponding index values.</p>
|
|
<p>If you want to play with the optimization pipeline, you can use the <a href="https://llvm.org/docs/CommandGuide/opt.html"><code>opt</code></a> tool
|
|
from <code>./build/<host-triple>/llvm/bin/</code> with the LLVM IR emitted by rustc.</p>
|
|
<p>When investigating the implementation of LLVM itself, you should be
|
|
aware of its <a href="https://llvm.org/docs/ProgrammersManual.html#the-llvm-debug-macro-and-debug-option">internal debug infrastructure</a>.
|
|
This is provided in LLVM Debug builds, which you enable for rustc
|
|
LLVM builds by changing this setting in the bootstrap.toml:</p>
|
|
<pre><code>[llvm]
|
|
# Indicates whether the LLVM assertions are enabled or not
|
|
assertions = true
|
|
|
|
# Indicates whether the LLVM build is a Release or Debug build
|
|
optimize = false
|
|
</code></pre>
|
|
<p>The quick summary is:</p>
|
|
<ul>
|
|
<li>Setting <code>assertions=true</code> enables coarse-grain debug messaging.
|
|
<ul>
|
|
<li>beyond that, setting <code>optimize=false</code> enables fine-grain debug messaging.</li>
|
|
</ul>
|
|
</li>
|
|
<li><code>LLVM_DEBUG(dbgs() << msg)</code> in LLVM is like <code>debug!(msg)</code> in <code>rustc</code>.</li>
|
|
<li>The <code>-debug</code> option turns on all messaging; it is like setting the
|
|
environment variable <code>RUSTC_LOG=debug</code> in <code>rustc</code>.</li>
|
|
<li>The <code>-debug-only=<pass1>,<pass2></code> variant is more selective; it is like
|
|
setting the environment variable <code>RUSTC_LOG=path1,path2</code> in <code>rustc</code>.</li>
|
|
</ul>
|
|
<h3 id="getting-help-and-asking-questions"><a class="header" href="#getting-help-and-asking-questions">Getting help and asking questions</a></h3>
|
|
<p>If you have some questions, head over to the <a href="https://rust-lang.zulipchat.com/">rust-lang Zulip</a> and
|
|
specifically the <code>#t-compiler/wg-llvm</code> stream.</p>
|
|
<h3 id="compiler-options-to-know-and-love"><a class="header" href="#compiler-options-to-know-and-love">Compiler options to know and love</a></h3>
|
|
<p>The <code>-C help</code> and <code>-Z help</code> compiler switches will list out a variety
|
|
of interesting options you may find useful. Here are a few of the most
|
|
common that pertain to LLVM development (some of them are employed in the
|
|
tutorial above):</p>
|
|
<ul>
|
|
<li>The <code>--emit llvm-ir</code> option emits a <code><filename>.ll</code> file with LLVM IR in textual format
|
|
<ul>
|
|
<li>The <code>--emit llvm-bc</code> option emits in bytecode format (<code><filename>.bc</code>)</li>
|
|
</ul>
|
|
</li>
|
|
<li>Passing <code>-C llvm-args=<foo></code> allows passing pretty much all the
|
|
options that tools like llc and opt would accept;
|
|
e.g. <code>-C llvm-args=-print-before-all</code> to print IR before every LLVM
|
|
pass.</li>
|
|
<li>The <code>-C no-prepopulate-passes</code> will avoid pre-populate the LLVM pass
|
|
manager with a list of passes. This will allow you to view the LLVM
|
|
IR that rustc generates, not the LLVM IR after optimizations.</li>
|
|
<li>The <code>-C passes=val</code> option allows you to supply a space separated list of extra LLVM passes to run</li>
|
|
<li>The <code>-C save-temps</code> option saves all temporary output files during compilation</li>
|
|
<li>The <code>-Z print-llvm-passes</code> option will print out LLVM optimization passes being run</li>
|
|
<li>The <code>-Z time-llvm-passes</code> option measures the time of each LLVM pass</li>
|
|
<li>The <code>-Z verify-llvm-ir</code> option will verify the LLVM IR for correctness</li>
|
|
<li>The <code>-Z no-parallel-backend</code> will disable parallel compilation of distinct compilation units</li>
|
|
<li>The <code>-Z llvm-time-trace</code> option will output a Chrome profiler compatible JSON file
|
|
which contains details and timings for LLVM passes.</li>
|
|
<li>The <code>-C llvm-args=-opt-bisect-limit=<index></code> option allows for bisecting LLVM
|
|
optimizations.</li>
|
|
</ul>
|
|
<h3 id="filing-llvm-bug-reports"><a class="header" href="#filing-llvm-bug-reports">Filing LLVM bug reports</a></h3>
|
|
<p>When filing an LLVM bug report, you will probably want some sort of minimal
|
|
working example that demonstrates the problem. The Godbolt compiler explorer is
|
|
really helpful for this.</p>
|
|
<ol>
|
|
<li>
|
|
<p>Once you have some LLVM IR for the problematic code (see above), you can
|
|
create a minimal working example with Godbolt. Go to
|
|
<a href="https://llvm.godbolt.org">llvm.godbolt.org</a>.</p>
|
|
</li>
|
|
<li>
|
|
<p>Choose <code>LLVM-IR</code> as programming language.</p>
|
|
</li>
|
|
<li>
|
|
<p>Use <code>llc</code> to compile the IR to a particular target as is:</p>
|
|
<ul>
|
|
<li>There are some useful flags: <code>-mattr</code> enables target features, <code>-march=</code>
|
|
selects the target, <code>-mcpu=</code> selects the CPU, etc.</li>
|
|
<li>Commands like <code>llc -march=help</code> output all architectures available, which
|
|
is useful because sometimes the Rust arch names and the LLVM names do not
|
|
match.</li>
|
|
<li>If you have compiled rustc yourself somewhere, in the target directory
|
|
you have binaries for <code>llc</code>, <code>opt</code>, etc.</li>
|
|
</ul>
|
|
</li>
|
|
<li>
|
|
<p>If you want to optimize the LLVM-IR, you can use <code>opt</code> to see how the LLVM
|
|
optimizations transform it.</p>
|
|
</li>
|
|
<li>
|
|
<p>Once you have a godbolt link demonstrating the issue, it is pretty easy to
|
|
fill in an LLVM bug. Just visit their <a href="https://github.com/llvm/llvm-project/issues">github issues page</a>.</p>
|
|
</li>
|
|
</ol>
|
|
<h3 id="porting-bug-fixes-from-llvm"><a class="header" href="#porting-bug-fixes-from-llvm">Porting bug fixes from LLVM</a></h3>
|
|
<p>Once you've identified the bug as an LLVM bug, you will sometimes
|
|
find that it has already been reported and fixed in LLVM, but we haven't
|
|
gotten the fix yet (or perhaps you are familiar enough with LLVM to fix it yourself).</p>
|
|
<p>In that case, we can sometimes opt to port the fix for the bug
|
|
directly to our own LLVM fork, so that rustc can use it more easily.
|
|
Our fork of LLVM is maintained in <a href="https://github.com/rust-lang/llvm-project/">rust-lang/llvm-project</a>. Once
|
|
you've landed the fix there, you'll also need to land a PR modifying
|
|
our submodule commits -- ask around on Zulip for help.</p>
|
|
|
|
</main>
|
|
|
|
<nav class="nav-wrapper" aria-label="Page navigation">
|
|
<!-- Mobile navigation buttons -->
|
|
<a rel="prev" href="../backend/updating-llvm.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
|
|
<i class="fa fa-angle-left"></i>
|
|
</a>
|
|
|
|
<a rel="next prefetch" href="../backend/backend-agnostic.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
|
|
<i class="fa fa-angle-right"></i>
|
|
</a>
|
|
|
|
<div style="clear: both"></div>
|
|
</nav>
|
|
</div>
|
|
</div>
|
|
|
|
<nav class="nav-wide-wrapper" aria-label="Page navigation">
|
|
<a rel="prev" href="../backend/updating-llvm.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
|
|
<i class="fa fa-angle-left"></i>
|
|
</a>
|
|
|
|
<a rel="next prefetch" href="../backend/backend-agnostic.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
|
|
<i class="fa fa-angle-right"></i>
|
|
</a>
|
|
</nav>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
window.playground_copyable = true;
|
|
</script>
|
|
|
|
|
|
<script src="../elasticlunr.min.js"></script>
|
|
<script src="../mark.min.js"></script>
|
|
<script src="../searcher.js"></script>
|
|
|
|
<script src="../clipboard.min.js"></script>
|
|
<script src="../highlight.js"></script>
|
|
<script src="../book.js"></script>
|
|
|
|
<!-- Custom JS scripts -->
|
|
<script src="../mermaid.min.js"></script>
|
|
<script src="../mermaid-init.js"></script>
|
|
|
|
|
|
</div>
|
|
</body>
|
|
</html>
|