Skip to content

Commit

Permalink
mono AOT option
Browse files Browse the repository at this point in the history
  • Loading branch information
igormcoelho committed Jul 24, 2019
1 parent f473ce9 commit bff08b7
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ gmp:
dotnet:
dotnet build src/dotnet/ -c Release
cp src/dotnet/bin/Release/netstandard2.0/csbiginteger_dotnet.dll build/
mono --aot -O=all build/csbiginteger_dotnet.dll
g++ -std=c++11 -Ofast --shared src/BigIntegerMono.cpp src/csBigIntegerLib.cpp `pkg-config --cflags --libs mono-2` -o build/csbiginteger_mono.so -fPIC


Expand Down
Binary file modified build/csbiginteger_dotnet.dll
Binary file not shown.
3 changes: 2 additions & 1 deletion src/BigIntegerMono.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ using namespace csbiginteger;

MonoDomain* domain = mono_jit_init("MonoScriptTry");

string asmPath = "csbiginteger_dotnet.dll";
// TODO: use AOT (ahead-of-time compilation) on csbiginteger_dotnet.dll.so
string asmPath = "csbiginteger_dotnet.dll";

MonoAssembly* assembly = mono_domain_assembly_open(domain, asmPath.c_str());

Expand Down
1 change: 1 addition & 0 deletions tests/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
*.gcno
reports/
*.dll
*.dll.so
1 change: 1 addition & 0 deletions tests/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ csBigIntegerGMP.test : csBigInteger.Test.cpp
csBigIntegerMono.test : csBigInteger.Test.cpp
dotnet build ../src/dotnet/ -c Release
cp ../src/dotnet/bin/Release/netstandard2.0/csbiginteger_dotnet.dll .
mono --aot -O=all csbiginteger_dotnet.dll
g++ --coverage -g -O0 --std=c++11 `pkg-config --cflags --libs mono-2` -I$(SRC_PATH) -I$(GTEST_INCLUDE) -I$(GMOCK_INCLUDE) $< -o $@ $(GMOCK_PATH)/gtest/libgtest_main.a $(GMOCK_PATH)/gtest/libgtest.a $(GMOCK_PATH)/libgmock.a $(SRC_PATH)/BigIntegerMono.cpp -lgmp -lgmpxx -lpthread -ldl


Expand Down

0 comments on commit bff08b7

Please sign in to comment.