Skip to content

Updating Clang to v18.1 #545

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 15 commits into from
May 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 26 additions & 26 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
configuration: [ debug, release ]
os: [ windows ]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: ./scripts/cibuild.cmd -configuration ${{ matrix.configuration }} -architecture ${{ matrix.architecture }}
shell: cmd
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}_${{ matrix.configuration }}_${{ matrix.architecture }}
path: |
Expand All @@ -36,10 +36,10 @@ jobs:
configuration: [ debug, release ]
os: [ ubuntu ]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: ./scripts/cibuild.sh --configuration ${{ matrix.configuration }} --architecture ${{ matrix.architecture }}
shell: bash
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}_${{ matrix.configuration }}_${{ matrix.architecture }}
path: |
Expand All @@ -56,10 +56,10 @@ jobs:
configuration: [ debug, release ]
os: [ macos ]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: ./scripts/cibuild.sh --configuration ${{ matrix.configuration }} --architecture ${{ matrix.architecture }}
shell: bash
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}_${{ matrix.configuration }}_${{ matrix.architecture }}
path: |
Expand All @@ -71,13 +71,13 @@ jobs:
build-nuget-preview:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: ./scripts/cibuild.cmd -configuration release -architecture x64
shell: cmd
env:
EXCLUDE_RUN_ID_FROM_PACKAGE: true
EXCLUDE_SUFFIX_FROM_VERSION: false
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: nuget_preview
path: |
Expand All @@ -93,17 +93,17 @@ jobs:
permissions:
id-token: write
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: nuget_preview
path: ./artifacts
- uses: actions/setup-dotnet@v3
- uses: actions/setup-dotnet@v4
with:
global-json-file: ./global.json
- run: dotnet tool install --tool-path ./artifacts/tools sign --version 0.9.1-beta.23530.1
- run: dotnet tool install --tool-path ./artifacts/tools sign --version 0.9.1-beta.24170.3
- run: ./artifacts/tools/sign code azure-key-vault "**/*.nupkg" --timestamp-url "http://timestamp.digicert.com" --base-directory "${{ github.workspace }}/artifacts/pkg" --file-list "${{ github.workspace }}/scripts/SignClientFileList.txt" --publisher-name ".NET Foundation" --description "ClangSharp" --description-url "https://github.com/dotnet/clangsharp" --azure-key-vault-certificate "${{ secrets.SC_KEY_VAULT_CERTIFICATE_ID }}" --azure-key-vault-client-id "${{ secrets.SC_AZURE_CLIENT_ID }}" --azure-key-vault-client-secret "${{ secrets.SC_AZURE_CLIENT_SECRET }}" --azure-key-vault-tenant-id "${{ secrets.SC_AZURE_TENANT_ID }}" --azure-key-vault-url "${{ secrets.SC_KEY_VAULT_URL }}"
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: sign_nuget_preview
path: |
Expand All @@ -112,13 +112,13 @@ jobs:
build-nuget-release:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: ./scripts/cibuild.cmd -configuration release -architecture x64
shell: cmd
env:
EXCLUDE_RUN_ID_FROM_PACKAGE: true
EXCLUDE_SUFFIX_FROM_VERSION: true
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: nuget_release
path: |
Expand All @@ -134,17 +134,17 @@ jobs:
permissions:
id-token: write
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: nuget_release
path: ./artifacts
- uses: actions/setup-dotnet@v3
- uses: actions/setup-dotnet@v4
with:
global-json-file: ./global.json
- run: dotnet tool install --tool-path ./artifacts/tools sign --version 0.9.1-beta.23530.1
- run: dotnet tool install --tool-path ./artifacts/tools sign --version 0.9.1-beta.24170.3
- run: ./artifacts/tools/sign code azure-key-vault "**/*.nupkg" --timestamp-url "http://timestamp.digicert.com" --base-directory "${{ github.workspace }}/artifacts/pkg" --file-list "${{ github.workspace }}/scripts/SignClientFileList.txt" --publisher-name ".NET Foundation" --description "ClangSharp" --description-url "https://github.com/dotnet/clangsharp" --azure-key-vault-certificate "${{ secrets.SC_KEY_VAULT_CERTIFICATE_ID }}" --azure-key-vault-client-id "${{ secrets.SC_AZURE_CLIENT_ID }}" --azure-key-vault-client-secret "${{ secrets.SC_AZURE_CLIENT_SECRET }}" --azure-key-vault-tenant-id "${{ secrets.SC_AZURE_TENANT_ID }}" --azure-key-vault-url "${{ secrets.SC_KEY_VAULT_URL }}"
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: sign_nuget_release
path: |
Expand All @@ -155,13 +155,13 @@ jobs:
if: ${{ github.event_name == 'push' }}
needs: [ windows-x64, linux-x64, macos-x64, sign-nuget-preview, sign-nuget-release ]
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: windows_release_x64
path: ./artifacts
- uses: actions/setup-dotnet@v3
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.x'
dotnet-version: '8.0.x'
source-url: https://pkgs.clangsharp.dev/index.json
env:
NUGET_AUTH_TOKEN: ${{ secrets.AZURE_DEVOPS_PAT }}
Expand All @@ -171,11 +171,11 @@ jobs:
if: false
needs: [ windows-x64, linux-x64, macos-x64, sign-nuget-preview, sign-nuget-release ]
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: windows_release_x64
path: ./artifacts
- uses: actions/setup-dotnet@v3
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.x'
dotnet-version: '8.0.x'
- run: dotnet nuget push "./artifacts/pkg/Release/*.nupkg" --source https://nuget.pkg.github.com/dotnet/index.json --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.13)

