[llvm] [ORC-RT] Initial check-in for a new, top-level ORC runtime project. (PR #113499)

Lang Hames via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 31 10:22:15 PDT 2024


https://github.com/lhames updated https://github.com/llvm/llvm-project/pull/113499

>From fb7698d5d1377e85d1fd6a00fcbbc5a87cbb1323 Mon Sep 17 00:00:00 2001
From: Lang Hames <lhames at gmail.com>
Date: Thu, 24 Oct 2024 08:23:41 +1100
Subject: [PATCH 01/13] [ORC-RT] Initial check-in for a new, top-level ORC
 runtime project.

Includes CMake files and a placeholder header, library, and tool.

See discussion at
https://discourse.llvm.org/t/rfc-move-orc-executor-support-into-top-level-project/81049
---
 llvm/CMakeLists.txt                        |  2 +-
 llvm/projects/CMakeLists.txt               |  2 +
 orc-rt/CMakeLists.txt                      | 47 ++++++++++++++++++++++
 orc-rt/include/orc-rt-c/orc-rt.h           | 27 +++++++++++++
 orc-rt/lib/CMakeLists.txt                  |  1 +
 orc-rt/lib/prelink/CMakeLists.txt          |  1 +
 orc-rt/lib/prelink/orc-rt-prelink.cpp      |  5 +++
 orc-rt/tools/CMakeLists.txt                |  1 +
 orc-rt/tools/orc-executor/CMakeLists.txt   |  3 ++
 orc-rt/tools/orc-executor/orc-executor.cpp |  6 +++
 runtimes/CMakeLists.txt                    |  2 +-
 11 files changed, 95 insertions(+), 2 deletions(-)
 create mode 100644 orc-rt/CMakeLists.txt
 create mode 100644 orc-rt/include/orc-rt-c/orc-rt.h
 create mode 100644 orc-rt/lib/CMakeLists.txt
 create mode 100644 orc-rt/lib/prelink/CMakeLists.txt
 create mode 100644 orc-rt/lib/prelink/orc-rt-prelink.cpp
 create mode 100644 orc-rt/tools/CMakeLists.txt
 create mode 100644 orc-rt/tools/orc-executor/CMakeLists.txt
 create mode 100644 orc-rt/tools/orc-executor/orc-executor.cpp

diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
index cde4a999ea2e74..19e2eb9ae4108b 100644
--- a/llvm/CMakeLists.txt
+++ b/llvm/CMakeLists.txt
@@ -155,7 +155,7 @@ endif()
 # As we migrate runtimes to using the bootstrapping build, the set of default runtimes
 # should grow as we remove those runtimes from LLVM_ENABLE_PROJECTS above.
 set(LLVM_DEFAULT_RUNTIMES "libcxx;libcxxabi;libunwind")
-set(LLVM_SUPPORTED_RUNTIMES "libc;libunwind;libcxxabi;pstl;libcxx;compiler-rt;openmp;llvm-libgcc;offload")
+set(LLVM_SUPPORTED_RUNTIMES "libc;libunwind;libcxxabi;pstl;libcxx;compiler-rt;openmp;llvm-libgcc;offload;orc-rt")
 set(LLVM_ENABLE_RUNTIMES "" CACHE STRING
   "Semicolon-separated list of runtimes to build, or \"all\" (${LLVM_DEFAULT_RUNTIMES}). Supported runtimes are ${LLVM_SUPPORTED_RUNTIMES}.")
 if(LLVM_ENABLE_RUNTIMES STREQUAL "all")
diff --git a/llvm/projects/CMakeLists.txt b/llvm/projects/CMakeLists.txt
index 08f2fa522420b0..4bf482365feb1b 100644
--- a/llvm/projects/CMakeLists.txt
+++ b/llvm/projects/CMakeLists.txt
@@ -9,6 +9,7 @@ foreach(entry ${entries})
        (NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/libcxx) AND
        (NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/libcxxabi) AND
        (NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/libunwind) AND
+       (NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/orc-rt) AND
        (NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/test-suite) AND
        (NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/openmp) AND
        (NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/cross-project-tests))
@@ -33,6 +34,7 @@ if(${LLVM_BUILD_RUNTIME})
     add_llvm_external_project(libc)
     add_llvm_external_project(libcxxabi)
     add_llvm_external_project(libcxx)
+    add_llvm_external_project(orc-rt)
   endif()
   if(NOT LLVM_BUILD_EXTERNAL_COMPILER_RT)
     add_llvm_external_project(compiler-rt)
