Beispiel #1
0
 protected virtual void AddAdditionalLinkOptions(LinkerArgumentBuilder builder, TestCaseMetadaProvider metadataProvider)
 {
 }
Beispiel #2
0
        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);
        }
Beispiel #3
0
        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);
        }