diff --git a/sources/ClangSharpPInvokeGenerator/ClangSharpPInvokeGenerator.csproj b/sources/ClangSharpPInvokeGenerator/ClangSharpPInvokeGenerator.csproj index ec2f74a7..b60ac4bd 100644 --- a/sources/ClangSharpPInvokeGenerator/ClangSharpPInvokeGenerator.csproj +++ b/sources/ClangSharpPInvokeGenerator/ClangSharpPInvokeGenerator.csproj @@ -16,6 +16,8 @@ + + @@ -31,6 +33,7 @@ libclang libClangSharp libLLVM + libLLVMSharp diff --git a/sources/ClangSharpPInvokeGenerator/Properties/GenerateLLVMSharp-LICENSE.txt b/sources/ClangSharpPInvokeGenerator/Properties/GenerateLLVMSharp-LICENSE.txt new file mode 100644 index 00000000..43abbec6 --- /dev/null +++ b/sources/ClangSharpPInvokeGenerator/Properties/GenerateLLVMSharp-LICENSE.txt @@ -0,0 +1,2 @@ +// Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. +// Ported from https://github.com/dotnet/llvmsharp/blob/main/sources/libLLVMSharp diff --git a/sources/ClangSharpPInvokeGenerator/Properties/GenerateLLVMSharp.rsp b/sources/ClangSharpPInvokeGenerator/Properties/GenerateLLVMSharp.rsp new file mode 100644 index 00000000..ed022eac --- /dev/null +++ b/sources/ClangSharpPInvokeGenerator/Properties/GenerateLLVMSharp.rsp @@ -0,0 +1,44 @@ +--additional +-m64 +-std=c++17 +--config +exclude-com-proxies +exclude-empty-records +exclude-enum-operators +generate-aggressive-inlining +generate-callconv-member-function +generate-cpp-attributes +generate-disable-runtime-marshalling +generate-file-scoped-namespaces +generate-guid-member +generate-macro-bindings +generate-marker-interfaces +generate-native-inheritance-attribute +generate-setslastsystemerror-attribute +generate-tests-nunit +generate-unmanaged-constants +generate-vtbl-index-attribute +log-potential-typedef-remappings +multi-file +preview-codegen +trimmable-vtbls +unix-types +--define-macro +_SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING +LLVMSharp_EXPORTS +--file +libLLVMSharp/LLVMSharp.h +--headerFile +./Properties/GenerateLLVMSharp-LICENSE.txt +--methodClassName +llvmsharp +--namespace +LLVMSharp.Interop +--output +./sources/LLVMSharp/Interop +--prefixStrip +llvmsharp_ +--remap +MSGuidDeclParts=@Guid +--test-output +./tests/LLVMSharp.UnitTests/InteropTests diff --git a/sources/ClangSharpPInvokeGenerator/Properties/launchSettings.json b/sources/ClangSharpPInvokeGenerator/Properties/launchSettings.json index 922ee360..c7be31db 100644 --- a/sources/ClangSharpPInvokeGenerator/Properties/launchSettings.json +++ b/sources/ClangSharpPInvokeGenerator/Properties/launchSettings.json @@ -13,6 +13,10 @@ "commandName": "Project", "commandLineArgs": "\"@$(MSBuildProjectDirectory)/Properties/GenerateLLVM.rsp\" --file-directory \"$(LLVMIncludePath)\" --include-directory \"$(LLVMIncludePath)\" --libraryPath $(LibLLVMName)" }, + "GenerateLLVMSharp": { + "commandName": "Project", + "commandLineArgs": "\"@$(MSBuildProjectDirectory)/Properties/GenerateLLVMSharp.rsp\" --file-directory \"$(MSBuildProjectDirectory)/../../../LLVMSharp/sources\" --include-directory \"$(LLVMIncludePath)\" --libraryPath $(LibLLVMSharpName)" + }, "GenerateLocal": { "commandName": "Project", "commandLineArgs": "@generate.rsp",