diff --git a/orc-rt/CMakeLists.txt b/orc-rt/CMakeLists.txt
new file mode 100644
index 00000000000000..f48773e1bed7f0
--- /dev/null
+++ b/orc-rt/CMakeLists.txt
@@ -0,0 +1,47 @@
+# CMake build for ORC-RT.
+
+#===============================================================================
+# Setup Project
+#===============================================================================
+
+cmake_minimum_required(VERSION 3.20.0)
+set(LLVM_SUBPROJECT_TITLE "orc-rt")
+
+set(LLVM_COMMON_CMAKE_UTILS ${CMAKE_CURRENT_SOURCE_DIR}/../cmake)
+
+include(${LLVM_COMMON_CMAKE_UTILS}/Modules/CMakePolicy.cmake
+  NO_POLICY_SCOPE)
+
+# Add path for custom orc-rt modules.
+list(INSERT CMAKE_MODULE_PATH 0
+#  "${CMAKE_CURRENT_SOURCE_DIR}/cmake"
+#  "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules"
+  "${LLVM_COMMON_CMAKE_UTILS}"
+  "${LLVM_COMMON_CMAKE_UTILS}/Modules"
+  )
+
+set(CMAKE_FOLDER "orc-rt")
+
+set(LIBORCRT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
+set(LIBORCRT_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
+
+#===============================================================================
+# Setup CMake Options
+#===============================================================================
+
+set(CMAKE_CXX_STANDARD 17 CACHE STRING "C++ standard to conform to")
+set(CMAKE_CXX_STANDARD_REQUIRED YES)
+set(CMAKE_CXX_EXTENSIONS NO)
+
+#================================
+# Setup Compiler Flags
+#================================
+
+# Configure compiler. Must happen after setting the target flags.
+
+#===============================================================================
+# Setup Source Code
+#===============================================================================
+
+add_subdirectory(lib)
+add_subdirectory(tools)
diff --git a/orc-rt/include/orc-rt-c/orc-rt.h b/orc-rt/include/orc-rt-c/orc-rt.h
new file mode 100644
index 00000000000000..fdc0fd29976d4a
--- /dev/null
+++ b/orc-rt/include/orc-rt-c/orc-rt.h
@@ -0,0 +1,27 @@
+/*===- orc-rt-c/orc-rt.h - Placeholder header for orc-rt ----------*- C -*-===*\
+|*                                                                            *|
+|* Part of the LLVM Project, under the Apache License v2.0 with LLVM          *|
+|* Exceptions.                                                                *|
+|* See https://llvm.org/LICENSE.txt for license information.                  *|
+|* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception                    *|
+|*                                                                            *|
+|*===----------------------------------------------------------------------===*|
+|*                                                                            *|
+|* Placeholder header for initial orc-rt checkin                              *|
+|*                                                                            *|
+\*===----------------------------------------------------------------------===*/
+
+#ifndef ORC_RT_C_ORC_RT_H
+#define ORC_RT_C_ORC_RT_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void orc_rt(void);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* ORC_RT_C_ORC_RT_H */
diff --git a/orc-rt/lib/CMakeLists.txt b/orc-rt/lib/CMakeLists.txt
new file mode 100644
index 00000000000000..6080b84a51fcad
--- /dev/null
+++ b/orc-rt/lib/CMakeLists.txt
@@ -0,0 +1 @@
+add_subdirectory(prelink)
diff --git a/orc-rt/lib/prelink/CMakeLists.txt b/orc-rt/lib/prelink/CMakeLists.txt
new file mode 100644
index 00000000000000..4e951e77764369
--- /dev/null
+++ b/orc-rt/lib/prelink/CMakeLists.txt
@@ -0,0 +1 @@
+add_library(orc-rt-prelink STATIC orc-rt-prelink.cpp)
diff --git a/orc-rt/lib/prelink/orc-rt-prelink.cpp b/orc-rt/lib/prelink/orc-rt-prelink.cpp
new file mode 100644
index 00000000000000..d24d5838a25cc9
--- /dev/null
+++ b/orc-rt/lib/prelink/orc-rt-prelink.cpp
@@ -0,0 +1,5 @@
+#include <stdio.h>
+
+extern "C" void orc_rt(void) {
+  printf("hello, world!\n");
+}
diff --git a/orc-rt/tools/CMakeLists.txt b/orc-rt/tools/CMakeLists.txt
new file mode 100644
index 00000000000000..fc78ea41316067
--- /dev/null
+++ b/orc-rt/tools/CMakeLists.txt
@@ -0,0 +1 @@
+add_subdirectory(orc-executor)
diff --git a/orc-rt/tools/orc-executor/CMakeLists.txt b/orc-rt/tools/orc-executor/CMakeLists.txt
new file mode 100644
index 00000000000000..7750afc61c4b84
--- /dev/null
+++ b/orc-rt/tools/orc-executor/CMakeLists.txt
@@ -0,0 +1,3 @@
+add_executable(orc-executor orc-executor.cpp)
+target_link_libraries(orc-executor PRIVATE orc-rt-prelink)
+target_include_directories(orc-executor PRIVATE ../../include)
diff --git a/orc-rt/tools/orc-executor/orc-executor.cpp b/orc-rt/tools/orc-executor/orc-executor.cpp
new file mode 100644
index 00000000000000..4a03ac64710d22
--- /dev/null
+++ b/orc-rt/tools/orc-executor/orc-executor.cpp
@@ -0,0 +1,6 @@
+#include "orc-rt-c/orc-rt.h"
+
+int main(int argc, char *argv[]) {
+  orc_rt();
+  return 0;
+}
diff --git a/runtimes/CMakeLists.txt b/runtimes/CMakeLists.txt
index 830165c799c2ab..a99890180a0e88 100644
--- a/runtimes/CMakeLists.txt
+++ b/runtimes/CMakeLists.txt
@@ -23,7 +23,7 @@ list(INSERT CMAKE_MODULE_PATH 0
 
 # We order libraries to mirror roughly how they are layered, except that compiler-rt can depend
 # on libc++, so we put it after.
-set(LLVM_DEFAULT_RUNTIMES "libc;libunwind;libcxxabi;pstl;libcxx;compiler-rt;openmp;offload")
+set(LLVM_DEFAULT_RUNTIMES "libc;libunwind;libcxxabi;pstl;libcxx;compiler-rt;openmp;offload;orc-rt")
 set(LLVM_SUPPORTED_RUNTIMES "${LLVM_DEFAULT_RUNTIMES};llvm-libgcc")
 set(LLVM_ENABLE_RUNTIMES "" CACHE STRING
   "Semicolon-separated list of runtimes to build, or \"all\" (${LLVM_DEFAULT_RUNTIMES}). Supported runtimes are ${LLVM_SUPPORTED_RUNTIMES}.")

>From f801afbede00b602351ae8015c15aeab35ee278b Mon Sep 17 00:00:00 2001
From: Lang Hames <lhames at gmail.com>
Date: Thu, 24 Oct 2024 11:25:16 +1100
Subject: [PATCH 02/13] clang-format

---
 orc-rt/lib/prelink/orc-rt-prelink.cpp | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/orc-rt/lib/prelink/orc-rt-prelink.cpp b/orc-rt/lib/prelink/orc-rt-prelink.cpp
index d24d5838a25cc9..b97d9cd22a0a23 100644
--- a/orc-rt/lib/prelink/orc-rt-prelink.cpp
+++ b/orc-rt/lib/prelink/orc-rt-prelink.cpp
@@ -1,5 +1,3 @@
 #include <stdio.h>
 
-extern "C" void orc_rt(void) {
-  printf("hello, world!\n");
-}
+extern "C" void orc_rt(void) { printf("hello, world!\n"); }

>From 60116194ed806768e974b8e7b8fc75ce55a51dff Mon Sep 17 00:00:00 2001
From: Lang Hames <lhames at gmail.com>
Date: Mon, 28 Oct 2024 08:06:21 +1100
Subject: [PATCH 03/13] Simplify CMake files, add install support.

---
 orc-rt/CMakeLists.txt                         | 23 ++++---------------
 orc-rt/include/CMakeLists.txt                 | 16 +++++++++++++
 orc-rt/lib/CMakeLists.txt                     |  2 +-
 orc-rt/lib/executor/CMakeLists.txt            | 13 +++++++++++
 .../orc-rt-executor.cpp}                      |  0
 orc-rt/lib/prelink/CMakeLists.txt             |  1 -
 orc-rt/tools/orc-executor/CMakeLists.txt      |  2 +-
 7 files changed, 35 insertions(+), 22 deletions(-)
 create mode 100644 orc-rt/include/CMakeLists.txt
 create mode 100644 orc-rt/lib/executor/CMakeLists.txt
 rename orc-rt/lib/{prelink/orc-rt-prelink.cpp => executor/orc-rt-executor.cpp} (100%)
 delete mode 100644 orc-rt/lib/prelink/CMakeLists.txt

diff --git a/orc-rt/CMakeLists.txt b/orc-rt/CMakeLists.txt
index f48773e1bed7f0..2b170f51c861a7 100644
--- a/orc-rt/CMakeLists.txt
+++ b/orc-rt/CMakeLists.txt
@@ -5,25 +5,14 @@
 #===============================================================================
 
 cmake_minimum_required(VERSION 3.20.0)
-set(LLVM_SUBPROJECT_TITLE "orc-rt")
 
 set(LLVM_COMMON_CMAKE_UTILS ${CMAKE_CURRENT_SOURCE_DIR}/../cmake)
-
 include(${LLVM_COMMON_CMAKE_UTILS}/Modules/CMakePolicy.cmake
   NO_POLICY_SCOPE)
 
-# Add path for custom orc-rt modules.
-list(INSERT CMAKE_MODULE_PATH 0
-#  "${CMAKE_CURRENT_SOURCE_DIR}/cmake"
-#  "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules"
-  "${LLVM_COMMON_CMAKE_UTILS}"
-  "${LLVM_COMMON_CMAKE_UTILS}/Modules"
-  )
-
-set(CMAKE_FOLDER "orc-rt")
+project(LibOrcRT LANGUAGES C CXX ASM)
 
-set(LIBORCRT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
-set(LIBORCRT_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
+include(GNUInstallDirs)
 
 #===============================================================================
 # Setup CMake Options
@@ -32,16 +21,12 @@ set(LIBORCRT_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
 set(CMAKE_CXX_STANDARD 17 CACHE STRING "C++ standard to conform to")
 set(CMAKE_CXX_STANDARD_REQUIRED YES)
 set(CMAKE_CXX_EXTENSIONS NO)
-
-#================================
-# Setup Compiler Flags
-#================================
-
-# Configure compiler. Must happen after setting the target flags.
+set(CMAKE_FOLDER "orc-rt")
 
 #===============================================================================
 # Setup Source Code
 #===============================================================================
 
+add_subdirectory(include)
 add_subdirectory(lib)
 add_subdirectory(tools)
diff --git a/orc-rt/include/CMakeLists.txt b/orc-rt/include/CMakeLists.txt
new file mode 100644
index 00000000000000..9137e5823fe25f
--- /dev/null
+++ b/orc-rt/include/CMakeLists.txt
@@ -0,0 +1,16 @@
+set(files
+    orc-rt-c/orc-rt.h
+)
+
+add_library(orc-rt-headers INTERFACE)
+target_include_directories(orc-rt-headers INTERFACE
+    $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
+    $<INSTALL_INTERFACE:include>
+)
+target_sources(orc-rt-headers
+    INTERFACE FILE_SET HEADERS
+    BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}
+    FILES ${files}
+)
+install(TARGETS orc-rt-headers
+    FILE_SET HEADERS DESTINATION include)
diff --git a/orc-rt/lib/CMakeLists.txt b/orc-rt/lib/CMakeLists.txt
index 6080b84a51fcad..993f2b8b52eb77 100644
--- a/orc-rt/lib/CMakeLists.txt
+++ b/orc-rt/lib/CMakeLists.txt
@@ -1 +1 @@
-add_subdirectory(prelink)
+add_subdirectory(executor)
diff --git a/orc-rt/lib/executor/CMakeLists.txt b/orc-rt/lib/executor/CMakeLists.txt
new file mode 100644
index 00000000000000..82d29455eb6dfe
--- /dev/null
+++ b/orc-rt/lib/executor/CMakeLists.txt
@@ -0,0 +1,13 @@
+set(files
+  orc-rt-executor.cpp
+  )
+
+add_library(orc-rt-executor STATIC ${files})
+target_link_libraries(orc-rt-executor
+  PUBLIC orc-rt-headers
+  )
+install(TARGETS orc-rt-executor
+  ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+          COMPONENT OrcRT_Development
+  PUBLIC_HEADER DESTINATION include COMPONENT OrcRT_Development
+)
diff --git a/orc-rt/lib/prelink/orc-rt-prelink.cpp b/orc-rt/lib/executor/orc-rt-executor.cpp
similarity index 100%
rename from orc-rt/lib/prelink/orc-rt-prelink.cpp
rename to orc-rt/lib/executor/orc-rt-executor.cpp
diff --git a/orc-rt/lib/prelink/CMakeLists.txt b/orc-rt/lib/prelink/CMakeLists.txt
deleted file mode 100644
index 4e951e77764369..00000000000000
--- a/orc-rt/lib/prelink/CMakeLists.txt
+++ /dev/null
@@ -1 +0,0 @@
-add_library(orc-rt-prelink STATIC orc-rt-prelink.cpp)
diff --git a/orc-rt/tools/orc-executor/CMakeLists.txt b/orc-rt/tools/orc-executor/CMakeLists.txt
index 7750afc61c4b84..f75849f0877275 100644
--- a/orc-rt/tools/orc-executor/CMakeLists.txt
+++ b/orc-rt/tools/orc-executor/CMakeLists.txt
@@ -1,3 +1,3 @@
 add_executable(orc-executor orc-executor.cpp)
-target_link_libraries(orc-executor PRIVATE orc-rt-prelink)
+target_link_libraries(orc-executor PRIVATE orc-rt-executor)
 target_include_directories(orc-executor PRIVATE ../../include)

>From 81dc0e4be5b8eb6811ba741bfd1cb50673db1c35 Mon Sep 17 00:00:00 2001
From: Lang Hames <lhames at gmail.com>
Date: Tue, 29 Oct 2024 07:48:23 +1100
Subject: [PATCH 04/13] Use '//' style comments.

---
 orc-rt/include/orc-rt-c/orc-rt.h | 27 +++++++++++++--------------
 1 file changed, 13 insertions(+), 14 deletions(-)

diff --git a/orc-rt/include/orc-rt-c/orc-rt.h b/orc-rt/include/orc-rt-c/orc-rt.h
index fdc0fd29976d4a..324d6dc05ec72e 100644
--- a/orc-rt/include/orc-rt-c/orc-rt.h
+++ b/orc-rt/include/orc-rt-c/orc-rt.h
@@ -1,15 +1,14 @@
-/*===- orc-rt-c/orc-rt.h - Placeholder header for orc-rt ----------*- C -*-===*\
-|*                                                                            *|
-|* Part of the LLVM Project, under the Apache License v2.0 with LLVM          *|
-|* Exceptions.                                                                *|
-|* See https://llvm.org/LICENSE.txt for license information.                  *|
-|* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception                    *|
-|*                                                                            *|
-|*===----------------------------------------------------------------------===*|
-|*                                                                            *|
-|* Placeholder header for initial orc-rt checkin                              *|
-|*                                                                            *|
-\*===----------------------------------------------------------------------===*/
+//===- orc-rt-c/orc-rt.h - Placeholder header for orc-rt ----------*- C -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// Placeholder header for initial orc-rt checkin.
+//
+//===----------------------------------------------------------------------===//
 
 #ifndef ORC_RT_C_ORC_RT_H
 #define ORC_RT_C_ORC_RT_H
@@ -21,7 +20,7 @@ extern "C" {
 void orc_rt(void);
 
 #ifdef __cplusplus
-} /* extern "C" */
+} // extern "C"
 #endif
 
-#endif /* ORC_RT_C_ORC_RT_H */
+#endif // ORC_RT_C_ORC_RT_H

>From 7106b9dc5fe9702a853bbd68c2d31c4e4d13f358 Mon Sep 17 00:00:00 2001
From: Lang Hames <lhames at gmail.com>
Date: Tue, 29 Oct 2024 07:48:54 +1100
Subject: [PATCH 05/13] Add missing copyright header.

---
 orc-rt/lib/executor/orc-rt-executor.cpp | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/orc-rt/lib/executor/orc-rt-executor.cpp b/orc-rt/lib/executor/orc-rt-executor.cpp
index b97d9cd22a0a23..d70488d11d3faf 100644
--- a/orc-rt/lib/executor/orc-rt-executor.cpp
+++ b/orc-rt/lib/executor/orc-rt-executor.cpp
@@ -1,3 +1,15 @@
+//===- orc-rt-executor.cpp - Placeholder implementation for orc-rt --------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// Placeholder implementation file for initial orc-rt checkin.
+//
+//===----------------------------------------------------------------------===//
+
 #include <stdio.h>
 
 extern "C" void orc_rt(void) { printf("hello, world!\n"); }

>From db2709778be5c618d6078ba20e3206621eed499e Mon Sep 17 00:00:00 2001
From: Lang Hames <lhames at gmail.com>
Date: Tue, 29 Oct 2024 07:49:15 +1100
Subject: [PATCH 06/13] Use 'install (DIRECTORY...' instead of file sets.

---
 orc-rt/include/CMakeLists.txt | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/orc-rt/include/CMakeLists.txt b/orc-rt/include/CMakeLists.txt
index 9137e5823fe25f..027317e28c8ce3 100644
--- a/orc-rt/include/CMakeLists.txt
+++ b/orc-rt/include/CMakeLists.txt
@@ -1,4 +1,4 @@
-set(files
+set(ORC_RT_HEADERS
     orc-rt-c/orc-rt.h
 )
 
@@ -7,10 +7,10 @@ target_include_directories(orc-rt-headers INTERFACE
     $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
     $<INSTALL_INTERFACE:include>
 )
-target_sources(orc-rt-headers
-    INTERFACE FILE_SET HEADERS
-    BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}
-    FILES ${files}
+set_property(TARGET orc-rt-headers
+    PROPERTY PUBLIC_HEADER ${ORC_RT_HEADERS}
+)
+install(DIRECTORY ./
+    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/
+    FILES_MATCHING PATTERN "*.h"
 )
-install(TARGETS orc-rt-headers
-    FILE_SET HEADERS DESTINATION include)

>From b0eb59985606c560c33239139fe4648b6086371f Mon Sep 17 00:00:00 2001
From: Lang Hames <lhames at gmail.com>
Date: Tue, 29 Oct 2024 07:50:57 +1100
Subject: [PATCH 07/13] Add missing copyright header.

---
 orc-rt/tools/orc-executor/orc-executor.cpp | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/orc-rt/tools/orc-executor/orc-executor.cpp b/orc-rt/tools/orc-executor/orc-executor.cpp
index 4a03ac64710d22..92bdd5bf5d53f2 100644
--- a/orc-rt/tools/orc-executor/orc-executor.cpp
+++ b/orc-rt/tools/orc-executor/orc-executor.cpp
@@ -1,3 +1,15 @@
+//===- orc-executor.cpp - Placeholder implementation for orc-rt ----------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// Placeholder implementation file for initial orc-rt checkin.
+//
+//===----------------------------------------------------------------------===//
+
 #include "orc-rt-c/orc-rt.h"
 
 int main(int argc, char *argv[]) {

>From 400d2fc7f382db6f45045f21bfb73d1105226e1f Mon Sep 17 00:00:00 2001
From: Lang Hames <lhames at gmail.com>
Date: Wed, 30 Oct 2024 14:43:38 -0700
Subject: [PATCH 08/13] Add license and documentation.

---
 orc-rt/CMakeLists.txt            |   9 +
 orc-rt/CREDITS.TXT               |  13 ++
 orc-rt/LICENSE.TXT               | 311 +++++++++++++++++++++++++++++++
 orc-rt/docs/Building-ORC-RT.rst  |  90 +++++++++
 orc-rt/docs/CMakeLists.txt       |   8 +
 orc-rt/docs/README.txt           |  13 ++
 orc-rt/docs/conf.py              | 252 +++++++++++++++++++++++++
 orc-rt/docs/index.rst            |  66 +++++++
 orc-rt/include/orc-rt-c/orc-rt.h |   6 +
 9 files changed, 768 insertions(+)
 create mode 100644 orc-rt/CREDITS.TXT
 create mode 100644 orc-rt/LICENSE.TXT
 create mode 100644 orc-rt/docs/Building-ORC-RT.rst
 create mode 100644 orc-rt/docs/CMakeLists.txt
 create mode 100644 orc-rt/docs/README.txt
 create mode 100644 orc-rt/docs/conf.py
 create mode 100644 orc-rt/docs/index.rst

diff --git a/orc-rt/CMakeLists.txt b/orc-rt/CMakeLists.txt
index 2b170f51c861a7..d411ee4cf761dd 100644
--- a/orc-rt/CMakeLists.txt
+++ b/orc-rt/CMakeLists.txt
@@ -18,6 +18,11 @@ include(GNUInstallDirs)
 # Setup CMake Options
 #===============================================================================
 
+option(ORC_RT_INCLUDE_DOCS "Build the ORC-RT documentation." ${ORC_RT_INCLUDE_DOCS})
+option(ORC_RT_ENABLE_ASSERTIONS "Enable assertions independent of build mode." ON)
+option(ORC_RT_ENABLE_PEDANTIC "Compile with pedantic enabled." ON)
+option(ORC_RT_ENABLE_WERROR "Fail and stop if a warning is triggered." OFF)
+
 set(CMAKE_CXX_STANDARD 17 CACHE STRING "C++ standard to conform to")
 set(CMAKE_CXX_STANDARD_REQUIRED YES)
 set(CMAKE_CXX_EXTENSIONS NO)
@@ -27,6 +32,10 @@ set(CMAKE_FOLDER "orc-rt")
 # Setup Source Code
 #===============================================================================
 
+if (ORC_RT_INCLUDE_DOCS)
+  add_subdirectory(docs)
+endif()
+
 add_subdirectory(include)
 add_subdirectory(lib)
 add_subdirectory(tools)
diff --git a/orc-rt/CREDITS.TXT b/orc-rt/CREDITS.TXT
new file mode 100644
index 00000000000000..51192b40d27312
--- /dev/null
+++ b/orc-rt/CREDITS.TXT
@@ -0,0 +1,13 @@
+This file is a partial list of people who have contributed to the LLVM
+project. If you have contributed a patch or made some other contribution to
+LLVM, please submit a patch to this file to add yourself, and it will be
+done!
+
+The list is sorted by surname and formatted to allow easy grepping and
+beautification by scripts.  The fields are: name (N), email (E), web-address
+(W), PGP key ID and fingerprint (P), description (D), snail-mail address
+(S), and (I) IRC handle.
+
+N: Lang Hames
+E: lhames at gmail.com
+D: Initial code
diff --git a/orc-rt/LICENSE.TXT b/orc-rt/LICENSE.TXT
new file mode 100644
index 00000000000000..55b05e381cfdf2
--- /dev/null
+++ b/orc-rt/LICENSE.TXT
@@ -0,0 +1,311 @@
+==============================================================================
+The LLVM Project is under the Apache License v2.0 with LLVM Exceptions:
+==============================================================================
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+    TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+    1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+    2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+    3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+    4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+    5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+    6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+    7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+    8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+    9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+    END OF TERMS AND CONDITIONS
+
+    APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+    Copyright [yyyy] [name of copyright owner]
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+
+---- LLVM Exceptions to the Apache 2.0 License ----
+
+As an exception, if, as a result of your compiling your source code, portions
+of this Software are embedded into an Object form of such source code, you
+may redistribute such embedded portions in such Object form without complying
+with the conditions of Sections 4(a), 4(b) and 4(d) of the License.
+
+In addition, if you combine or link compiled forms of this Software with
+software that is licensed under the GPLv2 ("Combined Software") and if a
+court of competent jurisdiction determines that the patent provision (Section
+3), the indemnity provision (Section 9) or other Section of the License
+conflicts with the conditions of the GPLv2, you may retroactively and
+prospectively choose to deem waived or otherwise exclude such Section(s) of
+the License, but only in their entirety and only with respect to the Combined
+Software.
+
+==============================================================================
+Software from third parties included in the LLVM Project:
+==============================================================================
+The LLVM Project contains third party software which is under different license
+terms. All such code will be identified clearly using at least one of two
+mechanisms:
+1) It will be in a separate directory tree with its own `LICENSE.txt` or
+   `LICENSE` file at the top containing the specific license and restrictions
+   which apply to that software, or
+2) It will contain specific license and restriction terms at the top of every
+   file.
+
+==============================================================================
+Legacy LLVM License (https://llvm.org/docs/DeveloperPolicy.html#legacy):
+==============================================================================
+
+The orc-rt library is dual licensed under both the University of Illinois
+"BSD-Like" license and the MIT license.  As a user of this code you may choose
+to use it under either license.  As a contributor, you agree to allow your code
+to be used under both.
+
+Full text of the relevant licenses is included below.
+
+==============================================================================
+
+University of Illinois/NCSA
+Open Source License
+
+Copyright (c) 2009-2019 by the contributors listed in CREDITS.TXT
+
+All rights reserved.
+
+Developed by:
+
+    LLVM Team
+
+    University of Illinois at Urbana-Champaign
+
+    http://llvm.org
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal with
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimers.
+
+    * Redistributions in binary form must reproduce the above copyright notice,
+      this list of conditions and the following disclaimers in the
+      documentation and/or other materials provided with the distribution.
+
+    * Neither the names of the LLVM Team, University of Illinois at
+      Urbana-Champaign, nor the names of its contributors may be used to
+      endorse or promote products derived from this Software without specific
+      prior written permission.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE
+SOFTWARE.
+
+==============================================================================
+
+Copyright (c) 2009-2014 by the contributors listed in CREDITS.TXT
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/orc-rt/docs/Building-ORC-RT.rst b/orc-rt/docs/Building-ORC-RT.rst
new file mode 100644
index 00000000000000..505579a8e1f317
--- /dev/null
+++ b/orc-rt/docs/Building-ORC-RT.rst
@@ -0,0 +1,90 @@
+.. _Building_ORC_RT:
+
+==================
+Building ORC-RT
+==================
+
+.. contents::
+  :local:
+
+.. _build instructions:
+
+Getting Started
+===============
+
+The basic steps needed to build orc-rt are:
+
+#. Checkout llvm-project:
+
+   * ``cd where-you-want-llvm-to-live``
+   * ``git clone https://github.com/llvm/llvm-project.git``
+
+#. Configure and build orc-rt:
+
+   CMake is the only supported configuration system.
+
+   Clang is the preferred compiler when building and using orc-rt.
+
+   * ``cd where you want to build llvm``
+   * ``mkdir build``
+   * ``cd build``
+   * ``cmake -G <generator> -DLLVM_ENABLE_RUNTIMES=orc-rt [options] <llvm-monorepo>/runtimes``
+
+   For more information about configuring orc-rt see :ref:`CMake Options`.
+
+   * ``make orc-rt`` --- will build orc-rt.
+   * ``make check-orc-rt`` --- will run the test suite.
+
+   Shared and static libraries for orc-rt should now be present in
+   llvm/build/lib.
+
+#. **Optional**: Install orc-rt
+
+   Remember Use the CMake option ``CMAKE_INSTALL_PREFIX`` to select a safe
+   place to install orc-rt.
+
+   * ``make install-orc-rt`` --- Will install the libraries and the headers
+
+.. _CMake Options:
+
+CMake Options
+=============
+
+Here are some of the CMake variables that are used often, along with a
+brief explanation and LLVM-specific notes. For full documentation, check the
+CMake docs or execute ``cmake --help-variable VARIABLE_NAME``.
+
+**CMAKE_BUILD_TYPE**:STRING
+  Sets the build type for ``make`` based generators. Possible values are
+  Release, Debug, RelWithDebInfo and MinSizeRel. On systems like Visual Studio
+  the user sets the build type with the IDE settings.
+
+**CMAKE_INSTALL_PREFIX**:PATH
+  Path where LLVM will be installed if "make install" is invoked or the
+  "INSTALL" target is built.
+
+**CMAKE_CXX_COMPILER**:STRING
+  The C++ compiler to use when building and testing orc-rt.
+
+.. _orc-rt-specific options:
+
+orc-rt specific options
+--------------------------
+
+.. option:: ORC_RT_ENABLE_ASSERTIONS:BOOL
+
+  **Default**: ``ON``
+
+  Toggle assertions independent of the build mode.
+
+.. option:: ORC_RT_ENABLE_PEDANTIC:BOOL
+
+  **Default**: ``ON``
+
+  Compile with -Wpedantic.
+
+.. option:: ORC_RT_ENABLE_WERROR:BOOL
+
+  **Default**: ``ON``
+
+  Compile with -Werror
diff --git a/orc-rt/docs/CMakeLists.txt b/orc-rt/docs/CMakeLists.txt
new file mode 100644
index 00000000000000..8709000c6254ef
--- /dev/null
+++ b/orc-rt/docs/CMakeLists.txt
@@ -0,0 +1,8 @@
+if (LLVM_ENABLE_SPHINX)
+  include(AddSphinxTarget)
+  if (SPHINX_FOUND)
+    if (${SPHINX_OUTPUT_HTML})
+      add_sphinx_target(html orc-rt)
+    endif()
+  endif()
+endif()
diff --git a/orc-rt/docs/README.txt b/orc-rt/docs/README.txt
new file mode 100644
index 00000000000000..067d026636eb0a
--- /dev/null
+++ b/orc-rt/docs/README.txt
@@ -0,0 +1,13 @@
+ORC-RT Documentation
+====================
+
+The ORC-RT documentation is written using the Sphinx documentation generator. It is
+currently tested with Sphinx 1.1.3.
+
+To build the documents into html configure ORC-RT with the following cmake options:
+
+  * -DLLVM_ENABLE_SPHINX=ON
+  * -DORC_RT_INCLUDE_DOCS=ON
+
+After configuring ORC-RT with these options the make rule `docs-orc-rt-html`
+should be available.
diff --git a/orc-rt/docs/conf.py b/orc-rt/docs/conf.py
new file mode 100644
index 00000000000000..17e77d021dc549
--- /dev/null
+++ b/orc-rt/docs/conf.py
@@ -0,0 +1,252 @@
+# -*- coding: utf-8 -*-
+#
+# orc-rt documentation build configuration file.
+#
+# This file is execfile()d with the current directory set to its containing dir.
+#
+# Note that not all possible configuration values are present in this
+# autogenerated file.
+#
+# All configuration values have a default; values that are commented out
+# serve to show the default.
+
+import sys, os
+from datetime import date
+
+# If extensions (or modules to document with autodoc) are in another directory,
+# add these directories to sys.path here. If the directory is relative to the
+# documentation root, use os.path.abspath to make it absolute, like shown here.
+# sys.path.insert(0, os.path.abspath('.'))
+
+# -- General configuration -----------------------------------------------------
+
+# If your documentation needs a minimal Sphinx version, state it here.
+# needs_sphinx = '1.0'
+
+# Add any Sphinx extension module names here, as strings. They can be extensions
+# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
+extensions = ["sphinx.ext.intersphinx", "sphinx.ext.todo"]
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ["_templates"]
+
+# The suffix of source filenames.
+source_suffix = ".rst"
+
+# The encoding of source files.
+# source_encoding = 'utf-8-sig'
+
+# The master toctree document.
+master_doc = "index"
+
+# General information about the project.
+project = "orc-rt"
+copyright = "2021-%d, LLVM Project" % date.today().year
+
+# The version info for the project you're documenting, acts as replacement for
+# |version| and |release|, also used in various other places throughout the
+# built documents.
+#
+# The short X.Y version.
+version = "17.0"
+# The full version, including alpha/beta/rc tags.
+release = "17.0"
+
+# The language for content autogenerated by Sphinx. Refer to documentation
+# for a list of supported languages.
+# language = None
+
+# There are two options for replacing |today|: either, you set today to some
+# non-false value, then it is used:
+# today = ''
+# Else, today_fmt is used as the format for a strftime call.
+today_fmt = "%Y-%m-%d"
+
+# List of patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+exclude_patterns = ["_build"]
+
+# The reST default role (used for this markup: `text`) to use for all documents.
+# default_role = None
+
+# If true, '()' will be appended to :func: etc. cross-reference text.
+# add_function_parentheses = True
+
+# If true, the current module name will be prepended to all description
+# unit titles (such as .. function::).
+# add_module_names = True
+
+# If true, sectionauthor and moduleauthor directives will be shown in the
+# output. They are ignored by default.
+show_authors = True
+
+# The name of the Pygments (syntax highlighting) style to use.
+pygments_style = "friendly"
+
+# A list of ignored prefixes for module index sorting.
+# modindex_common_prefix = []
+
+
+# -- Options for HTML output ---------------------------------------------------
+
+# The theme to use for HTML and HTML Help pages.  See the documentation for
+# a list of builtin themes.
+html_theme = "haiku"
+
+# Theme options are theme-specific and customize the look and feel of a theme
+# further.  For a list of options available for each theme, see the
+# documentation.
+# html_theme_options = {}
+
+# Add any paths that contain custom themes here, relative to this directory.
+# html_theme_path = []
+
+# The name for this set of Sphinx documents.  If None, it defaults to
+# "<project> v<release> documentation".
+# html_title = None
+
+# A shorter title for the navigation bar.  Default is the same as html_title.
+# html_short_title = None
+
+# The name of an image file (relative to this directory) to place at the top
+# of the sidebar.
+# html_logo = None
+
+# The name of an image file (within the static path) to use as favicon of the
+# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
+# pixels large.
+# html_favicon = None
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = []
+
+# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
+# using the given strftime format.
+# html_last_updated_fmt = '%b %d, %Y'
+
+# If true, SmartyPants will be used to convert quotes and dashes to
+# typographically correct entities.
+# html_use_smartypants = True
+
+# Custom sidebar templates, maps document names to template names.
+# html_sidebars = {}
+
+# Additional templates that should be rendered to pages, maps page names to
+# template names.
+# html_additional_pages = {}
+
+# If false, no module index is generated.
+# html_domain_indices = True
+
+# If false, no index is generated.
+# html_use_index = True
+
+# If true, the index is split into individual pages for each letter.
+# html_split_index = False
+
+# If true, links to the reST sources are added to the pages.
+# html_show_sourcelink = True
+
+# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
+# html_show_sphinx = True
+
+# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
+# html_show_copyright = True
+
+# If true, an OpenSearch description file will be output, and all pages will
+# contain a <link> tag referring to it.  The value of this option must be the
+# base URL from which the finished HTML is served.
+# html_use_opensearch = ''
+
+# This is the file name suffix for HTML files (e.g. ".xhtml").
+# html_file_suffix = None
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = "orc-rt-doc"
+
+
+# -- Options for LaTeX output --------------------------------------------------
+
+latex_elements = {
+    # The paper size ('letterpaper' or 'a4paper').
+    #'papersize': 'letterpaper',
+    # The font size ('10pt', '11pt' or '12pt').
+    #'pointsize': '10pt',
+    # Additional stuff for the LaTeX preamble.
+    #'preamble': '',
+}
+
+# Grouping the document tree into LaTeX files. List of tuples
+# (source start file, target name, title, author, documentclass [howto/manual]).
+latex_documents = [
+    ("contents", "orc-rt.tex", "orc-rt Documentation", "LLVM project", "manual"),
+]
+
+# The name of an image file (relative to this directory) to place at the top of
+# the title page.
+# latex_logo = None
+
+# For "manual" documents, if this is true, then toplevel headings are parts,
+# not chapters.
+# latex_use_parts = False
+
+# If true, show page references after internal links.
+# latex_show_pagerefs = False
+
+# If true, show URL addresses after external links.
+# latex_show_urls = False
+
+# Documents to append as an appendix to all manuals.
+# latex_appendices = []
+
+# If false, no module index is generated.
+# latex_domain_indices = True
+
+
+# -- Options for manual page output --------------------------------------------
+
+# One entry per manual page. List of tuples
+# (source start file, name, description, authors, manual section).
+man_pages = [("contents", "orc-rt", "orc-rt Documentation", ["LLVM project"], 1)]
+
+# If true, show URL addresses after external links.
+# man_show_urls = False
+
+
+# -- Options for Texinfo output ------------------------------------------------
+
+# Grouping the document tree into Texinfo files. List of tuples
+# (source start file, target name, title, author,
+#  dir menu entry, description, category)
+texinfo_documents = [
+    (
+        "contents",
+        "orc-rt",
+        "orc-rt Documentation",
+        "LLVM project",
+        "orc-rt",
+        "LLVM ORC Runtime",
+        "Miscellaneous",
+    ),
+]
+
+# Documents to append as an appendix to all manuals.
+# texinfo_appendices = []
+
+# If false, no module index is generated.
+# texinfo_domain_indices = True
+
+# How to display URL addresses: 'footnote', 'no', or 'inline'.
+# texinfo_show_urls = 'footnote'
+
+
+# FIXME: Define intersphinx configuration.
+intersphinx_mapping = {}
+
+
+# -- Options for extensions ----------------------------------------------------
+
+# Enable this if you want TODOs to show up in the generated documentation.
+todo_include_todos = True
diff --git a/orc-rt/docs/index.rst b/orc-rt/docs/index.rst
new file mode 100644
index 00000000000000..70632605dd38d5
--- /dev/null
+++ b/orc-rt/docs/index.rst
@@ -0,0 +1,66 @@
+.. _index:
+
+=======================
+LLVM ORC Runtime
+=======================
+
+Overview
+========
+
+The ORC runtime provides executor-side support code for the LLVM ORC APIs.
+
+Getting Started with the ORC Runtime
+------------------------------------
+
+.. toctree::
+   :maxdepth: 2
+
+   Building-ORC-RT
+
+Current Status
+--------------
+
+The ORC Runtime is a new, experimental project. It is being actively developed,
+and neither the ABI nor API are stable. LLVM ORC API clients should be careful
+to use an ORC Runtime from the same build as their LLVM ORC libraries.
+
+Platform and Compiler Support
+-----------------------------
+
+* TOOD
+
+The following minimum compiler versions are strongly recommended.
+
+* Clang 16 and above
+
+Anything older *may* work.
+
+Notes and Known Issues
+----------------------
+
+* TODO
+
+Getting Involved
+================
+
+First please review our `Developer's Policy <https://llvm.org/docs/DeveloperPolicy.html>`__
+and `Getting started with LLVM <https://llvm.org/docs/GettingStarted.html>`__.
+
+**Bug Reports**
+
+If you think you've found a bug in the ORC Runtime, please report it using
+the `LLVM bug tracker`_. Please use the tag "orc-rt" for new threads.
+
+**Patches**
+
+If you want to contribute a patch to th ORC runtime, please start by reading the LLVM
+`documentation about contributing <https://www.llvm.org/docs/Contributing.html>`__.
+
+**Discussion and Questions**
+
+* TODO
+
+Quick Links
+===========
+* `LLVM Homepage <https://llvm.org/>`_
+* `LLVM Bug Tracker <https://github.com/llvm/llvm-project/labels/orc-rt/>`_
diff --git a/orc-rt/include/orc-rt-c/orc-rt.h b/orc-rt/include/orc-rt-c/orc-rt.h
index 324d6dc05ec72e..31ef74f6c1e9b8 100644
--- a/orc-rt/include/orc-rt-c/orc-rt.h
+++ b/orc-rt/include/orc-rt-c/orc-rt.h
@@ -17,8 +17,14 @@
 extern "C" {
 #endif
 
+/// \addtogroup orc_rt_c_api orc-rt C APIs
+/// @{
+
 void orc_rt(void);
 
+/// @}
+///
+
 #ifdef __cplusplus
 } // extern "C"
 #endif

>From 4a0393838f871c2fdcb623a9a4aa6d0ba2b90df5 Mon Sep 17 00:00:00 2001
From: Lang Hames <lhames at gmail.com>
Date: Thu, 31 Oct 2024 09:08:03 -0700
Subject: [PATCH 09/13] Remove CREDITS.TXT

---
 orc-rt/CREDITS.TXT | 13 -------------
 1 file changed, 13 deletions(-)
 delete mode 100644 orc-rt/CREDITS.TXT

diff --git a/orc-rt/CREDITS.TXT b/orc-rt/CREDITS.TXT
deleted file mode 100644
index 51192b40d27312..00000000000000
--- a/orc-rt/CREDITS.TXT
+++ /dev/null
@@ -1,13 +0,0 @@
-This file is a partial list of people who have contributed to the LLVM
-project. If you have contributed a patch or made some other contribution to
-LLVM, please submit a patch to this file to add yourself, and it will be
-done!
-
-The list is sorted by surname and formatted to allow easy grepping and
-beautification by scripts.  The fields are: name (N), email (E), web-address
-(W), PGP key ID and fingerprint (P), description (D), snail-mail address
-(S), and (I) IRC handle.
-
-N: Lang Hames
-E: lhames at gmail.com
-D: Initial code

>From e872a8c504c821494b2a8afd9bf130b3f827d6a3 Mon Sep 17 00:00:00 2001
From: Lang Hames <lhames at gmail.com>
Date: Thu, 31 Oct 2024 09:08:17 -0700
Subject: [PATCH 10/13] Remove legacy license text.

---
 orc-rt/LICENSE.TXT | 77 ----------------------------------------------
 1 file changed, 77 deletions(-)

diff --git a/orc-rt/LICENSE.TXT b/orc-rt/LICENSE.TXT
index 55b05e381cfdf2..53bb2e7fbc7643 100644
--- a/orc-rt/LICENSE.TXT
+++ b/orc-rt/LICENSE.TXT
@@ -232,80 +232,3 @@ mechanisms:
    which apply to that software, or
 2) It will contain specific license and restriction terms at the top of every
    file.
-
-==============================================================================
-Legacy LLVM License (https://llvm.org/docs/DeveloperPolicy.html#legacy):
-==============================================================================
-
-The orc-rt library is dual licensed under both the University of Illinois
-"BSD-Like" license and the MIT license.  As a user of this code you may choose
-to use it under either license.  As a contributor, you agree to allow your code
-to be used under both.
-
-Full text of the relevant licenses is included below.
-
-==============================================================================
-
-University of Illinois/NCSA
-Open Source License
-
-Copyright (c) 2009-2019 by the contributors listed in CREDITS.TXT
-
-All rights reserved.
-
-Developed by:
-
-    LLVM Team
-
-    University of Illinois at Urbana-Champaign
-
-    http://llvm.org
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal with
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
-of the Software, and to permit persons to whom the Software is furnished to do
-so, subject to the following conditions:
-
-    * Redistributions of source code must retain the above copyright notice,
-      this list of conditions and the following disclaimers.
-
-    * Redistributions in binary form must reproduce the above copyright notice,
-      this list of conditions and the following disclaimers in the
-      documentation and/or other materials provided with the distribution.
-
-    * Neither the names of the LLVM Team, University of Illinois at
-      Urbana-Champaign, nor the names of its contributors may be used to
-      endorse or promote products derived from this Software without specific
-      prior written permission.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
-FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE
-SOFTWARE.
-
-==============================================================================
-
-Copyright (c) 2009-2014 by the contributors listed in CREDITS.TXT
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.

>From bb5fb118194e061e8343e81133b57eac193d45a4 Mon Sep 17 00:00:00 2001
From: Lang Hames <lhames at gmail.com>
Date: Thu, 31 Oct 2024 09:08:43 -0700
Subject: [PATCH 11/13] Fix default for ORC_RT_INCLUDE_DOCS option.

---
 orc-rt/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/orc-rt/CMakeLists.txt b/orc-rt/CMakeLists.txt
index d411ee4cf761dd..8417ae89b62d59 100644
--- a/orc-rt/CMakeLists.txt
+++ b/orc-rt/CMakeLists.txt
@@ -18,7 +18,7 @@ include(GNUInstallDirs)
 # Setup CMake Options
 #===============================================================================
 
-option(ORC_RT_INCLUDE_DOCS "Build the ORC-RT documentation." ${ORC_RT_INCLUDE_DOCS})
+option(ORC_RT_INCLUDE_DOCS "Build the ORC-RT documentation." ON)
 option(ORC_RT_ENABLE_ASSERTIONS "Enable assertions independent of build mode." ON)
 option(ORC_RT_ENABLE_PEDANTIC "Compile with pedantic enabled." ON)
 option(ORC_RT_ENABLE_WERROR "Fail and stop if a warning is triggered." OFF)

>From 267fd012c1b54a1626fb15d1d06c069cf68434c1 Mon Sep 17 00:00:00 2001
From: Lang Hames <lhames at gmail.com>
Date: Thu, 31 Oct 2024 09:09:04 -0700
Subject: [PATCH 12/13] Switch docs from reStructuredText to markdown.

---
 ...Building-ORC-RT.rst => Building-orc-rt.md} | 36 +++------
 orc-rt/docs/conf.py                           | 81 ++++++++++---------
 orc-rt/docs/index.md                          | 54 +++++++++++++
 orc-rt/docs/index.rst                         | 66 ---------------
 4 files changed, 106 insertions(+), 131 deletions(-)
 rename orc-rt/docs/{Building-ORC-RT.rst => Building-orc-rt.md} (77%)
 create mode 100644 orc-rt/docs/index.md
 delete mode 100644 orc-rt/docs/index.rst

diff --git a/orc-rt/docs/Building-ORC-RT.rst b/orc-rt/docs/Building-orc-rt.md
similarity index 77%
rename from orc-rt/docs/Building-ORC-RT.rst
rename to orc-rt/docs/Building-orc-rt.md
index 505579a8e1f317..091a405d907ab1 100644
--- a/orc-rt/docs/Building-ORC-RT.rst
+++ b/orc-rt/docs/Building-orc-rt.md
@@ -1,25 +1,15 @@
-.. _Building_ORC_RT:
+# Building orc-rt
 
-==================
-Building ORC-RT
-==================
-
-.. contents::
-  :local:
-
-.. _build instructions:
-
-Getting Started
-===============
+## Getting Started
 
 The basic steps needed to build orc-rt are:
 
-#. Checkout llvm-project:
+* Checkout llvm-project:
 
    * ``cd where-you-want-llvm-to-live``
    * ``git clone https://github.com/llvm/llvm-project.git``
 
-#. Configure and build orc-rt:
+* Configure and build orc-rt:
 
    CMake is the only supported configuration system.
 
@@ -38,17 +28,14 @@ The basic steps needed to build orc-rt are:
    Shared and static libraries for orc-rt should now be present in
    llvm/build/lib.
 
-#. **Optional**: Install orc-rt
+* **Optional**: Install orc-rt
 
    Remember Use the CMake option ``CMAKE_INSTALL_PREFIX`` to select a safe
    place to install orc-rt.
 
    * ``make install-orc-rt`` --- Will install the libraries and the headers
 
-.. _CMake Options:
-
-CMake Options
-=============
+## CMake Options
 
 Here are some of the CMake variables that are used often, along with a
 brief explanation and LLVM-specific notes. For full documentation, check the
@@ -66,24 +53,21 @@ CMake docs or execute ``cmake --help-variable VARIABLE_NAME``.
 **CMAKE_CXX_COMPILER**:STRING
   The C++ compiler to use when building and testing orc-rt.
 
-.. _orc-rt-specific options:
-
-orc-rt specific options
---------------------------
+## orc-rt specific options
 
-.. option:: ORC_RT_ENABLE_ASSERTIONS:BOOL
+* option:: ORC_RT_ENABLE_ASSERTIONS:BOOL
 
   **Default**: ``ON``
 
   Toggle assertions independent of the build mode.
 
-.. option:: ORC_RT_ENABLE_PEDANTIC:BOOL
+* option:: ORC_RT_ENABLE_PEDANTIC:BOOL
 
   **Default**: ``ON``
 
   Compile with -Wpedantic.
 
-.. option:: ORC_RT_ENABLE_WERROR:BOOL
+* option:: ORC_RT_ENABLE_WERROR:BOOL
 
   **Default**: ``ON``
 
diff --git a/orc-rt/docs/conf.py b/orc-rt/docs/conf.py
index 17e77d021dc549..a33ec439f83881 100644
--- a/orc-rt/docs/conf.py
+++ b/orc-rt/docs/conf.py
@@ -1,6 +1,5 @@
 # -*- coding: utf-8 -*-
-#
-# orc-rt documentation build configuration file.
+# Orc-Rt documentation build configuration file.
 #
 # This file is execfile()d with the current directory set to its containing dir.
 #
@@ -10,9 +9,7 @@
 # All configuration values have a default; values that are commented out
 # serve to show the default.
 
-import sys, os
 from datetime import date
-
 # If extensions (or modules to document with autodoc) are in another directory,
 # add these directories to sys.path here. If the directory is relative to the
 # documentation root, use os.path.abspath to make it absolute, like shown here.
@@ -22,16 +19,32 @@
 
 # If your documentation needs a minimal Sphinx version, state it here.
 # needs_sphinx = '1.0'
-
 # Add any Sphinx extension module names here, as strings. They can be extensions
 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
-extensions = ["sphinx.ext.intersphinx", "sphinx.ext.todo"]
+extensions = [
+    "sphinx.ext.todo",
+    "sphinx.ext.mathjax",
+    "sphinx.ext.intersphinx",
+    "sphinx.ext.autodoc",
+]
+
+# When building man pages, we do not use the markdown pages,
+# So, we can continue without the myst_parser dependencies.
+# Doing so reduces dependencies of some packaged llvm distributions.
+try:
+    import myst_parser
+
+    extensions.append("myst_parser")
+except ImportError:
+    if not tags.has("builder-man"):
+        raise
+
 
 # Add any paths that contain templates here, relative to this directory.
 templates_path = ["_templates"]
+myst_heading_anchors = 6
 
-# The suffix of source filenames.
-source_suffix = ".rst"
+import sphinx
 
 # The encoding of source files.
 # source_encoding = 'utf-8-sig'
@@ -40,17 +53,19 @@
 master_doc = "index"
 
 # General information about the project.
-project = "orc-rt"
-copyright = "2021-%d, LLVM Project" % date.today().year
+project = "Orc-Rt"
+copyright = "2017-%d, The Orc-Rt Team" % date.today().year
 
 # The version info for the project you're documenting, acts as replacement for
 # |version| and |release|, also used in various other places throughout the
-# built documents.
+# built documents. These are currently set to zero because we don't use them.
+# Should somebody consider in the future to change them, they need to be updated
+# everytime a new release comes out.
 #
-# The short X.Y version.
-version = "17.0"
+# The short version.
+# version = '0'
 # The full version, including alpha/beta/rc tags.
-release = "17.0"
+# release = '0'
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
@@ -60,11 +75,11 @@
 # non-false value, then it is used:
 # today = ''
 # Else, today_fmt is used as the format for a strftime call.
-today_fmt = "%Y-%m-%d"
+# today_fmt = '%B %d, %Y'
 
 # List of patterns, relative to source directory, that match files and
 # directories to ignore when looking for source files.
-exclude_patterns = ["_build"]
+exclude_patterns = ["_build", "analyzer", "FIR/*"]
 
 # The reST default role (used for this markup: `text`) to use for all documents.
 # default_role = None
@@ -78,7 +93,7 @@
 
 # If true, sectionauthor and moduleauthor directives will be shown in the
 # output. They are ignored by default.
-show_authors = True
+# show_authors = False
 
 # The name of the Pygments (syntax highlighting) style to use.
 pygments_style = "friendly"
@@ -103,7 +118,7 @@
 
 # The name for this set of Sphinx documents.  If None, it defaults to
 # "<project> v<release> documentation".
-# html_title = None
+html_title = "ORC Runtime"
 
 # A shorter title for the navigation bar.  Default is the same as html_title.
 # html_short_title = None
@@ -120,11 +135,11 @@
 # Add any paths that contain custom static files (such as style sheets) here,
 # relative to this directory. They are copied after the builtin static files,
 # so a file named "default.css" will overwrite the builtin "default.css".
-html_static_path = []
+# html_static_path = []
 
 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
 # using the given strftime format.
-# html_last_updated_fmt = '%b %d, %Y'
+html_last_updated_fmt = "%b %d, %Y"
 
 # If true, SmartyPants will be used to convert quotes and dashes to
 # typographically correct entities.
@@ -166,6 +181,9 @@
 # Output file base name for HTML help builder.
 htmlhelp_basename = "orc-rt-doc"
 
+# If true, the reST sources are included in the HTML build as
+# _sources/name. The default is True.
+html_copy_source = False
 
 # -- Options for LaTeX output --------------------------------------------------
 
@@ -181,7 +199,8 @@
 # Grouping the document tree into LaTeX files. List of tuples
 # (source start file, target name, title, author, documentclass [howto/manual]).
 latex_documents = [
-    ("contents", "orc-rt.tex", "orc-rt Documentation", "LLVM project", "manual"),
+    ("Overview", "Orc-Rt.tex", "orc-rt Documentation", "The orc-rt Team",
+     "manual"),
 ]
 
 # The name of an image file (relative to this directory) to place at the top of
@@ -209,7 +228,7 @@
 
 # One entry per manual page. List of tuples
 # (source start file, name, description, authors, manual section).
-man_pages = [("contents", "orc-rt", "orc-rt Documentation", ["LLVM project"], 1)]
+man_pages = []
 
 # If true, show URL addresses after external links.
 # man_show_urls = False
@@ -222,13 +241,7 @@
 #  dir menu entry, description, category)
 texinfo_documents = [
     (
-        "contents",
-        "orc-rt",
-        "orc-rt Documentation",
-        "LLVM project",
-        "orc-rt",
-        "LLVM ORC Runtime",
-        "Miscellaneous",
+        "Overview",
     ),
 ]
 
@@ -240,13 +253,3 @@
 
 # How to display URL addresses: 'footnote', 'no', or 'inline'.
 # texinfo_show_urls = 'footnote'
-
-
-# FIXME: Define intersphinx configuration.
-intersphinx_mapping = {}
-
-
-# -- Options for extensions ----------------------------------------------------
-
-# Enable this if you want TODOs to show up in the generated documentation.
-todo_include_todos = True
diff --git a/orc-rt/docs/index.md b/orc-rt/docs/index.md
new file mode 100644
index 00000000000000..56f9bb3829c17d
--- /dev/null
+++ b/orc-rt/docs/index.md
@@ -0,0 +1,54 @@
+# LLVM ORC Runtime
+
+## Overview
+
+The ORC runtime provides executor-side support code for the LLVM ORC APIs.
+
+```{eval-rst}
+.. toctree::
+   :titlesonly:
+
+   Building-orc-rt
+```
+
+### Current Status
+
+The ORC Runtime is a new, experimental project. It is being actively developed,
+and neither the ABI nor API are stable. LLVM ORC API clients should be careful
+to use an ORC Runtime from the same build as their LLVM ORC libraries.
+
+### Platform and Compiler Support
+
+* TODO
+
+The following minimum compiler versions are strongly recommended.
+
+* Clang 16 and above
+
+Anything older *may* work.
+
+### Notes and Known Issues
+
+* TODO
+
+## Getting Involved
+
+First please review our
+[Developer's Policy](https://llvm.org/docs/DeveloperPolicy.html) and
+[Getting started with LLVM](https://llvm.org/docs/GettingStarted.html).
+
+**Bug Reports**
+
+If you think you've found a bug in the ORC Runtime, please report it using
+the [LLVM bug tracker](https://github.com/llvm/llvm-project/labels/orc-rt/).
+Please use the tag "orc-rt" for new threads.
+
+**Patches**
+
+If you want to contribute a patch to th ORC runtime, please start by reading
+the LLVM
+[documentation about contributing](https://www.llvm.org/docs/Contributing.html).
+
+**Discussion and Questions**
+
+* TODO
diff --git a/orc-rt/docs/index.rst b/orc-rt/docs/index.rst
deleted file mode 100644
index 70632605dd38d5..00000000000000
--- a/orc-rt/docs/index.rst
+++ /dev/null
@@ -1,66 +0,0 @@
-.. _index:
-
-=======================
-LLVM ORC Runtime
-=======================
-
-Overview
-========
-
-The ORC runtime provides executor-side support code for the LLVM ORC APIs.
-
-Getting Started with the ORC Runtime
-------------------------------------
-
-.. toctree::
-   :maxdepth: 2
-
-   Building-ORC-RT
-
-Current Status
---------------
-
-The ORC Runtime is a new, experimental project. It is being actively developed,
-and neither the ABI nor API are stable. LLVM ORC API clients should be careful
-to use an ORC Runtime from the same build as their LLVM ORC libraries.
-
-Platform and Compiler Support
------------------------------
-
-* TOOD
-
-The following minimum compiler versions are strongly recommended.
-
-* Clang 16 and above
-
-Anything older *may* work.
-
-Notes and Known Issues
-----------------------
-
-* TODO
-
-Getting Involved
-================
-
-First please review our `Developer's Policy <https://llvm.org/docs/DeveloperPolicy.html>`__
-and `Getting started with LLVM <https://llvm.org/docs/GettingStarted.html>`__.
-
-**Bug Reports**
-
-If you think you've found a bug in the ORC Runtime, please report it using
-the `LLVM bug tracker`_. Please use the tag "orc-rt" for new threads.
-
-**Patches**
-
-If you want to contribute a patch to th ORC runtime, please start by reading the LLVM
-`documentation about contributing <https://www.llvm.org/docs/Contributing.html>`__.
-
-**Discussion and Questions**
-
-* TODO
-
-Quick Links
-===========
-* `LLVM Homepage <https://llvm.org/>`_
-* `LLVM Bug Tracker <https://github.com/llvm/llvm-project/labels/orc-rt/>`_

>From 327a64a4cb1e7fa1137c99dbf99c5a4e205a992a Mon Sep 17 00:00:00 2001
From: Lang Hames <lhames at gmail.com>
Date: Thu, 31 Oct 2024 10:21:48 -0700
Subject: [PATCH 13/13] Silence python linter.

---
 orc-rt/docs/conf.py | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/orc-rt/docs/conf.py b/orc-rt/docs/conf.py
index a33ec439f83881..043c8d85157cf2 100644
--- a/orc-rt/docs/conf.py
+++ b/orc-rt/docs/conf.py
@@ -10,6 +10,7 @@
 # serve to show the default.
 
 from datetime import date
+
 # If extensions (or modules to document with autodoc) are in another directory,
 # add these directories to sys.path here. If the directory is relative to the
 # documentation root, use os.path.abspath to make it absolute, like shown here.
@@ -199,8 +200,7 @@
 # Grouping the document tree into LaTeX files. List of tuples
 # (source start file, target name, title, author, documentclass [howto/manual]).
 latex_documents = [
-    ("Overview", "Orc-Rt.tex", "orc-rt Documentation", "The orc-rt Team",
-     "manual"),
+    ("Overview", "Orc-Rt.tex", "orc-rt Documentation", "The orc-rt Team", "manual"),
 ]
 
 # The name of an image file (relative to this directory) to place at the top of
@@ -240,9 +240,7 @@
 # (source start file, target name, title, author,
 #  dir menu entry, description, category)
 texinfo_documents = [
-    (
-        "Overview",
-    ),
+    ( "Overview" ),
 ]
 
 # Documents to append as an appendix to all manuals.



More information about the llvm-commits mailing list