-
Notifications
You must be signed in to change notification settings - Fork 7.5k
[slang] Add new port (version 10.0) #50116
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
Merged
Merged
Changes from all commits
Commits
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt | ||
| index 1234567..abcdefg 100644 | ||
| --- a/external/CMakeLists.txt | ||
| +++ b/external/CMakeLists.txt | ||
| @@ -44,7 +44,8 @@ endif() | ||
|
|
||
| if(fmt_FOUND) | ||
| get_target_property(FMT_CFG fmt::fmt IMPORTED_CONFIGURATIONS) | ||
| - get_target_property(FMT_LIB fmt::fmt IMPORTED_LOCATION_${FMT_CFG}) | ||
| + list(GET FMT_CFG 0 FMT_CFG_FIRST) | ||
| + get_target_property(FMT_LIB fmt::fmt IMPORTED_LOCATION_${FMT_CFG_FIRST}) | ||
| get_target_property(FMT_INC fmt::fmt INTERFACE_INCLUDE_DIRECTORIES) | ||
| message(STATUS "Found system fmt library: ${FMT_LIB}") | ||
| message(STATUS "Using system fmt include: ${FMT_INC}") | ||
| @@ -76,7 +77,7 @@ if(SLANG_USE_MIMALLOC) | ||
|
|
||
| set(find_pkg_args "") | ||
| if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.24.0") | ||
| - set(find_pkg_args "FIND_PACKAGE_ARGS" "${mimalloc_min_version}") | ||
| + set(find_pkg_args "FIND_PACKAGE_ARGS") | ||
| endif() | ||
|
|
||
| set(MI_OVERRIDE | ||
| @@ -116,8 +117,9 @@ if(SLANG_USE_MIMALLOC) | ||
| endif() | ||
|
|
||
| get_target_property(MIMALLOC_CFG ${mimalloc_target} IMPORTED_CONFIGURATIONS) | ||
| - get_target_property(MIMALLOC_LIB ${mimalloc_target} | ||
| - IMPORTED_LOCATION_${MIMALLOC_CFG}) | ||
| + list(GET MIMALLOC_CFG 0 MIMALLOC_CFG_FIRST) | ||
| + get_target_property(MIMALLOC_LIB ${mimalloc_target} | ||
| + IMPORTED_LOCATION_${MIMALLOC_CFG_FIRST}) | ||
| get_target_property(MIMALLOC_INC ${mimalloc_target} | ||
| INTERFACE_INCLUDE_DIRECTORIES) | ||
| message(STATUS "Found system mimalloc library: ${MIMALLOC_LIB}") |
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,60 @@ | ||
| vcpkg_from_github( | ||
| OUT_SOURCE_PATH SOURCE_PATH | ||
| REPO MikePopoloski/slang | ||
| REF "v${VERSION}" | ||
| SHA512 f8402e422e8278be363d4630f264885230f11dcf969ffeafefc88c0ac5d0761dd81e7ee5d50bab1d4363d0783600bb974181db78609c021bde4406d8fcf1dbc5 | ||
| HEAD_REF master | ||
| PATCHES | ||
| fix-get-target-property.patch | ||
| use-expected-lite.patch | ||
| ) | ||
|
|
||
| vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS | ||
| FEATURES | ||
| mimalloc SLANG_USE_MIMALLOC | ||
| tools SLANG_INCLUDE_TOOLS | ||
| ) | ||
|
|
||
| vcpkg_find_acquire_program(PYTHON3) | ||
|
|
||
| vcpkg_cmake_configure( | ||
| SOURCE_PATH "${SOURCE_PATH}" | ||
| OPTIONS | ||
| ${FEATURE_OPTIONS} | ||
| "-DPython_EXECUTABLE=${PYTHON3}" | ||
| -DSLANG_INCLUDE_TESTS=OFF | ||
| -DSLANG_INCLUDE_DOCS=OFF | ||
| -DSLANG_INCLUDE_PYLIB=OFF | ||
| -DSLANG_INCLUDE_INSTALL=ON | ||
| -DSLANG_INCLUDE_COVERAGE=OFF | ||
| -DSLANG_USE_CPPTRACE=OFF | ||
| ) | ||
|
|
||
| vcpkg_cmake_install() | ||
| vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/slang") | ||
|
|
||
| # Move misplaced pkgconfig files to the correct directory | ||
| if(EXISTS "${CURRENT_PACKAGES_DIR}/share/pkgconfig/sv-lang.pc") | ||
| file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/lib/pkgconfig") | ||
| file(RENAME "${CURRENT_PACKAGES_DIR}/share/pkgconfig/sv-lang.pc" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/sv-lang.pc") | ||
| endif() | ||
| if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/share/pkgconfig/sv-lang.pc") | ||
| file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig") | ||
| file(RENAME "${CURRENT_PACKAGES_DIR}/debug/share/pkgconfig/sv-lang.pc" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/sv-lang.pc") | ||
| endif() | ||
|
|
||
| vcpkg_fixup_pkgconfig() | ||
| vcpkg_copy_pdbs() | ||
|
|
||
| if("tools" IN_LIST FEATURES) | ||
| vcpkg_copy_tools(TOOL_NAMES slang slang-hier slang-reflect slang-tidy AUTO_CLEAN) | ||
| endif() | ||
|
|
||
| file(REMOVE_RECURSE | ||
| "${CURRENT_PACKAGES_DIR}/debug/include" | ||
| "${CURRENT_PACKAGES_DIR}/debug/share" | ||
| "${CURRENT_PACKAGES_DIR}/share/pkgconfig" | ||
| ) | ||
|
|
||
| file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") | ||
| vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") |
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,4 @@ | ||
| slang provides CMake targets: | ||
|
|
||
| find_package(slang CONFIG REQUIRED) | ||
| target_link_libraries(main PRIVATE slang::slang_slang) |
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 @@ | ||
| diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt | ||
| index 1a54f7a24..bcc698bd0 100644 | ||
| --- a/external/CMakeLists.txt | ||
| +++ b/external/CMakeLists.txt | ||
| @@ -217,10 +217,6 @@ if(SLANG_INCLUDE_INSTALL) | ||
| DIRECTORY ${PROJECT_SOURCE_DIR}/external/ieee1800/ | ||
| DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/ieee1800 | ||
| COMPONENT slang_Development) | ||
| - install( | ||
| - FILES ${PROJECT_SOURCE_DIR}/external/expected.hpp | ||
| - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} | ||
| - COMPONENT slang_Development) | ||
|
|
||
| if(NOT fmt_FOUND) | ||
| install( | ||
| diff --git a/include/slang/syntax/SyntaxTree.h b/include/slang/syntax/SyntaxTree.h | ||
| index 5a9030bc8..32d93de93 100644 | ||
| --- a/include/slang/syntax/SyntaxTree.h | ||
| +++ b/include/slang/syntax/SyntaxTree.h | ||
| @@ -7,7 +7,7 @@ | ||
| //------------------------------------------------------------------------------ | ||
| #pragma once | ||
|
|
||
| -#include <expected.hpp> | ||
| +#include <nonstd/expected.hpp> | ||
| #include <memory> | ||
| #include <vector> | ||
|
|
||
| diff --git a/include/slang/text/SourceManager.h b/include/slang/text/SourceManager.h | ||
| index 0bbdf05bc..a06c8c5b8 100644 | ||
| --- a/include/slang/text/SourceManager.h | ||
| +++ b/include/slang/text/SourceManager.h | ||
| @@ -8,7 +8,7 @@ | ||
| #pragma once | ||
|
|
||
| #include <atomic> | ||
| -#include <expected.hpp> | ||
| +#include <nonstd/expected.hpp> | ||
| #include <filesystem> | ||
| #include <memory> | ||
| #include <mutex> |
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,33 @@ | ||
| { | ||
| "name": "slang", | ||
| "version": "10.0", | ||
| "description": "SystemVerilog compiler and language services", | ||
| "homepage": "https://github.com/MikePopoloski/slang", | ||
| "license": "MIT", | ||
| "supports": "!arm32 & !(windows & !x64)", | ||
| "dependencies": [ | ||
| "boost-unordered", | ||
| "expected-lite", | ||
| "fmt", | ||
| { | ||
| "name": "vcpkg-cmake", | ||
| "host": true | ||
| }, | ||
| { | ||
| "name": "vcpkg-cmake-config", | ||
| "host": true | ||
| } | ||
| ], | ||
| "features": { | ||
| "mimalloc": { | ||
| "description": "Use the mimalloc allocator", | ||
| "supports": "!(windows & !static)", | ||
| "dependencies": [ | ||
| "mimalloc" | ||
| ] | ||
| }, | ||
| "tools": { | ||
| "description": "Build the slang command-line tool" | ||
| } | ||
| } | ||
| } | ||
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,9 @@ | ||
| { | ||
| "versions": [ | ||
| { | ||
| "git-tree": "882ab2ac3a544d40d80994db1c083afc5871222a", | ||
| "version": "10.0", | ||
| "port-version": 0 | ||
| } | ||
| ] | ||
| } |
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.