Пример #1
0
        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));
            }
        }