Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
74febf15
R
roslyn
项目概览
lwm1986
/
roslyn
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
roslyn
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
74febf15
编写于
8月 17, 2015
作者:
A
Andrew Arnott
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Produce argument array instead of large string
上级
b416bb6a
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
22 addition
and
18 deletion
+22
-18
src/Compilers/Core/MSBuildTask/ManagedCompiler.cs
src/Compilers/Core/MSBuildTask/ManagedCompiler.cs
+16
-12
src/Compilers/Core/MSBuildTask/Microsoft.CSharp.Core.targets
src/Compilers/Core/MSBuildTask/Microsoft.CSharp.Core.targets
+3
-3
src/Compilers/Core/MSBuildTask/Microsoft.VisualBasic.Core.targets
...ilers/Core/MSBuildTask/Microsoft.VisualBasic.Core.targets
+3
-3
未找到文件。
src/Compilers/Core/MSBuildTask/ManagedCompiler.cs
浏览文件 @
74febf15
...
...
@@ -73,10 +73,10 @@ public int CodePage
}
[
Output
]
public
string
CommandLineInvocation
public
ITaskItem
[]
CommandLineArgs
{
set
{
_store
[
nameof
(
CommandLine
Invocation
)]
=
value
;
}
get
{
return
_store
.
GetOrDefault
(
nameof
(
CommandLineInvocation
),
string
.
Empty
)
;
}
set
{
_store
[
nameof
(
CommandLine
Args
)]
=
value
;
}
get
{
return
(
ITaskItem
[])
_store
[
nameof
(
CommandLineArgs
)]
;
}
}
public
string
DebugType
...
...
@@ -194,10 +194,10 @@ public bool Prefer32Bit
get
{
return
_store
.
GetOrDefault
(
nameof
(
Prefer32Bit
),
false
);
}
}
public
bool
ProvideCommandLine
Invocation
public
bool
ProvideCommandLine
Args
{
set
{
_store
[
nameof
(
ProvideCommandLine
Invocation
)]
=
value
;
}
get
{
return
_store
.
GetOrDefault
(
nameof
(
ProvideCommandLine
Invocation
),
false
);
}
set
{
_store
[
nameof
(
ProvideCommandLine
Args
)]
=
value
;
}
get
{
return
_store
.
GetOrDefault
(
nameof
(
ProvideCommandLine
Args
),
false
);
}
}
public
ITaskItem
[]
References
...
...
@@ -331,9 +331,10 @@ protected override Encoding StandardOutputEncoding
protected
override
int
ExecuteTool
(
string
pathToTool
,
string
responseFileCommands
,
string
commandLineCommands
)
{
if
(
ProvideCommandLine
Invocation
)
if
(
ProvideCommandLine
Args
)
{
CommandLineInvocation
=
GenerateResponseFileContents
();
CommandLineArgs
=
GetArguments
(
commandLineCommands
,
responseFileCommands
,
false
)
.
Select
(
arg
=>
new
TaskItem
(
arg
)).
ToArray
();
}
if
(
SkipCompilerExecution
)
...
...
@@ -354,7 +355,7 @@ protected override int ExecuteTool(string pathToTool, string responseFileCommand
Language
,
TryGetClientDir
()
??
Path
.
GetDirectoryName
(
pathToTool
),
CurrentDirectoryToUse
(),
GetArguments
(
commandLineCommands
,
responseFileCommands
),
GetArguments
(
commandLineCommands
,
responseFileCommands
,
true
),
_sharedCompileCts
.
Token
,
libEnvVariable
:
LibDirectoryToUse
());
...
...
@@ -523,10 +524,13 @@ public string GenerateResponseFileContents()
/// <summary>
/// Get the command line arguments to pass to the compiler.
/// </summary>
private
string
[]
GetArguments
(
string
commandLineCommands
,
string
responseFileCommands
)
private
string
[]
GetArguments
(
string
commandLineCommands
,
string
responseFileCommands
,
bool
emitServerLog
)
{
CompilerServerLogger
.
Log
(
$"CommandLine = '
{
commandLineCommands
}
'"
);
CompilerServerLogger
.
Log
(
$"BuildResponseFile = '
{
responseFileCommands
}
'"
);
if
(
emitServerLog
)
{
CompilerServerLogger
.
Log
(
$"CommandLine = '
{
commandLineCommands
}
'"
);
CompilerServerLogger
.
Log
(
$"BuildResponseFile = '
{
responseFileCommands
}
'"
);
}
var
commandLineArguments
=
CommandLineParser
.
SplitCommandLineIntoArguments
(
commandLineCommands
,
removeHashComments
:
true
);
...
...
src/Compilers/Core/MSBuildTask/Microsoft.CSharp.Core.targets
浏览文件 @
74febf15
...
...
@@ -19,7 +19,7 @@
@(_DebugSymbolsIntermediatePath);
$(NonExistentFile);
@(CustomAdditionalCompileOutputs)"
Returns="
$(CscCommandLineInvocation
)"
Returns="
@(CscCommandLineArgs
)"
DependsOnTargets="$(CoreCompileDependsOn)"
>
<!-- These two compiler warnings are raised when a reference is bound to a different version
...
...
@@ -105,7 +105,7 @@
Platform="$(PlatformTarget)"
Prefer32Bit="$(Prefer32Bit)"
PreferredUILang="$(PreferredUILang)"
ProvideCommandLine
Invocation="$(ProvideCommandLineInvocation
)"
ProvideCommandLine
Args="$(ProvideCommandLineArgs
)"
References="@(ReferencePath)"
ReportAnalyzer="$(ReportAnalyzer)"
Resources="@(_CoreCompileResourceInputs);@(CompiledLicenseFile)"
...
...
@@ -128,7 +128,7 @@
Win32Manifest="$(Win32Manifest)"
Win32Resource="$(Win32Resource)"
>
<Output TaskParameter="CommandLine
Invocation" PropertyName="CscCommandLineInvocation
" />
<Output TaskParameter="CommandLine
Args" ItemName="CscCommandLineArgs
" />
</Csc>
<ItemGroup>
...
...
src/Compilers/Core/MSBuildTask/Microsoft.VisualBasic.Core.targets
浏览文件 @
74febf15
...
...
@@ -19,7 +19,7 @@
@(_DebugSymbolsIntermediatePath);
$(NonExistentFile);
@(CustomAdditionalCompileOutputs)"
Returns="
$(VbcCommandLineInvocation
)"
Returns="
@(VbcCommandLineArgs
)"
DependsOnTargets="$(CoreCompileDependsOn)"
>
<PropertyGroup>
...
...
@@ -97,7 +97,7 @@
Platform="$(PlatformTarget)"
Prefer32Bit="$(Prefer32Bit)"
PreferredUILang="$(PreferredUILang)"
ProvideCommandLine
Invocation="$(ProvideCommandLineInvocation
)"
ProvideCommandLine
Args="$(ProvideCommandLineArgs
)"
References="@(ReferencePath)"
RemoveIntegerChecks="$(RemoveIntegerChecks)"
ReportAnalyzer="$(ReportAnalyzer)"
...
...
@@ -126,7 +126,7 @@
Win32Resource="$(Win32Resource)"
VBRuntime="$(VBRuntime)"
>
<Output TaskParameter="CommandLine
Invocation" PropertyName="CscCommandLineInvocation
" />
<Output TaskParameter="CommandLine
Args" ItemName="VbcCommandLineArgs
" />
</Vbc>
<ItemGroup>
<_CoreCompileResourceInputs Remove="@(_CoreCompileResourceInputs)" />
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录