<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hey all,<br>
<br>
Quick query on out of tree target support - at present I can drop a
folder Foo into <llvm>/lib/Target/Foo and use the CMake option
LLVM_EXPERIMENTAL_TARGETS_TO_BUILD to pick up my target. The issue
is that I still need to patch the one LLVMBuild.txt file in
<llvm>/lib/Target with;<br>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<br>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<pre class="code highlight white diff" style="box-sizing: border-box; font-family: Menlo, 'Liberation Mono', Consolas, 'DejaVu Sans Mono', 'Ubuntu Mono', 'Courier New', 'andale mono', 'lucida console', monospace; font-size: 12px; white-space: pre-wrap; display: block; padding: 8.5px; margin: 0px 0px 9px; line-height: 1.428571429; word-break: break-all; word-wrap: break-word; color: rgb(51, 51, 51); border: 1px solid rgb(204, 204, 204); border-radius: 4px; text-shadow: none; overflow-x: auto; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(245, 245, 245);"><code style="box-sizing: border-box; font-family: Menlo, 'Liberation Mono', Consolas, 'DejaVu Sans Mono', 'Ubuntu Mono', 'Courier New', 'andale mono', 'lucida console', monospace; font-size: inherit; padding: 0px; color: inheri
t; white-
space: pre; border-radius: 0px; word-wrap: normal; margin-top: 0px; background-color: transparent;"><span class="gh" style="box-sizing: border-box; margin-top: 0px; color: rgb(153, 153, 153);">iff --git a/lib/Target/LLVMBuild.txt b/lib/Target/LLVMBuild.txt
index 4112046..6e42cbe 100644
</span><span class="gd" style="box-sizing: border-box; color: rgb(0, 0, 0); background-color: rgb(255, 221, 221);">--- a/lib/Target/LLVMBuild.txt
</span><span class="gi" style="box-sizing: border-box; color: rgb(0, 0, 0); background-color: rgb(221, 255, 221);">+++ b/lib/Target/LLVMBuild.txt
</span><span class="gh" style="box-sizing: border-box; color: rgb(153, 153, 153);">@@ -16,7 +16,7 @@
</span> ;===------------------------------------------------------------------------===;
<span class="err" style="box-sizing: border-box; color: rgb(166, 23, 23); background-color: rgb(227, 210, 210);">
</span> [common]
<span class="gd" style="box-sizing: border-box; color: rgb(0, 0, 0); background-color: rgb(255, 221, 221);">-subdirectories = ARM AArch64 BPF CppBackend Hexagon MSP430 NVPTX Mips PowerPC R600 Sparc SystemZ X86 XCore
</span><span class="gi" style="box-sizing: border-box; color: rgb(0, 0, 0); background-color: rgb(221, 255, 221);">+subdirectories = ARM AArch64 BPF CppBackend Hexagon MSP430 NVPTX Mips PowerPC R600 Sparc SystemZ X86 XCore Foo
</span><span class="err" style="box-sizing: border-box; color: rgb(166, 23, 23); background-color: rgb(227, 210, 210);">
</span> ; This is a special group whose required libraries are extended (by llvm-build)
; with the best execution engine (the native JIT, if available, or the</code></pre>
To include my target in the LLVM build, and this allows me to
specify -march=foo and it will call into my code correctly.<br>
<br>
Am I missing something - or is this patch definitely required?<br>
<br>
If the patch is required - does anyone have any suggestions/ideas
how I could add support to either LLVMBuild or the specific
LLVMBuild.txt file so that it would pick up my new Target?<br>
<br>
I understand that my patch is tiny and relatively easy to maintain
(it will basically always merge well) - but it still irks me having
to keep a patch where it probably isn't required!<br>
<br>
Cheers,<br>
-Neil.<br>
</body>
</html>