Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arm64 bindings #1825

Closed
wants to merge 23 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
c880be4
Enable ARM64 support on LLVM builds
konistehrad Feb 2, 2024
308d6af
Fix missing AArch64 entry in CLI CppAbi
konistehrad Feb 2, 2024
343d009
Instruct generator to build ARM64 bindings
konistehrad Feb 2, 2024
26d8b43
main.yml consumes arm64
konistehrad Feb 3, 2024
c519e38
Expand ParserGen to accept ARM64 build process
konistehrad Feb 3, 2024
ed62cc0
ARM64 and updated Darwin bindings
konistehrad Feb 3, 2024
3f69643
Fix path resolution on non-Windows ParserGen
konistehrad Feb 3, 2024
126bdd3
Merge branch 'main' into arm64-bindings
konistehrad Feb 3, 2024
011d637
Update CppSharp.Parser.CSharp.csproj with ARM paths
konistehrad Feb 4, 2024
378d569
Copy templates.cpp to arm folders as well
konistehrad Feb 4, 2024
3bda5b6
proper darwin version for headers
konistehrad Feb 4, 2024
343bad1
main.yml consumes arm64
konistehrad Feb 3, 2024
4306054
Expand ParserGen to accept ARM64 build process
konistehrad Feb 3, 2024
fec1a12
ARM64 and updated Darwin bindings
konistehrad Feb 3, 2024
27911ec
Fix path resolution on non-Windows ParserGen
konistehrad Feb 3, 2024
b1cc421
Update CppSharp.Parser.CSharp.csproj with ARM paths
konistehrad Feb 4, 2024
59ff726
Copy templates.cpp to arm folders as well
konistehrad Feb 4, 2024
6348e87
proper darwin version for headers
konistehrad Feb 4, 2024
f965ac0
Merge branch 'arm64-bindings' of github.com:konistehrad/CppSharp into…
konistehrad Feb 6, 2024
8326591
Update Darwin path in Helpers.lua
konistehrad Feb 6, 2024
dd57d69
update ARM64 bindings to use Winapi calling convention
konistehrad Feb 6, 2024
6fb31a4
remove ARM from main.yml, as runners are not generally available
konistehrad Feb 6, 2024
1286503
Add ARM64 to ArchType
konistehrad Feb 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions build/Helpers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -253,11 +253,11 @@ function AddPlatformSpecificFiles(folder, filename)
files { path.join(folder, "i686-pc-win32-msvc", filename) }
elseif os.istarget("macosx") then
filter { "architecture:arm64" }
files { path.join(folder, "arm64-apple-darwin12.4.0", filename) }
files { path.join(folder, "arm64-apple-darwin21.4.0", filename) }
filter { "architecture:x86_64" }
files { path.join(folder, "x86_64-apple-darwin12.4.0", filename) }
files { path.join(folder, "x86_64-apple-darwin21.4.0", filename) }
filter {"architecture:x86" }
files { path.join(folder, "i686-apple-darwin12.4.0", filename) }
files { path.join(folder, "i686-apple-darwin21.4.0", filename) }
elseif os.istarget("linux") then
filter { "architecture:arm64" }
files { path.join(folder, "arm64-linux-gnu" .. (UseCxx11ABI() and "-cxx11abi" or ""), filename) }
Expand Down
3 changes: 2 additions & 1 deletion src/CppParser/AST.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ enum class ArchType
{
UnknownArch,
x86,
x86_64
x86_64,
ARM64
};

class CS_API NativeLibrary
Expand Down
3 changes: 2 additions & 1 deletion src/CppParser/Bindings/CLI/AST.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ namespace CppSharp
{
UnknownArch = 0,
X86 = 1,
X86_64 = 2
X86_64 = 2,
ARM64 = 3,
};

