Skip to content

Commit 62ca57a

Browse files
authored
Add nuget package for libclang and python bindings (#618)
This allows us to use our own llvm in the dotnet/runtime build for the offsets tool, instead of relying on the system clang.
1 parent 14dd7f3 commit 62ca57a

9 files changed

+50
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project>
3+
<Import Project="../Directory.Build.props" />
4+
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project Sdk="Microsoft.Build.Traversal">
3+
<Import Project="$([MSBuild]::GetPathOfFileAbove(builds.targets))" />
4+
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))" />
4+
5+
<Import Condition="'$(_packageTargetOSGroup)' != ''" Project="$(MSBuildThisFileDirectory)runtime.$(_packageTargetOSGroup).$(MSBuildProjectName).props" />
6+
7+
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.targets))" />
8+
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project>
3+
<ItemGroup>
4+
<File Include="$(ProjectDir)\clang\bindings\python\clang\**" TargetPath="tools\python-bindings" />
5+
<File Include="$(_LLVMInstallDir)\lib\libclang.so" TargetPath="tools\libclang.so" />
6+
</ItemGroup>
7+
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project>
3+
<ItemGroup>
4+
<File Include="$(ProjectDir)\clang\bindings\python\clang\**" TargetPath="tools\python-bindings" />
5+
<File Include="$(_LLVMInstallDir)\lib\libclang.so" TargetPath="tools\libclang.so" />
6+
</ItemGroup>
7+
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project>
3+
<ItemGroup>
4+
<File Include="$(ProjectDir)\clang\bindings\python\clang\**" TargetPath="tools\python-bindings" />
5+
<File Include="$(_LLVMInstallDir)\lib\libclang.dylib" TargetPath="tools\libclang.dylib" />
6+
</ItemGroup>
7+
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project>
3+
<ItemGroup>
4+
<File Include="$(ProjectDir)\clang\bindings\python\clang\**" TargetPath="tools\python-bindings" />
5+
<File Include="$(_LLVMInstallDir)\bin\libclang.dll" TargetPath="tools\libclang.dll" />
6+
</ItemGroup>
7+
</Project>

nuget/descriptions.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@
99
"Description": "When using NuGet 3.x this package requires at least version {0}.",
1010
"CommonTypes": [ ]
1111
},
12+
{
13+
"Name": "Microsoft.NETCore.Runtime.Mono.LLVM.Libclang",
14+
"Description": "The libclang library and Python bindings.",
15+
"CommonTypes": [ ]
16+
},
1217
{
1318
"Name": "Microsoft.NETCore.Runtime.Mono.LLVM.Sdk",
1419
"Description": "The .NET Core fork of the LLVM project, used to compile the Mono .NET Core runtime in LLVM JIT mode. Internal implementation package not meant for direct consumption. Please do not reference directly.",

nuget/packages.builds

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<Project Sdk="Microsoft.Build.Traversal">
22
<ItemGroup Condition="'$(BuildJitToolsOnly)' != 'true'">
3+
<ProjectReference Condition="'$(Configuration)' == 'Release'" Include="Microsoft.NETCore.Runtime.Mono.LLVM.Libclang\Microsoft.NETCore.Runtime.Mono.LLVM.Libclang.builds" />
34
<ProjectReference Condition="'$(Configuration)' == 'Release'" Include="Microsoft.NETCore.Runtime.Mono.LLVM.Sdk\Microsoft.NETCore.Runtime.Mono.LLVM.Sdk.builds" />
45
<ProjectReference Condition="'$(Configuration)' == 'Release'" Include="Microsoft.NETCore.Runtime.Mono.LLVM.Tools\Microsoft.NETCore.Runtime.Mono.LLVM.Tools.builds" />
56
<ProjectReference Condition="'$(Configuration)' == 'Release'" Include="Microsoft.NETCore.Runtime.Mono.LLVM.Wasm.A.Transport\Microsoft.NETCore.Runtime.Mono.LLVM.Wasm.A.Transport.builds" />

0 commit comments

Comments
 (0)