[PATCH] D20700: [Docs][WritingAnLLVMBackend] Makefiles are deprecated

Visoiu Mistrih Francis via llvm-commits llvm-commits at lists.llvm.org
Thu May 26 13:18:57 PDT 2016


thegameg created this revision.
thegameg added reviewers: gribozavr, void, beanz.
thegameg added a subscriber: llvm-commits.

* docs/WritingAnLLVMBackend.rst: Makefiles are no longer used. The users should use CMakeLists.txt. In order to add the target, the TARGETS_TO_BUILD is replaced with LLVM_ALL_TARGETS.

http://reviews.llvm.org/D20700

Files:
  docs/WritingAnLLVMBackend.rst

Index: docs/WritingAnLLVMBackend.rst
===================================================================
--- docs/WritingAnLLVMBackend.rst
+++ docs/WritingAnLLVMBackend.rst
@@ -135,14 +135,13 @@
 files related to your target.  If your target is called "Dummy", create the
 directory ``lib/Target/Dummy``.
 
-In this new directory, create a ``Makefile``.  It is easiest to copy a
-``Makefile`` of another target and modify it.  It should at least contain the
-``LEVEL``, ``LIBRARYNAME`` and ``TARGET`` variables, and then include
-``$(LEVEL)/Makefile.common``.  The library can be named ``LLVMDummy`` (for
-example, see the MIPS target).  Alternatively, you can split the library into
-``LLVMDummyCodeGen`` and ``LLVMDummyAsmPrinter``, the latter of which should be
-implemented in a subdirectory below ``lib/Target/Dummy`` (for example, see the
-PowerPC target).
+In this new directory, create a ``CMakeLists.txt``.  It is easiest to copy a
+``CMakeLists.txt`` of another target and modify it.  It should at least contain
+the ``LLVM_TARGET_DEFINITIONS`` variable. The library can be named ``LLVMDummy``
+(for example, see the MIPS target).  Alternatively, you can split the library
+into ``LLVMDummyCodeGen`` and ``LLVMDummyAsmPrinter``, the latter of which
+should be implemented in a subdirectory below ``lib/Target/Dummy`` (for example,
+see the PowerPC target).
 
 Note that these two naming schemes are hardcoded into ``llvm-config``.  Using
 any other naming scheme will confuse ``llvm-config`` and produce a lot of
@@ -157,12 +156,11 @@
 subclass of ``TargetMachine``.)
 
 To get LLVM to actually build and link your target, you need to add it to the
-``TARGETS_TO_BUILD`` variable.  To do this, you modify the configure script to
-know about your target when parsing the ``--enable-targets`` option.  Search
-the configure script for ``TARGETS_TO_BUILD``, add your target to the lists
-there (some creativity required), and then reconfigure.  Alternatively, you can
-change ``autoconf/configure.ac`` and regenerate configure by running
-``./autoconf/AutoRegen.sh``.
+``LLVM_ALL_TARGETS`` variable.  To do this, you modify the main
+``CMakeLists.txt`` script to know about your target when parsing the
+``--enable-targets`` option.  Search the ``CMakeLists.txt`` file for
+``LLVM_ALL_TARGETS``, add your target to the lists there
+(some creativity required), and then call ``cmake``.
 
 Target Machine
 ==============


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20700.58675.patch
Type: text/x-patch
Size: 2426 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160526/0cc8c990/attachment.bin>


More information about the llvm-commits mailing list