Skip to content

Commit c1df14b

Browse files
committed
Regenerating bindings for libclang v17.0.4
1 parent ddbddd3 commit c1df14b

File tree

202 files changed

+500
-2171
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

202 files changed

+500
-2171
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cmake_minimum_required(VERSION 3.13)
22

3-
project(ClangSharp VERSION 16.0.6)
3+
project(ClangSharp VERSION 17.0.4)
44

55
set(CMAKE_CXX_STANDARD 17)
66
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)

Directory.Build.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@
4444
<ContinuousIntegrationBuild Condition="'$(GITHUB_RUN_ID)' != ''">true</ContinuousIntegrationBuild>
4545
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
4646
<PackageOutputPath>$(BaseArtifactsPath)pkg/$(Configuration)/</PackageOutputPath>
47-
<PackageValidationBaselineVersion>16.0.0</PackageValidationBaselineVersion>
47+
<PackageValidationBaselineVersion>17.0.0</PackageValidationBaselineVersion>
4848
<Product>ClangSharp</Product>
4949
<RootNamespace>ClangSharp</RootNamespace>
50-
<VersionPrefix>16.0.1</VersionPrefix>
50+
<VersionPrefix>17.0.0</VersionPrefix>
5151
<VersionSuffix Condition="'$(EXCLUDE_SUFFIX_FROM_VERSION)' != 'true'">rc1</VersionSuffix>
5252
<VersionSuffix Condition="'$(GITHUB_EVENT_NAME)' == 'pull_request'">pr</VersionSuffix>
5353
</PropertyGroup>

Directory.Packages.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212

1313
<!-- Package versions for package references across all projects -->
1414
<ItemGroup>
15-
<PackageVersion Include="libClang" Version="16.0.6" />
16-
<PackageVersion Include="libClangSharp" Version="16.0.6" />
15+
<PackageVersion Include="libClang" Version="17.0.4" />
16+
<PackageVersion Include="libClangSharp" Version="17.0.4" />
1717
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.6.2" />
1818
<PackageVersion Include="NUnit" Version="3.13.3" />
1919
<PackageVersion Include="NUnit3TestAdapter" Version="4.5.0" />

README.md

Lines changed: 35 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ A convenience package which provides the native libClang library for several pla
1313

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

16-
**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/16.0.6); 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).
16+
**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).
1717

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

