コード例 #1
0
ファイル: MSTests.cs プロジェクト: ARLM-Attic/cs-native
 public void TestAndroid()
 {
     Il2Converter.Convert(
         Path.GetFullPath(CompilerHelper.AndroidPath),
         CompilerHelper.OutputPath,
         CompilerHelper.GetConverterArgs(true));
 }
コード例 #2
0
ファイル: MSTests.cs プロジェクト: ARLM-Attic/cs-native
 public void TestOpenGlExe()
 {
     Il2Converter.Convert(
         Path.GetFullPath(CompilerHelper.OpenGlExePath),
         CompilerHelper.OutputPath,
         CompilerHelper.GetConverterArgs(true));
 }
コード例 #3
0
ファイル: MSTests.cs プロジェクト: ARLM-Attic/cs-native
 public void TestOpenGlLib()
 {
     // todo:
     // 1) class Condition method _getEffectiveTarget when it is returning Object it does not cast Interface to an Object, to replicate the issue change returning type to Object
     // 2) the same as 1) but in InterpolateValueAction when saving value 'value = this._target[this._property]'
     Il2Converter.Convert(
         Path.GetFullPath(CompilerHelper.OpenGlLibPath),
         CompilerHelper.OutputPath,
         CompilerHelper.GetConverterArgs(true));
 }
コード例 #4
0
ファイル: MSTests.cs プロジェクト: ARLM-Attic/cs-native
        public void TestMscorlibCompile_TypeTest()
        {
            // Do not forget to set MSCORLIB variable

            Il2Converter.Convert(
                Path.GetFullPath(
                    @"C:\Windows\Microsoft.NET\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll"),
                CompilerHelper.OutputPath,
                CompilerHelper.GetConverterArgs(false),
                new[] { "System.Diagnostics.Tracing.EventProvider" });
        }
コード例 #5
0
ファイル: MSTests.cs プロジェクト: ARLM-Attic/cs-native
        public void TestMscorlibCompile_ReducedBuild()
        {
            // Do not forget to set MSCORLIB variable

            Il2Converter.Convert(
                //Path.GetFullPath(@"C:\Windows\Microsoft.NET\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll"),
                CompilerHelper.MscorlibPath,
                CompilerHelper.OutputPath,
                CompilerHelper.GetConverterArgs(false),
                new[]
            {
                "System.Object",
            });
        }
コード例 #6
0
ファイル: MSTests.cs プロジェクト: ARLM-Attic/cs-native
        public void TestCoreLib()
        {
            Il2Converter.Convert(
                Path.GetFullPath(CompilerHelper.CoreLibPath),
                CompilerHelper.OutputPath,
                CompilerHelper.GetConverterArgs(false));

            if (CompilerHelper.CompileWithOptimization)
            {
                CompilerHelper.ExecCmd("opt", "CoreLib.ll -o CoreLib.bc -O2");
                CompilerHelper.ExecCmd(
                    "llc",
                    string.Format("-filetype=obj -mtriple={0} CoreLib.bc", CompilerHelper.Target));
            }
            else
            {
                CompilerHelper.ExecCmd(
                    "llc",
                    string.Format("-filetype=obj -mtriple={0} CoreLib.ll", CompilerHelper.Target));
            }
        }
コード例 #7
0
ファイル: MSTests.cs プロジェクト: ARLM-Attic/cs-native
        public void TestMscorlibCompile()
        {
            // TODO: if you have undefined symbols, remove all linkodr_once and see which symbol is not defined

            // Do not forget to set MSCORLIB variable

            // you need to compile it with optimization, otherwise it will not be compiled as being to big

            /*
             *  IF NOT EXIST mscorlib.obj opt mscorlib.ll -o mscorlib.bc -O2
             *  IF NOT EXIST mscorlib.obj llc -filetype=obj -mtriple=i686-w64-mingw32 mscorlib.bc
             *  opt test-1.ll -o test-1.bc -O3
             *  llc -filetype=obj -mtriple=i686-w64-mingw32 test-1.bc
             *  g++.exe -o test-1.exe mscorlib.obj test-1.obj -lstdc++ -lgc-lib -march=i686 -L .
             *  del test-1.obj
             *  del test-1.bc
             */

            // alternative way to compile

            /*
             *  llvm-link -o=test-1.bc test-1.ll mscorlib.ll
             *  llc -filetype=obj -mtriple=i686-w64-mingw32 test-1.bc
             *  g++.exe -o test-1.exe test-1.obj -lstdc++ -lgc-lib -march=i686 -L .
             *  del test-1.o
             */

            // WHAT TODO here
            // remove static dependancy on count of interfaces
            // adjust creating string as MSCORLIB does
            // adjust creating RuntimeType as MSCORLIB does

            Il2Converter.Convert(
                Path.GetFullPath(
                    @"C:\Windows\Microsoft.NET\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll"),
                CompilerHelper.OutputPath,
                CompilerHelper.GetConverterArgs(false, stubs: true));
        }
コード例 #8
0
ファイル: MSTests.cs プロジェクト: ARLM-Attic/cs-native
        public void TestMscolibCSNative()
        {
            // TODO: if you have undefined symbols, remove all linkodr_once and see which symbol is not defined

            Il2Converter.Convert(
                Path.GetFullPath(CompilerHelper.MscorlibPath),
                CompilerHelper.OutputPath,
                CompilerHelper.GetConverterArgs(false, stubs: true));

            ////if (CompilerHelper.CompileWithOptimization)
            ////{
            ////    CompilerHelper.ExecCmd("opt", "CoreLib.ll -o CoreLib.bc -O2");
            ////    CompilerHelper.ExecCmd(
            ////        "llc",
            ////        string.Format("-filetype=obj -mtriple={0} mscorlib.bc", CompilerHelper.Target));
            ////}
            ////else
            ////{
            ////    CompilerHelper.ExecCmd(
            ////        "llc",
            ////        string.Format("-filetype=obj -mtriple={0} mscorlib.ll", CompilerHelper.Target));
            ////}
        }