public ref class NativeLibrary : ICppInstance
Expand Down
2 changes: 1 addition & 1 deletion src/CppParser/Bindings/CLI/Decl.h
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ namespace CppSharp
Itanium = 0,
Microsoft = 1,
ARM = 2,
AArch64 = 3,
AArch64 = 3,
iOS = 4,
AppleARM64 = 5,
WebAssembly = 6
Expand Down
7 changes: 5 additions & 2 deletions src/CppParser/Bindings/CSharp/CppSharp.Parser.CSharp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,13 @@
<NoWarn>0109</NoWarn>
<PlatformParserFolder Condition="$(IsWindows) AND $(PlatformTarget) == x64">x86_64-pc-win32-msvc</PlatformParserFolder>
<PlatformParserFolder Condition="$(IsLinux) AND $(PlatformTarget) == x64 AND $(UseCXX11ABI)">x86_64-linux-gnu-cxx11abi</PlatformParserFolder>
<PlatformParserFolder Condition="$(IsLinux) AND $(PlatformTarget) == arm64 AND $(UseCXX11ABI)">arm64-linux-gnu-cxx11abi</PlatformParserFolder>
<PlatformParserFolder Condition="$(IsLinux) AND $(PlatformTarget) == x64 AND !$(UseCXX11ABI)">x86_64-linux-gnu</PlatformParserFolder>
<PlatformParserFolder Condition="$(IsMacOSX) AND $(PlatformTarget) == x64">x86_64-apple-darwin12.4.0</PlatformParserFolder>
<PlatformParserFolder Condition="$(IsLinux) AND $(PlatformTarget) == arm64 AND !$(UseCXX11ABI)">arm64-linux-gnu</PlatformParserFolder>
<PlatformParserFolder Condition="$(IsMacOSX) AND $(PlatformTarget) == x64">x86_64-apple-darwin21.4.0</PlatformParserFolder>
<PlatformParserFolder Condition="$(IsMacOSX) AND $(PlatformTarget) == arm64">arm64-apple-darwin21.4.0</PlatformParserFolder>
<PlatformParserFolder Condition="$(IsWindows) AND $(PlatformTarget) == x86">i686-pc-win32-msvc</PlatformParserFolder>
<PlatformParserFolder Condition="$(IsMacOSX) AND $(PlatformTarget) == x86">i686-apple-darwin12.4.0</PlatformParserFolder>
<PlatformParserFolder Condition="$(IsMacOSX) AND $(PlatformTarget) == x86">i686-apple-darwin21.4.0</PlatformParserFolder>
</PropertyGroup>

<ItemGroup>
Expand Down
42,515 changes: 42,515 additions & 0 deletions src/CppParser/Bindings/CSharp/arm64-apple-darwin21.4.0/CppSharp.CppParser.cs

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#include <AST.h>
#include <Sources.h>
#include <CppParser.h>

template class vector<CppSharp::CppParser::AST::Namespace*>;
template class vector<CppSharp::CppParser::AST::Enumeration*>;
template class vector<CppSharp::CppParser::AST::Function*>;
template class vector<CppSharp::CppParser::AST::Class*>;
template class vector<CppSharp::CppParser::AST::Template*>;
template class vector<CppSharp::CppParser::AST::TypedefDecl*>;
template class vector<CppSharp::CppParser::AST::TypeAlias*>;
template class vector<CppSharp::CppParser::AST::Variable*>;
template class vector<CppSharp::CppParser::AST::Friend*>;
template class vector<CppSharp::CppParser::AST::BaseClassSpecifier*>;
template class vector<CppSharp::CppParser::AST::Field*>;
template class vector<CppSharp::CppParser::AST::Method*>;
template class vector<CppSharp::CppParser::AST::AccessSpecifierDecl*>;
template class vector<CppSharp::CppParser::AST::Declaration*>;
template class vector<CppSharp::CppParser::AST::FunctionTemplateSpecialization*>;
template class vector<CppSharp::CppParser::AST::Parameter*>;
template class vector<CppSharp::CppParser::AST::Enumeration::Item*>;
template class vector<CppSharp::CppParser::AST::BlockContentComment*>;
template class vector<CppSharp::CppParser::AST::PreprocessedEntity*>;
template class vector<CppSharp::CppParser::AST::Expression*>;
template class vector<CppSharp::CppParser::AST::ClassTemplateSpecialization*>;
template class vector<CppSharp::CppParser::AST::VarTemplateSpecialization*>;
template class vector<CppSharp::CppParser::AST::MacroDefinition*>;
template class vector<CppSharp::CppParser::AST::TranslationUnit*>;
template class vector<CppSharp::CppParser::AST::InlineContentComment*>;
template class vector<CppSharp::CppParser::AST::VerbatimBlockLineComment*>;
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <new>

template std::allocator<char>::allocator() noexcept;
template std::basic_string<char, std::char_traits<char>, std::allocator<char>>::basic_string() noexcept(true);
template std::basic_string<char, std::char_traits<char>, std::allocator<char>>::basic_string();
template std::basic_string<char, std::char_traits<char>, std::allocator<char>>::~basic_string() noexcept;
template std::basic_string<char, std::char_traits<char>, std::allocator<char>>& std::basic_string<char, std::char_traits<char>, std::allocator<char>>::assign(const char*);
template const char* std::basic_string<char, std::char_traits<char>, std::allocator<char>>::data() const noexcept;
Loading
Loading