@@ -71,45 +71,60 @@ You can see any additional options that are available by passing `-help` on Wind
7171
ClangSharp provides a helper library, `libClangSharp`, that exposes additional functionality that is not available in `libClang`.
7272
Building this requires [CMake 3.13 or later](https://cmake.org/download/) as well as a version of MSVC or Clang that supports C++ 17.
7373

74-
To succesfully build `libClangSharp` you must first build Clang (https://clang.llvm.org/get_started.html). The process done on Windows is roughly:
74+
To successfully build `libClangSharp` you must first build Clang (https://clang.llvm.org/get_started.html).
75+
76+
#### Windows
77+
78+
The process done on Windows is roughly:
7579
```cmd
76-
git clone --single-branch --branch llvmorg-16.0.6 https://github.com/llvm/llvm-project
80+
git clone --single-branch --branch llvmorg-17.0.4 https://github.com/llvm/llvm-project
7781
cd llvm-project
7882
mkdir artifacts/bin
7983
cd artifacts/bin
80-
cmake -DLLVM_ENABLE_PROJECTS=clang -DCMAKE_INSTALL_PREFIX=../install -G "Visual Studio 16 2019" -A x64 -Thost=x64 ../../llvm
84+
cmake -DCMAKE_INSTALL_PREFIX=../install -DLLVM_ENABLE_PROJECTS=clang -G "Visual Studio 17 2022" -A x64 -Thost=x64 ../../llvm
8185
```
8286

8387
You can then open `LLVM.sln` in Visual Studio, change the configuration to `Release` and build the `install` project.
88+
8489
Afterwards, you can then build `libClangSharp` where the process followed is roughly:
8590
```cmd
8691
git clone https://github.com/dotnet/clangsharp
8792
cd clangsharp
8893
mkdir artifacts/bin/native
8994
cd artifacts/bin/native
90-
cmake -DPATH_TO_LLVM=../../../../llvm-project/artifacts/install/ -G "Visual Studio 16 2019" -A x64 -Thost=x64 ../../..
95+
cmake -DCMAKE_INSTALL_PREFIX=../install -DPATH_TO_LLVM=../../../../llvm-project/artifacts/install -G "Visual Studio 17 2022" -A x64 -Thost=x64 ../../..
9196
```
9297

93-
You can then open `libClangSharp.sln` in Visual Studio, change the configuration to `Release` and build the `ALL_BUILD` project.
98+
You can then open `libClangSharp.sln` in Visual Studio, change the configuration to `Release` and build the `install` project.
9499

95-
If you building on Linux
96-
```
97-
git clone https://github.com/dotnet/clangsharp
98-
cd clangsharp
99-
mkdir artifacts/bin/native
100-
cd artifacts/bin/native
101-
cmake -DPATH_TO_LLVM=/usr/lib/llvm/14/ ../../..
102-
make
103-
```
100+
#### Linux
104101

105-
or if you prefer Ninja
102+
The process done on Linux is roughly:
103+
```bash
104+
git clone --single-branch --branch llvmorg-17.0.4 https://github.com/llvm/llvm-project
105+
cd llvm-project
106+
mkdir -p artifacts/bin
107+
cd artifacts/bin
108+
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../install -DLLVM_ENABLE_PROJECTS=clang ../../llvm
109+
make install
106110
```
111+
112+
If you want your Linux build to be portable, you may also consider specifying the following options:
113+
* `-DLLVM_ENABLE_TERMINFO=OFF`
114+
* `-DLLVM_ENABLE_ZLIB=OFF`
115+
* `-DLLVM_ENABLE_ZSTD=OFF`
116+
* `-DLLVM_STATIC_LINK_CXX_STDLIB=ON`
117+
118+
If you would prefer to use `Ninja`, then make sure to pass in `-G Ninja` and then invoke `ninja` rather than `make install`.
119+
120+
Afterwards, you can then build `libClangSharp` where the process followed is roughly:
121+
```cmd
107122
git clone https://github.com/dotnet/clangsharp
108123
cd clangsharp
109-
mkdir artifacts/bin/native
124+
mkdir -p artifacts/bin/native
110125
cd artifacts/bin/native
111-
cmake -DPATH_TO_LLVM=/usr/lib/llvm/14/ -G Ninja ../../..
112-
ninja
126+
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../install -DPATH_TO_LLVM=../../../../llvm-project/artifacts/install
127+
make install
113128
```
114129

115130
### Generating Bindings
@@ -118,7 +133,7 @@ This program will take a given set of C or C++ header files and generate C# bind
118133

119134
The simplest and recommended setup is to install the generator as a .NET tool and then use response files:
120135
```
121-
dotnet tool install --global ClangSharpPInvokeGenerator --version 16.0.0
136+
dotnet tool install --global ClangSharpPInvokeGenerator --version 17.0.0
122137
ClangSharpPInvokeGenerator @generate.rsp
123138
```
124139

packages/libClangSharp/libClangSharp.runtime.linux-arm64/libClangSharp.runtime.linux-arm64.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
33
<metadata minClientVersion="2.12">
44
<id>libClangSharp.runtime.linux-arm64</id>
5-
<version>16.0.6</version>
5+
<version>17.0.4</version>
66
<authors>.NET Foundation and Contributors</authors>
77
<owners>.NET Foundation and Contributors</owners>
88
<requireLicenseAcceptance>true</requireLicenseAcceptance>

packages/libClangSharp/libClangSharp.runtime.linux-x64/libClangSharp.runtime.linux-x64.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
33
<metadata minClientVersion="2.12">
44
<id>libClangSharp.runtime.linux-x64</id>
5-
<version>16.0.6</version>
5+
<version>17.0.4</version>
66
<authors>.NET Foundation and Contributors</authors>
77
<owners>.NET Foundation and Contributors</owners>
88
<requireLicenseAcceptance>true</requireLicenseAcceptance>

packages/libClangSharp/libClangSharp.runtime.osx-arm64/libClangSharp.runtime.osx-arm64.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
33
<metadata minClientVersion="2.12">
44
<id>libClangSharp.runtime.osx-arm64</id>
5-
<version>16.0.6</version>
5+
<version>17.0.4</version>
66
<authors>.NET Foundation and Contributors</authors>
77
<owners>.NET Foundation and Contributors</owners>
88
<requireLicenseAcceptance>true</requireLicenseAcceptance>

packages/libClangSharp/libClangSharp.runtime.osx-x64/libClangSharp.runtime.osx-x64.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
33
<metadata minClientVersion="2.12">
44
<id>libClangSharp.runtime.osx-x64</id>
5-
<version>16.0.6</version>
5+
<version>17.0.4</version>
66
<authors>.NET Foundation and Contributors</authors>
77
<owners>.NET Foundation and Contributors</owners>
88
<requireLicenseAcceptance>true</requireLicenseAcceptance>

packages/libClangSharp/libClangSharp.runtime.win-arm64/libClangSharp.runtime.win-arm64.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
33
<metadata minClientVersion="2.12">
44
<id>libClangSharp.runtime.win-arm64</id>
5-
<version>16.0.6</version>
5+
<version>17.0.4</version>
66
<authors>.NET Foundation and Contributors</authors>
77
<owners>.NET Foundation and Contributors</owners>
88
<requireLicenseAcceptance>true</requireLicenseAcceptance>

packages/libClangSharp/libClangSharp.runtime.win-x64/libClangSharp.runtime.win-x64.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
33
<metadata minClientVersion="2.12">
44
<id>libClangSharp.runtime.win-x64</id>
5-
<version>16.0.6</version>
5+
<version>17.0.4</version>
66
<authors>.NET Foundation and Contributors</authors>
77
<owners>.NET Foundation and Contributors</owners>
88
<requireLicenseAcceptance>true</requireLicenseAcceptance>

0 commit comments

Comments
 (0)