project(ClangSharp VERSION 17.0.4)
project(ClangSharp VERSION 18.1.3)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
Expand Down
6 changes: 3 additions & 3 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<!-- Default settings that explicitly differ from the Sdk.props defaults -->
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<AnalysisLevel>preview-all</AnalysisLevel>
<AnalysisLevel>latest-all</AnalysisLevel>
<BaseIntermediateOutputPath>$(BaseArtifactsPath)obj/$(BaseArtifactsPathSuffix)/</BaseIntermediateOutputPath>
<DebugType>embedded</DebugType>
<EnableDefaultNoneItems>false</EnableDefaultNoneItems>
Expand All @@ -42,12 +42,12 @@
<BaseOutputPath>$(BaseArtifactsPath)bin/$(BaseArtifactsPathSuffix)/</BaseOutputPath>
<Company>.NET Foundation</Company>
<ContinuousIntegrationBuild Condition="'$(GITHUB_RUN_ID)' != ''">true</ContinuousIntegrationBuild>
<EnforceCodeStyleInBuild>false</EnforceCodeStyleInBuild>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<PackageOutputPath>$(BaseArtifactsPath)pkg/$(Configuration)/</PackageOutputPath>
<PackageValidationBaselineVersion>17.0.0</PackageValidationBaselineVersion>
<Product>ClangSharp</Product>
<RootNamespace>ClangSharp</RootNamespace>
<VersionPrefix>17.0.2</VersionPrefix>
<VersionPrefix>18.1.0</VersionPrefix>
<VersionSuffix Condition="'$(EXCLUDE_SUFFIX_FROM_VERSION)' != 'true'">rc1</VersionSuffix>
<VersionSuffix Condition="'$(GITHUB_EVENT_NAME)' == 'pull_request'">pr</VersionSuffix>
</PropertyGroup>
Expand Down
8 changes: 4 additions & 4 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@

<!-- Package versions for package references across all projects -->
<ItemGroup>
<PackageVersion Include="libClang" Version="17.0.4" />
<PackageVersion Include="libClangSharp" Version="17.0.4" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageVersion Include="NUnit" Version="3.14.0" />
<PackageVersion Include="libClang" Version="18.1.3.2" />
<PackageVersion Include="libClangSharp" Version="18.1.3.1" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageVersion Include="NUnit" Version="4.1.0" />
<PackageVersion Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageVersion Include="System.CommandLine" Version="2.0.0-beta4.22272.1" />
</ItemGroup>
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ A convenience package which provides the native libClang library for several pla

