-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Enable CppInterOp #16814
Draft
aaronj0
wants to merge
2
commits into
root-project:master
Choose a base branch
from
aaronj0:enable-interop
base: master
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.
Draft
Enable CppInterOp #16814
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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 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 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 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 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 |
---|---|---|
|
@@ -599,3 +599,29 @@ mark_as_advanced(FORCE BUG_REPORT_URL BUILD_CLANG_FORMAT_VS_PLUGIN BUILD_SHARED_ | |
C_INCLUDE_DIRS DEFAULT_SYSROOT FFI_INCLUDE_DIR FFI_LIBRARY_DIR | ||
GCC_INSTALL_PREFIX LIBCLANG_BUILD_STATIC TOOL_INFO_PLIST) | ||
mark_as_advanced(CLEAR LLVM_ENABLE_ASSERTIONS LLVM_BUILD_TYPE) | ||
|
||
|
||
##################### LIBINTEROP ########################### | ||
# Set the paths to Cling, Clang, and LLVM directories | ||
|
||
# if (cppinterop) | ||
|
||
set(LLVM_DIR "${CMAKE_BINARY_DIR}/interpreter/llvm-project/llvm/lib/cmake/llvm") | ||
set(Clang_DIR "${CMAKE_BINARY_DIR}/interpreter/llvm-project/llvm/tools/clang/lib/cmake/clang") | ||
set(Cling_DIR "${CMAKE_BINARY_DIR}/interpreter/cling") | ||
Comment on lines
+609
to
+611
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will need adapting for externally built LLVM, Clang, and / or Cling. For LLVM and Clang, I believe this should already be taken care of above, no? |
||
set(CPPINTEROP_INCLUDE_DIRS | ||
${CMAKE_SOURCE_DIR}/interpreter/CppInterOp/include | ||
CACHE STRING "CppInterOp include directories.") | ||
|
||
# message(STATUS "LLVM_DIR: ${LLVM_DIR}") | ||
# message(STATUS "CLING: ${Cling_DIR}") | ||
# message(STATUS "CLANG: ${Clang_DIR}") | ||
# message(STATUS "CLANG INCLUDE DIR: ${CLANG_INCLUDE_DIRS}") | ||
# message(STATUS "IOP INCLUDE DIR: ${CPPINTEROP_INCLUDE_DIRS}") | ||
|
||
set(USE_CLING ON CACHE BOOL "Use Cling as backend" FORCE) | ||
set(USE_REPL OFF CACHE BOOL "Use Clang-repl as backend" FORCE) | ||
|
||
add_subdirectory(CppInterOp) | ||
|
||
# endif() |
This file contains 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,17 @@ | ||
BasedOnStyle: LLVM | ||
|
||
Language: Cpp | ||
Standard: Cpp11 | ||
PointerAlignment: Left | ||
|
||
IncludeCategories: | ||
- Regex: '^"[^/]+\"' | ||
Priority: 10 | ||
- Regex: '^"cling/' | ||
Priority: 20 | ||
- Regex: '^"clang/' | ||
Priority: 30 | ||
- Regex: '^"llvm/' | ||
Priority: 40 | ||
- Regex: '^<' | ||
Priority: 50 |
This file contains 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,59 @@ | ||
Checks: > | ||
-*, | ||
bugprone-*, | ||
clang-diagnostic-*, | ||
clang-analyzer-*, | ||
cppcoreguidelines-*, | ||
llvm-*, | ||
misc-*, | ||
modernize-*, | ||
performance-*, | ||
portability-*, | ||
readability-*, | ||
-bugprone-narrowing-conversions, | ||
-bugprone-easily-swappable-parameters, | ||
-bugprone-implicit-widening-of-multiplication-result, | ||
-bugprone-unchecked-optional-access, | ||
-misc-const-correctness, | ||
-misc-unused-parameters, | ||
-misc-non-private-member-variables-in-classes, | ||
-misc-no-recursion, | ||
-misc-use-anonymous-namespace, | ||
-modernize-return-braced-init-list, | ||
-modernize-use-trailing-return-type, | ||
-readability-braces-around-statements, | ||
-readability-identifier-length, | ||
-readability-implicit-bool-conversion, | ||
-readability-magic-numbers, | ||
-readability-named-parameter, | ||
-readability-function-cognitive-complexity, | ||
-readability-redundant-access-specifiers, | ||
-cppcoreguidelines-avoid-magic-numbers, | ||
-cppcoreguidelines-init-variables, | ||
-cppcoreguidelines-pro-bounds-pointer-arithmetic, | ||
-cppcoreguidelines-pro-type-member-init, | ||
-llvm-namespace-comment | ||
|
||
CheckOptions: | ||
- key: readability-identifier-naming.ClassCase | ||
value: aNy_CasE | ||
- key: readability-identifier-naming.FunctionCase | ||
value: aNy_CasE | ||
- key: readability-identifier-naming.MemberCase | ||
value: aNy_CasE | ||
- key: readability-identifier-naming.ParameterCase | ||
value: aNy_CasE | ||
- key: readability-identifier-naming.UnionCase | ||
value: CamelCase | ||
- key: readability-identifier-naming.VariableCase | ||
value: aNy_CasE | ||
- key: readability-identifier-naming.IgnoreMainLikeFunctions | ||
value: 1 | ||
- key: cppcoreguidelines-avoid-magic-numbers.IgnoreMacros | ||
value: 1 | ||
- key: cppcoreguidelines-pro-bounds-pointer-arithmetic.Pessimistic | ||
value: 1 | ||
- key: cppcoreguidelines-pro-type-member-init.InitWithEquals | ||
value: 1 | ||
- key: llvm-namespace-comment.Spaces | ||
value: 2 |
This file contains 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,25 @@ | ||
codecov: | ||
require_ci_to_pass: no | ||
|
||
coverage: | ||
precision: 2 | ||
round: down | ||
range: "70...100" | ||
|
||
status: | ||
project: yes | ||
patch: yes | ||
changes: no | ||
|
||
parsers: | ||
gcov: | ||
branch_detection: | ||
conditional: yes | ||
loop: yes | ||
method: no | ||
macro: no | ||
|
||
comment: | ||
layout: "reach, diff, flags, tree, files" | ||
behavior: default | ||
require_changes: no |
This file contains 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,39 @@ | ||
# Prerequisites | ||
*.d | ||
|
||
# Compiled Object files | ||
*.slo | ||
*.lo | ||
*.o | ||
*.obj | ||
|
||
# Precompiled Headers | ||
*.gch | ||
*.pch | ||
|
||
# Compiled Dynamic libraries | ||
*.so | ||
*.dylib | ||
*.dll | ||
|
||
# Fortran module files | ||
*.mod | ||
*.smod | ||
|
||
# Compiled Static libraries | ||
*.lai | ||
*.la | ||
*.a | ||
*.lib | ||
|
||
# Executables | ||
*.exe | ||
*.out | ||
*.app | ||
|
||
# Directories | ||
build | ||
install | ||
|
||
# CLion files | ||
.idea |
This file contains 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,16 @@ | ||
version: 2 | ||
|
||
sphinx: | ||
configuration: docs/conf.py | ||
builder: html | ||
|
||
build: | ||
os: "ubuntu-22.04" | ||
tools: | ||
python: "3.11" | ||
apt_packages: | ||
- clang-13 | ||
- cmake | ||
- libclang-13-dev | ||
- llvm-13-dev | ||
- llvm-13-tools |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not needed yet