summaryrefslogtreecommitdiff
path: root/src/mscorlib/GenerateSplitStringResources.targets
diff options
context:
space:
mode:
authorMatt Ellis <matell@microsoft.com>2015-08-10 22:36:57 -0700
committerMatt Ellis <matell@microsoft.com>2015-08-17 17:05:06 -0700
commit614d58f99a8385bb54281f2b7fb9d5dd6672a519 (patch)
treedfc013c785e9aaee12526141c8411dc2fd00e7f5 /src/mscorlib/GenerateSplitStringResources.targets
parent793558ed5b888b57553df4c8a3e740aa171e51d3 (diff)
downloadcoreclr-614d58f99a8385bb54281f2b7fb9d5dd6672a519.tar.gz
coreclr-614d58f99a8385bb54281f2b7fb9d5dd6672a519.tar.bz2
coreclr-614d58f99a8385bb54281f2b7fb9d5dd6672a519.zip
Build mscolrib.dll on Unix
Initial work to get mscorlib.dll building via Roslyn + MSBuild running on top of Mono on Linux. - Use a newer version of BclRewriter.exe which works cross-platform, the major difference here is that now we need to specify the input assembly as a named argument instead (since fully qualified paths on Unix look like flags on Windows). - The ResGen we use comes from Mono, which does not support the -d flag, so we need to stop passing defines to ResGen. I know the mono folks recently did some work to address this, but long term we need to move towards getting our ResGen.exe running on CoreCLR and use that instead. - Don't require that mono is installed in order to build coreclr. If mono is not on the path, skip the build step to enable folks to do development without Mono. In this case, they will need to continue to build mscorlib.dll on Windows, targeting Unix. - Mono stability has been an issue for folks that have buddy tested this. I've found that recent mono 4.2 builds, when run with the Boehm GC work well for me. Other folks have other builds they like instead. The `skipmscorlib` flag can be passed to build.sh if you want to skip building mscorlib.dll locally.
Diffstat (limited to 'src/mscorlib/GenerateSplitStringResources.targets')
-rw-r--r--src/mscorlib/GenerateSplitStringResources.targets11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/mscorlib/GenerateSplitStringResources.targets b/src/mscorlib/GenerateSplitStringResources.targets
index dd00efd80c..4b69ba6ead 100644
--- a/src/mscorlib/GenerateSplitStringResources.targets
+++ b/src/mscorlib/GenerateSplitStringResources.targets
@@ -1,6 +1,7 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
- <ResGenCommand Condition="'$(ResGenCommand)'==''">$(SDK40ToolsPath)ResGen.exe</ResGenCommand>
+ <ResGenCommand Condition="'$(ResGenCommand)'=='' and '$(OsEnvironment)'=='Windows_NT'">$(SDK40ToolsPath)ResGen.exe</ResGenCommand>
+ <ResGenCommand Condition="'$(ResGenCommand)'=='' and '$(OsEnvironment)'=='Unix'">resgen</ResGenCommand>
<PrepareResourcesDependsOn>GenerateSplitStringResources;$(PrepareResourcesDependsOn)</PrepareResourcesDependsOn>
</PropertyGroup>
@@ -8,12 +9,14 @@
Inputs="$(MSBuildThisFileFullPath);$(MSBuildProjectFile);$(BclSourcesRoot)\mscorlib.txt"
Outputs="@(SplitTextStringResource->'$(IntermediateOutputPath)%(Filename).resources')">
- <ItemGroup>
+ <ItemGroup Condition="'$(OsEnvironment)'=='Windows_NT'">
<Internal_ResGenDefines Remove="" />
+ <Internal_ResGenDefines Include="INCLUDE_DEBUG" />
+ <Internal_ResGenDefines Include="INCLUDE_RUNTIME" />
<Internal_ResGenDefines Include="%(SplitTextStringResource.ResGenDefines)" />
</ItemGroup>
- <Exec Command="&quot;$(ResGenCommand)&quot; &quot;%(SplitTextStringResource.Identity)&quot; &quot;$(IntermediateOutputPath)%(SplitTextStringResource.Filename).resources&quot; /D:INCLUDE_DEBUG /D:INCLUDE_RUNTIME @(Internal_ResGenDefines->'/D:%(Identity)', ' ')" />
+ <Exec Command="&quot;$(ResGenCommand)&quot; &quot;%(SplitTextStringResource.Identity)&quot; &quot;$(IntermediateOutputPath)%(SplitTextStringResource.Filename).resources&quot; @(Internal_ResGenDefines->'/D:%(Identity)', ' ')" />
<ItemGroup>
<EmbeddedResource Include="@(SplitTextStringResource->'$(IntermediateOutputPath)%(Filename).resources')">
@@ -27,4 +30,4 @@
<Internal_ResGenDefines Remove="" />
</ItemGroup>
</Target>
-</Project> \ No newline at end of file
+</Project>