IKVM.Clang.Sdk 2.0.4

Prefix Reserved
dotnet add package IKVM.Clang.Sdk --version 2.0.4
                    
NuGet\Install-Package IKVM.Clang.Sdk -Version 2.0.4
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="IKVM.Clang.Sdk" Version="2.0.4" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="IKVM.Clang.Sdk" Version="2.0.4" />
                    
Directory.Packages.props
<PackageReference Include="IKVM.Clang.Sdk" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add IKVM.Clang.Sdk --version 2.0.4
                    
#r "nuget: IKVM.Clang.Sdk, 2.0.4"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package IKVM.Clang.Sdk@2.0.4
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=IKVM.Clang.Sdk&version=2.0.4
                    
Install as a Cake Addin
#tool nuget:?package=IKVM.Clang.Sdk&version=2.0.4
                    
Install as a Cake Tool

IKVM.Clang.Sdk

MSBuild SDK for compiling C, C++, Objective-C, and assembly source files with the Clang compiler. Produces executables, shared libraries, and static libraries targeting any LLVM triple — Windows, Linux, macOS, WebAssembly, and more.


Requirements

  • LLVM / Clang with clang and llvm-ar accessible on PATH
  • MSBuild 17+ (ships with Visual Studio 2022, or via the .NET SDK)
  • Visual Studio 2022 17.0+ with the IKVM.Clang extension for IDE support (optional)

Quick Start

Create a project file (conventionally .clangproj, but any extension works):

<Project>
    <Import Project="Sdk.props" Sdk="IKVM.Clang.Sdk" />

    <PropertyGroup>
        <TargetIdentifiers>x86_64-pc-windows-msvc</TargetIdentifiers>
        <OutputType>exe</OutputType>
    </PropertyGroup>

    <ItemGroup>
        <Compile Include="src\*.c" />
    </ItemGroup>

    <Import Project="Sdk.targets" Sdk="IKVM.Clang.Sdk" />
</Project>

Then build:

dotnet build

Output Types

Set <OutputType> in your project to one of:

Value Produces Windows Linux macOS WASM
exe Executable .exe (none) (none) .wasm
dll Shared library .dll .so .dylib .so
lib Static library .lib .a .a .a

Target Triples

TargetIdentifiers accepts one or more semicolon-separated LLVM target triples.


<TargetIdentifiers>x86_64-pc-windows-msvc</TargetIdentifiers>


<TargetIdentifiers>x86_64-pc-linux-gnu;aarch64-pc-linux-gnu</TargetIdentifiers>

Common triples:

Triple Platform
x86_64-pc-windows-msvc Windows x64
aarch64-pc-windows-msvc Windows ARM64
x86_64-pc-linux-gnu Linux x64
aarch64-pc-linux-gnu Linux ARM64
x86_64-apple-macosx macOS x64
aarch64-apple-macosx macOS ARM64 (Apple Silicon)
wasm32-unknown-unknown WebAssembly

Supported Source File Types

Item type Extensions Language
Compile .c C
Compile .cpp .cc .cxx .c++ .cppm .ixx C++
Compile .m .mm Objective-C / Objective-C++
Compile .s .asm Assembly
Header .h .hpp .hh .hxx .h++ .ipp C/C++ headers (copied to include output)

Key MSBuild Properties

Property Default Description
TargetIdentifiers (required) Semicolon-separated LLVM target triples
OutputType dll Output kind: exe, dll, or lib
TargetName project name Base name for the output file
ClangToolExe clang / clang.exe Clang executable path or name
LlvmArToolExe llvm-ar / llvm-ar.exe LLVM archiver executable path or name
DebugSymbols true in Debug Emit debug symbols
LanguageStandard (clang default) C/C++ language standard, e.g. c17, c++20
PositionIndependentCode (false) Pass -fPIC to the compiler
MsCompatibility (false) Pass -fms-compatibility
UseLd lld Linker driver for exe/dll targets
Subsystem console (Windows exe) Windows subsystem (console or windows)
AdditionalCompileOptions (empty) Extra flags forwarded to every clang invocation
AdditionalLinkOptions (empty) Extra flags forwarded to the linker invocation

Item Metadata

Compile items

Metadata Description
Language Override language: c, c++, objective-c, objective-c++
LanguageStandard Per-file language standard override
DebugSymbols Per-file debug symbol override
PositionIndependentCode Per-file -fPIC override
IncludeDirectories Semicolon-separated extra include search paths
PreprocessorDefinitions Semicolon-separated NAME or NAME=VALUE defines
AdditionalCompileOptions Extra flags for this file only

Header items

Headers with <CopyToIncludeDirectory>true</CopyToIncludeDirectory> (the default) are copied to the intermediate headers\ output folder and automatically added to the include path of dependent projects.


Project References

Reference another IKVM.Clang.Sdk project to automatically link its library and expose its headers:

<ItemGroup>
    <ProjectReference Include="..\MyLib\MyLib.csproj" />
</ItemGroup>

The referenced project's output library and headers\ folder are wired up automatically.


Visual Studio Integration

Install the IKVM.Clang extension to get:

  • Full CPS-based project system (Solution Explorer, property pages)
  • Syntax highlighting for C, C++, Objective-C, and Assembly
  • Custom project and file icons

When you open a project that uses this SDK, Visual Studio will offer to install the extension automatically if it is not already present.


Source and Issues

https://github.com/ikvmnet/ikvm-clang

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

  • .NETStandard 2.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.4 271 6/3/2026
2.0.3 113 6/3/2026
2.0.2 119 6/3/2026
2.0.1 115 6/2/2026
2.0.0 121 6/2/2026
1.0.0 158 5/29/2026
0.2.21 267 11/25/2025
0.2.20 322 9/15/2025
0.2.19 418 12/30/2024
0.2.18 1,702 5/31/2024
0.2.17 333 5/4/2024
0.2.16 351 4/11/2024
0.2.15 277 4/7/2024
0.2.14 279 4/4/2024
0.2.13 476 3/20/2024
0.2.12 271 3/20/2024
0.2.11 317 3/20/2024
0.2.10 321 3/20/2024
0.2.9 314 3/20/2024
0.1.13 314 3/20/2024
Loading failed