-
Notifications
You must be signed in to change notification settings - Fork 14.8k
[ORC-RT] Initial check-in for a new, top-level ORC runtime project. #113499
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
lhames
wants to merge
26
commits into
llvm:main
Choose a base branch
from
lhames:new-new-orc-rt
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 8 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
fb7698d
[ORC-RT] Initial check-in for a new, top-level ORC runtime project.
lhames f801afb
clang-format
lhames 6011619
Simplify CMake files, add install support.
lhames 81dc0e4
Use '//' style comments.
lhames 7106b9d
Add missing copyright header.
lhames db27097
Use 'install (DIRECTORY...' instead of file sets.
lhames b0eb599
Add missing copyright header.
lhames 400d2fc
Add license and documentation.
lhames 4a03938
Remove CREDITS.TXT
lhames e872a8c
Remove legacy license text.
lhames bb5fb11
Fix default for ORC_RT_INCLUDE_DOCS option.
lhames 267fd01
Switch docs from reStructuredText to markdown.
lhames 327a64a
Silence python linter.
lhames 0a25634
Python linter is persnickety.
lhames b348769
Update orc-rt/docs/Building-orc-rt.md
lhames 7a3a185
[ORC-RT][docs] Fix copyright year and project name capitalization.
b804b1f
[ORC-RT] Update sphinx version.
lhames c57f7ce
[ORC-RT] Add TODO to switch to filesets when we can.
lhames e31c343
Specify COMPONENT for headers, use 'install(TARGETS ...' rather than
lhames e512c16
Rename project LibOrcRT -> OrcRT.
lhames 91e73b1
Remove unnecessary target_include_directories(...)
lhames ea1955d
Adding ways to find utils during a RT build
jaredwy cab25e9
Merge branch 'main' into new-new-orc-rt
lhames 3d624db
Update lit.cfg.py to fix formatting.
lhames 124d7e4
Merge branch 'main' into new-new-orc-rt
lhames 6957220
Merge branch 'main' into new-new-orc-rt
lhames File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# CMake build for ORC-RT. | ||
|
||
#=============================================================================== | ||
# Setup Project | ||
#=============================================================================== | ||
|
||
cmake_minimum_required(VERSION 3.20.0) | ||
|
||
set(LLVM_COMMON_CMAKE_UTILS ${CMAKE_CURRENT_SOURCE_DIR}/../cmake) | ||
include(${LLVM_COMMON_CMAKE_UTILS}/Modules/CMakePolicy.cmake | ||
NO_POLICY_SCOPE) | ||
|
||
project(LibOrcRT LANGUAGES C CXX ASM) | ||
|
||
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) | ||
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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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: [email protected] | ||
D: Initial code | ||
lhames marked this conversation as resolved.
Show resolved
Hide resolved
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
.. _Building_ORC_RT: | ||
lhames marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
================== | ||
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() | ||
lhames marked this conversation as resolved.
Show resolved
Hide resolved
|
||
endif() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. | ||
lhames marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
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. |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.