diff options
author | Michal Strehovský <MichalStrehovsky@users.noreply.github.com> | 2018-01-04 16:55:45 +0300 |
---|---|---|
committer | Jan Kotas <jkotas@microsoft.com> | 2018-01-04 16:55:45 +0300 |
commit | 330a63479becd05ae76a6adafbf69b8d9f75346d (patch) | |
tree | 663303a80bc246fdaeec9ec2c75e0143d968ff14 /src | |
parent | f78a0c53f736ec570f36492ea88e576c383cfa06 (diff) |
Add diagnostic messages to the build targets (#5171)
* Add diagnostic messages to the build targets
Two things:
* Running ILC takes a while but we don't print any information about it. Print a message.
* Invoking the publish from a clean command promt is something that will happen very often I assume. Make sure the failure message is more prescriptive.
We'll want to make these messages localizable at some point...
* Update Microsoft.NETCore.Native.Windows.props
* Attempt to add macOS/Linux handling
Diffstat (limited to 'src')
3 files changed, 13 insertions, 0 deletions
diff --git a/src/BuildIntegration/Microsoft.NETCore.Native.Unix.props b/src/BuildIntegration/Microsoft.NETCore.Native.Unix.props index 4c72de1d8..69539c5e1 100644 --- a/src/BuildIntegration/Microsoft.NETCore.Native.Unix.props +++ b/src/BuildIntegration/Microsoft.NETCore.Native.Unix.props @@ -80,5 +80,11 @@ See the LICENSE file in the project root for more information. <LinkerArg Include="-dynamiclib" Condition="'$(TargetOS)' == 'OSX' and '$(NativeLib)' == 'Shared'" /> <LinkerArg Include="-shared" Condition="'$(TargetOS)' != 'OSX' and '$(NativeLib)' == 'Shared'" /> </ItemGroup> + + <Exec Command="command -v $(CppLinker)" IgnoreExitCode="true"> + <Output TaskParameter="ExitCode" PropertyName="_WhereLinker"/> + </Exec> + <Error Condition="'$(_WhereLinker)' != '0' and '$(TargetOS)' == 'OSX'" Text="Platform linker ('$(CppLinker)') not found. Try installing Xcode to resolve the problem." /> + <Error Condition="'$(_WhereLinker)' != '0' and '$(TargetOS)' != 'OSX'" Text="Platform linker ('$(CppLinker)') not found. Try installing $(CppLinker) or the appropriate package for your platform to resolve the problem." /> </Target> </Project> diff --git a/src/BuildIntegration/Microsoft.NETCore.Native.Windows.props b/src/BuildIntegration/Microsoft.NETCore.Native.Windows.props index 9949a24ec..0182d5518 100644 --- a/src/BuildIntegration/Microsoft.NETCore.Native.Windows.props +++ b/src/BuildIntegration/Microsoft.NETCore.Native.Windows.props @@ -76,5 +76,10 @@ See the LICENSE file in the project root for more information. <LinkerArg Include="/OPT:REF" /> <LinkerArg Include="/OPT:ICF" /> </ItemGroup> + + <Exec Command="where /Q $(CppLinker)" IgnoreExitCode="true"> + <Output TaskParameter="ExitCode" PropertyName="_WhereLinker"/> + </Exec> + <Error Condition="'$(_WhereLinker)' != '0'" Text="Platform linker not found. Make sure to publish from a x64 Native Tools Command Prompt for VS 2017 with C++ tools installed." /> </Target> </Project> diff --git a/src/BuildIntegration/Microsoft.NETCore.Native.targets b/src/BuildIntegration/Microsoft.NETCore.Native.targets index 4a334e624..6e03efac7 100644 --- a/src/BuildIntegration/Microsoft.NETCore.Native.targets +++ b/src/BuildIntegration/Microsoft.NETCore.Native.targets @@ -166,6 +166,8 @@ See the LICENSE file in the project root for more information. <MakeDir Directories="$([System.IO.Path]::GetDirectoryName($(NativeObject)))" /> + <Message Text="Generating native code" Importance="high" /> + <Exec Command=""$(IlcPath)\tools\ilc" @"$(NativeIntermediateOutputPath)%(ManagedBinary.Filename).ilc.rsp"" /> </Target> |