File tree Expand file tree Collapse file tree 5 files changed +81
-0
lines changed Expand file tree Collapse file tree 5 files changed +81
-0
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,8 @@ elseif(NOT CMAKE_SIZEOF_VOID_P EQUAL 8)
23
23
return ()
24
24
endif ()
25
25
26
+ set (OFFLOAD_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} )
27
+
26
28
if (OPENMP_STANDALONE_BUILD )
27
29
set (OFFLOAD_LIBDIR_SUFFIX "" CACHE STRING
28
30
"Suffix of lib installation directory, e.g. 64 => lib64" )
@@ -371,6 +373,7 @@ add_subdirectory(tools/offload-tblgen)
371
373
add_subdirectory (plugins-nextgen )
372
374
add_subdirectory (DeviceRTL )
373
375
add_subdirectory (tools )
376
+ add_subdirectory (docs )
374
377
375
378
# Build target agnostic offloading library.
376
379
add_subdirectory (libomptarget )
Original file line number Diff line number Diff line change
1
+ offload-api.rst
Original file line number Diff line number Diff line change
1
+ if (LLVM_ENABLE_SPHINX )
2
+ include (AddSphinxTarget )
3
+ if (SPHINX_FOUND AND SPHINX_OUTPUT_HTML )
4
+ # Generate offload-api.rst from OffloadAPI.td
5
+ set (LLVM_TARGET_DEFINITIONS
6
+ ${OFFLOAD_SOURCE_DIR} /liboffload/API/OffloadAPI.td )
7
+ tablegen (OFFLOAD source /offload-api.rst -gen-spec
8
+ EXTRA_INCLUDES ${OFFLOAD_SOURCE_DIR} /liboffload/API )
9
+ add_public_tablegen_target (OffloadDocsGenerate )
10
+
11
+ # Due to Sphinx only allowing a single source direcotry and the fact we
12
+ # only generate a single file, copy offload-api.rst to the source directory
13
+ # to be included in the generated documentation. A .gitignore file ensures
14
+ # offload-api.rst will not be added to the repository.
15
+ add_custom_target (OffloadDocsCopy
16
+ COMMAND ${CMAKE_COMMAND} -E copy
17
+ ${CMAKE_CURRENT_BINARY_DIR} /source/offload-api.rst
18
+ ${CMAKE_CURRENT_SOURCE_DIR} /offload-api.rst )
19
+
20
+ # Generate the HTML documentation, invoked wt the docs-offload-html target.
21
+ add_sphinx_target (html offload
22
+ SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} )
23
+ add_dependencies (docs-offload-html OffloadDocsGenerate OffloadDocsCopy )
24
+ endif ()
25
+ endif ()
Original file line number Diff line number Diff line change
1
+ # Configuration file for the Sphinx documentation builder.
2
+ #
3
+ # For the full list of built-in configuration values, see the documentation:
4
+ # https://www.sphinx-doc.org/en/master/usage/configuration.html
5
+
6
+ # -- Project information -----------------------------------------------------
7
+ # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
8
+
9
+ project = "Offload"
10
+ copyright = "2025, LLVM project"
11
+ author = "LLVM project"
12
+
13
+ # -- General configuration ---------------------------------------------------
14
+ # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
15
+
16
+ extensions = []
17
+
18
+ templates_path = ["_templates" ]
19
+ exclude_patterns = []
20
+
21
+ # -- C domain configuration --------------------------------------------------
22
+ # https://www.sphinx-doc.org/en/master/usage/configuration.html#c-config
23
+
24
+ c_maximum_signature_line_length = 60
25
+
26
+ # -- Options for HTML output -------------------------------------------------
27
+ # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
28
+
29
+ html_theme = "llvm-theme"
30
+ html_theme_path = ["_themes" ]
31
+ html_static_path = ["_static" ]
Original file line number Diff line number Diff line change
1
+ .. Offload documentation master file, created by
2
+ sphinx-quickstart on Fri Jul 4 14:59:13 2025.
3
+ You can adapt this file completely to your liking, but it should at least
4
+ contain the root `toctree` directive.
5
+
6
+ Welcome to Offload's documentation!
7
+ ===================================
8
+
9
+ .. toctree ::
10
+ :maxdepth: 2
11
+ :caption: Contents:
12
+
13
+ offload-api
14
+
15
+
16
+ Indices and tables
17
+ ==================
18
+
19
+ * :ref: `genindex `
20
+ * :ref: `modindex `
21
+ * :ref: `search `
You can’t perform that action at this time.
0 commit comments