コード例 #1
0
 protected virtual void AddAdditionalLinkOptions(LinkerArgumentBuilder builder, TestCaseMetadaProvider metadataProvider)
 {
 }
コード例 #2
0
ファイル: TestRunner.cs プロジェクト: am11/linker
        protected virtual void AddLinkOptions(TestCaseSandbox sandbox, ManagedCompilationResult compilationResult, LinkerArgumentBuilder builder, TestCaseMetadataProvider metadataProvider)
        {
            var caseDefinedOptions = metadataProvider.GetLinkerOptions(sandbox.InputDirectory);

            builder.AddOutputDirectory(sandbox.OutputDirectory);

            foreach (var rspFile in sandbox.ResponseFiles)
            {
                builder.AddResponseFile(rspFile);
            }

            foreach (var inputReference in sandbox.InputDirectory.Files())
            {
                var ext = inputReference.ExtensionWithDot;
                if (ext == ".dll" || ext == ".exe")
                {
                    builder.AddReference(inputReference);
                }
            }
            var coreAction = caseDefinedOptions.TrimMode ?? "skip";

            foreach (var extraReference in metadataProvider.GetExtraLinkerReferences())
            {
                builder.AddReference(extraReference);
                builder.AddAssemblyAction(coreAction, extraReference.FileNameWithoutExtension);
            }

            builder.ProcessOptions(caseDefinedOptions);

            builder.ProcessTestInputAssembly(compilationResult.InputAssemblyPath);
        }
コード例 #3
0
ファイル: TestRunner.cs プロジェクト: layomia/mono_linker
        protected virtual void AddLinkOptions(TestCaseSandbox sandbox, ManagedCompilationResult compilationResult, LinkerArgumentBuilder builder, TestCaseMetadaProvider metadataProvider)
        {
            var caseDefinedOptions = metadataProvider.GetLinkerOptions(sandbox.InputDirectory);

            builder.AddOutputDirectory(sandbox.OutputDirectory);
            foreach (var linkXmlFile in sandbox.LinkXmlFiles)
            {
                builder.AddLinkXmlFile(linkXmlFile);
            }

            foreach (var rspFile in sandbox.ResponseFiles)
            {
                builder.AddResponseFile(rspFile);
            }

            builder.AddSearchDirectory(sandbox.InputDirectory);
            foreach (var extraSearchDir in metadataProvider.GetExtraLinkerSearchDirectories())
            {
                builder.AddSearchDirectory(extraSearchDir);
            }

            builder.ProcessOptions(caseDefinedOptions);

            builder.ProcessTestInputAssembly(compilationResult.InputAssemblyPath);
        }