From 77b1edbb83bf8cc533321a0082079a1f61b998b7 Mon Sep 17 00:00:00 2001
From: ds5678 <49847914+ds5678@users.noreply.github.com>
Date: Thu, 19 Jun 2025 17:07:40 -0700
Subject: [PATCH 1/3] libLLVMSharp response files
---
.../ClangSharpPInvokeGenerator.csproj | 3 ++
.../Properties/GenerateLLVMSharp-LICENSE.txt | 2 +
.../Properties/GenerateLLVMSharp.rsp | 44 +++++++++++++++++++
.../Properties/launchSettings.json | 4 ++
4 files changed, 53 insertions(+)
create mode 100644 sources/ClangSharpPInvokeGenerator/Properties/GenerateLLVMSharp-LICENSE.txt
create mode 100644 sources/ClangSharpPInvokeGenerator/Properties/GenerateLLVMSharp.rsp
diff --git a/sources/ClangSharpPInvokeGenerator/ClangSharpPInvokeGenerator.csproj b/sources/ClangSharpPInvokeGenerator/ClangSharpPInvokeGenerator.csproj
index ec2f74a7d..b60ac4bd2 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 000000000..43abbec69
--- /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 000000000..ed022eac3
--- /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 922ee360a..c7be31db2 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",
From 87a2a2ba8d94dec9b3e1c11f31ce3c73e7d960ef Mon Sep 17 00:00:00 2001
From: ds5678 <49847914+ds5678@users.noreply.github.com>
Date: Sun, 20 Jul 2025 20:56:51 -0700
Subject: [PATCH 2/3] Remove LLVMSharp files
---
.../ClangSharpPInvokeGenerator.csproj | 2 -
.../Properties/GenerateLLVM-LICENSE.txt | 4 -
.../Properties/GenerateLLVM.rsp | 101 ------------------
.../Properties/GenerateLLVMSharp-LICENSE.txt | 2 -
.../Properties/GenerateLLVMSharp.rsp | 44 --------
.../Properties/launchSettings.json | 8 --
6 files changed, 161 deletions(-)
delete mode 100644 sources/ClangSharpPInvokeGenerator/Properties/GenerateLLVM-LICENSE.txt
delete mode 100644 sources/ClangSharpPInvokeGenerator/Properties/GenerateLLVM.rsp
delete mode 100644 sources/ClangSharpPInvokeGenerator/Properties/GenerateLLVMSharp-LICENSE.txt
delete mode 100644 sources/ClangSharpPInvokeGenerator/Properties/GenerateLLVMSharp.rsp
diff --git a/sources/ClangSharpPInvokeGenerator/ClangSharpPInvokeGenerator.csproj b/sources/ClangSharpPInvokeGenerator/ClangSharpPInvokeGenerator.csproj
index b60ac4bd2..65356d6b6 100644
--- a/sources/ClangSharpPInvokeGenerator/ClangSharpPInvokeGenerator.csproj
+++ b/sources/ClangSharpPInvokeGenerator/ClangSharpPInvokeGenerator.csproj
@@ -32,8 +32,6 @@
libclang
libClangSharp
- libLLVM
- libLLVMSharp
diff --git a/sources/ClangSharpPInvokeGenerator/Properties/GenerateLLVM-LICENSE.txt b/sources/ClangSharpPInvokeGenerator/Properties/GenerateLLVM-LICENSE.txt
deleted file mode 100644
index b2de2be4e..000000000
--- a/sources/ClangSharpPInvokeGenerator/Properties/GenerateLLVM-LICENSE.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-// 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/llvm/llvm-project/tree/llvmorg-20.1.2/llvm/include/llvm-c
-// Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information.
diff --git a/sources/ClangSharpPInvokeGenerator/Properties/GenerateLLVM.rsp b/sources/ClangSharpPInvokeGenerator/Properties/GenerateLLVM.rsp
deleted file mode 100644
index e54d8869c..000000000
--- a/sources/ClangSharpPInvokeGenerator/Properties/GenerateLLVM.rsp
+++ /dev/null
@@ -1,101 +0,0 @@
---additional
--m64
---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
---exclude
-LLVMInitializeNativeAsmParser
-LLVMInitializeNativeAsmPrinter
-LLVMInitializeNativeDisassembler
-LLVMInitializeNativeTarget
-LLVM_ATTRIBUTE_C_DEPRECATED
-LLVM_DECLARE_VALUE_CAST
-LLVM_FOR_EACH_VALUE_SUBCLASS
---file
-llvm-c/Analysis.h
-llvm-c/BitReader.h
-llvm-c/BitWriter.h
-llvm-c/blake3.h
-llvm-c/Comdat.h
-llvm-c/Core.h
-llvm-c/DataTypes.h
-llvm-c/DebugInfo.h
-llvm-c/Deprecated.h
-llvm-c/Disassembler.h
-llvm-c/DisassemblerTypes.h
-llvm-c/Error.h
-llvm-c/ErrorHandling.h
-llvm-c/ExecutionEngine.h
-llvm-c/ExternC.h
-llvm-c/IRReader.h
-llvm-c/Linker.h
-llvm-c/LLJIT.h
-llvm-c/lto.h
-llvm-c/Object.h
-llvm-c/Orc.h
-llvm-c/OrcEE.h
-llvm-c/Remarks.h
-llvm-c/Support.h
-llvm-c/Target.h
-llvm-c/TargetMachine.h
-llvm-c/Types.h
-llvm-c/Transforms/PassBuilder.h
---headerFile
-./Properties/GenerateLLVM-LICENSE.txt
---methodClassName
-LLVM
---namespace
-LLVMSharp.Interop
---output
-./sources/LLVMSharp/Interop
---prefixStrip
-LLVM
---remap
-LLVMAttributeIndex=LLVMAttributeIndex
-LLVM_BLAKE3_BLOCK_LEN=@BLAKE3_BLOCK_LEN
-LLVM_BLAKE3_CHUNK_LEN=@BLAKE3_CHUNK_LEN
-llvm_blake3_hasher_finalize=@blake3_hasher_finalize
-llvm_blake3_hasher_finalize_seek=@blake3_hasher_finalize_seek
-llvm_blake3_hasher_init=@blake3_hasher_init
-llvm_blake3_hasher_init_derive_key=@blake3_hasher_init_derive_key
-llvm_blake3_hasher_init_derive_key_raw=@blake3_hasher_init_derive_key_raw
-llvm_blake3_hasher_init_keyed=@blake3_hasher_init_keyed
-llvm_blake3_hasher_reset=@blake3_hasher_reset
-llvm_blake3_hasher_update=@blake3_hasher_update
-LLVM_BLAKE3_KEY_LEN=@BLAKE3_KEY_LEN
-LLVM_BLAKE3_MAX_DEPTH=@BLAKE3_MAX_DEPTH
-LLVM_BLAKE3_OUT_LEN=@BLAKE3_OUT_LEN
-llvm_blake3_version=@blake3_version
-LLVM_BLAKE3_VERSION_STRING=@BLAKE3_VERSION_STRING
-LLVMOpaqueValueMetadataEntry=LLVMValueMetadataEntry
-LLVMOpaqueModuleFlagEntry=LLVMModuleFlagEntry
-__AnonymousEnum_Core_L462_C1=@LLVMAttributeIndex
-__AnonymousEnum_Core_L486_C1=@LLVMFastMathFlags
-__AnonymousEnum_DebugInfo_L147_C1=@LLVMMetadataKind
---test-output
-./tests/LLVMSharp.UnitTests/Interop
---with-attribute
-LLVMDIFlags=Flags
-LLVMJITSymbolGenericFlags=Flags
-LLVMFastMathFlags=Flags
-LLVMOrcJITDylibLookupFlags=Flags
-LLVMOrcSymbolLookupFlags=Flags
diff --git a/sources/ClangSharpPInvokeGenerator/Properties/GenerateLLVMSharp-LICENSE.txt b/sources/ClangSharpPInvokeGenerator/Properties/GenerateLLVMSharp-LICENSE.txt
deleted file mode 100644
index 43abbec69..000000000
--- a/sources/ClangSharpPInvokeGenerator/Properties/GenerateLLVMSharp-LICENSE.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-// 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
deleted file mode 100644
index ed022eac3..000000000
--- a/sources/ClangSharpPInvokeGenerator/Properties/GenerateLLVMSharp.rsp
+++ /dev/null
@@ -1,44 +0,0 @@
---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 c7be31db2..027d49f5b 100644
--- a/sources/ClangSharpPInvokeGenerator/Properties/launchSettings.json
+++ b/sources/ClangSharpPInvokeGenerator/Properties/launchSettings.json
@@ -9,14 +9,6 @@
"commandName": "Project",
"commandLineArgs": "\"@$(MSBuildProjectDirectory)/Properties/GenerateClangSharp.rsp\" --file-directory \"$(MSBuildProjectDirectory)/..\" --include-directory \"$(LLVMIncludePath)\" --libraryPath $(LibClangSharpName)"
},
- "GenerateLLVM": {
- "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",
From 009497d7ae729c2c34c0da18b96d48c4761f146d Mon Sep 17 00:00:00 2001
From: ds5678 <49847914+ds5678@users.noreply.github.com>
Date: Sun, 20 Jul 2025 20:58:07 -0700
Subject: [PATCH 3/3] Missing change to the ItemGroup
---
.../ClangSharpPInvokeGenerator.csproj | 4 ----
1 file changed, 4 deletions(-)
diff --git a/sources/ClangSharpPInvokeGenerator/ClangSharpPInvokeGenerator.csproj b/sources/ClangSharpPInvokeGenerator/ClangSharpPInvokeGenerator.csproj
index 65356d6b6..9343641f9 100644
--- a/sources/ClangSharpPInvokeGenerator/ClangSharpPInvokeGenerator.csproj
+++ b/sources/ClangSharpPInvokeGenerator/ClangSharpPInvokeGenerator.csproj
@@ -14,10 +14,6 @@
-
-
-
-