A helper package which exposes many Clang APIs missing from libClang is provided here: https://www.nuget.org/packages/libClangSharp

**NOTE:** libclang and libClangSharp are meta-packages which point to the platform-specific runtime packages ([e.g.](https://www.nuget.org/packages/libClangSharp.runtime.win-x64/17.0.4); see others owned by [tannergooding](https://www.nuget.org/profiles/tannergooding)). Several manual steps may be required to use them, see discussion in [#46](https://github.com/dotnet/ClangSharp/issues/46) and [#118](https://github.com/dotnet/ClangSharp/issues/118).
**NOTE:** libclang and libClangSharp are meta-packages which point to the platform-specific runtime packages ([e.g.](https://www.nuget.org/packages/libClangSharp.runtime.win-x64/18.1.3); see others owned by [tannergooding](https://www.nuget.org/profiles/tannergooding)). Several manual steps may be required to use them, see discussion in [#46](https://github.com/dotnet/ClangSharp/issues/46) and [#118](https://github.com/dotnet/ClangSharp/issues/118).

Nightly packages are available via the NuGet Feed URL: https://pkgs.clangsharp.dev/index.json

Expand Down Expand Up @@ -77,7 +77,7 @@ To successfully build `libClangSharp` you must first build Clang (https://clang.

The process done on Windows is roughly:
```cmd
git clone --single-branch --branch llvmorg-17.0.4 https://github.com/llvm/llvm-project
git clone --single-branch --branch llvmorg-18.1.3 https://github.com/llvm/llvm-project
cd llvm-project
mkdir artifacts/bin
cd artifacts/bin
Expand All @@ -101,7 +101,7 @@ You can then open `libClangSharp.sln` in Visual Studio, change the configuration

The process done on Linux is roughly:
```bash
git clone --single-branch --branch llvmorg-17.0.4 https://github.com/llvm/llvm-project
git clone --single-branch --branch llvmorg-18.1.3 https://github.com/llvm/llvm-project
cd llvm-project
mkdir -p artifacts/bin
cd artifacts/bin
Expand Down Expand Up @@ -133,7 +133,7 @@ This program will take a given set of C or C++ header files and generate C# bind

The simplest and recommended setup is to install the generator as a .NET tool and then use response files:
```
dotnet tool install --global ClangSharpPInvokeGenerator --version 17.0.0
dotnet tool install --global ClangSharpPInvokeGenerator --version 18.1.0
ClangSharpPInvokeGenerator @generate.rsp
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata minClientVersion="2.12">
<id>libClangSharp.runtime.linux-arm64</id>
<version>17.0.4</version>
<version>18.1.3.1</version>
<authors>.NET Foundation and Contributors</authors>
<owners>.NET Foundation and Contributors</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata minClientVersion="2.12">
<id>libClangSharp.runtime.linux-x64</id>
<version>17.0.4</version>
<version>18.1.3.1</version>
<authors>.NET Foundation and Contributors</authors>
<owners>.NET Foundation and Contributors</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata minClientVersion="2.12">
<id>libClangSharp.runtime.osx-arm64</id>
<version>17.0.4</version>
<version>18.1.3.1</version>
<authors>.NET Foundation and Contributors</authors>
<owners>.NET Foundation and Contributors</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata minClientVersion="2.12">
<id>libClangSharp.runtime.osx-x64</id>
<version>17.0.4</version>
<version>18.1.3.1</version>
<authors>.NET Foundation and Contributors</authors>
<owners>.NET Foundation and Contributors</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata minClientVersion="2.12">
<id>libClangSharp.runtime.win-arm64</id>
<version>17.0.4</version>
<version>18.1.3.1</version>
<authors>.NET Foundation and Contributors</authors>
<owners>.NET Foundation and Contributors</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata minClientVersion="2.12">
<id>libClangSharp.runtime.win-x64</id>
<version>17.0.4</version>
<version>18.1.3.1</version>
<authors>.NET Foundation and Contributors</authors>
<owners>.NET Foundation and Contributors</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
Expand Down
2 changes: 1 addition & 1 deletion packages/libClangSharp/libClangSharp/libClangSharp.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata minClientVersion="2.12">
<id>libClangSharp</id>
<version>17.0.4</version>
<version>18.1.3.1</version>
<authors>.NET Foundation and Contributors</authors>
<owners>.NET Foundation and Contributors</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
Expand Down
12 changes: 6 additions & 6 deletions packages/libClangSharp/libClangSharp/runtime.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,32 @@
"runtimes": {
"linux-arm64": {
"libClangSharp": {
"libClangSharp.runtime.linux-arm64": "17.0.4"
"libClangSharp.runtime.linux-arm64": "18.1.3.1"
}
},
"linux-x64": {
"libClangSharp": {
"libClangSharp.runtime.linux-x64": "17.0.4"
"libClangSharp.runtime.linux-x64": "18.1.3.1"
}
},
"osx-arm64": {
"libClangSharp": {
"libClangSharp.runtime.osx-arm64": "17.0.4"
"libClangSharp.runtime.osx-arm64": "18.1.3.1"
}
},
"osx-x64": {
"libClangSharp": {
"libClangSharp.runtime.osx-x64": "17.0.4"
"libClangSharp.runtime.osx-x64": "18.1.3.1"
}
},
"win-arm64": {
"libClangSharp": {
"libClangSharp.runtime.win-arm64": "17.0.4"
"libClangSharp.runtime.win-arm64": "18.1.3.1"
}
},
"win-x64": {
"libClangSharp": {
"libClangSharp.runtime.win-x64": "17.0.4"
"libClangSharp.runtime.win-x64": "18.1.3.1"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata minClientVersion="2.12">
<id>libclang.runtime.linux-arm64</id>
<version>17.0.4</version>
<version>18.1.3.2</version>
<authors>.NET Foundation and Contributors</authors>
<owners>.NET Foundation and Contributors</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<license type="expression">Apache-2.0 WITH LLVM-exception</license>
<projectUrl>https://github.com/dotnet/clangsharp</projectUrl>
<description>linux arm64 native library for libclang.</description>
<copyright>Copyright © LLVM Project</copyright>
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-17.0.4" />
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-18.1.3" />
</metadata>
<files>
<file src="..\libclang\LICENSE.TXT" target="LICENSE.TXT" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata minClientVersion="2.12">
<id>libclang.runtime.linux-x64</id>
<version>17.0.4</version>
<version>18.1.3.2</version>
<authors>.NET Foundation and Contributors</authors>
<owners>.NET Foundation and Contributors</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<license type="expression">Apache-2.0 WITH LLVM-exception</license>
<projectUrl>https://github.com/dotnet/clangsharp</projectUrl>
<description>linux x64 native library for libclang.</description>
<copyright>Copyright © LLVM Project</copyright>
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-17.0.4" />
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-18.1.3" />
</metadata>
<files>
<file src="..\libclang\LICENSE.TXT" target="LICENSE.TXT" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata minClientVersion="2.12">
<id>libclang.runtime.osx-arm64</id>
<version>17.0.4</version>
<version>18.1.3</version>
<authors>.NET Foundation and Contributors</authors>
<owners>.NET Foundation and Contributors</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<license type="expression">Apache-2.0 WITH LLVM-exception</license>
<projectUrl>https://github.com/dotnet/clangsharp</projectUrl>
<description>osx arm64 native library for libclang.</description>
<copyright>Copyright © LLVM Project</copyright>
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-17.0.4" />
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-18.1.3" />
</metadata>
<files>
<file src="..\libclang\LICENSE.TXT" target="LICENSE.TXT" />
Expand Down
Loading