Skip to content

Commit

Permalink
use proper TargetProfile setting (#1699)
Browse files Browse the repository at this point in the history
* use propoer TargetProfile setting

* remove duplicate lines

* use propoer TargetProfile setting

* Update FSharp.Core.fsproj

* Update FSharp.Core.fsproj
  • Loading branch information
dsyme authored Nov 3, 2016
1 parent 1fbb065 commit 2f06e21
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 11 deletions.
7 changes: 5 additions & 2 deletions src/FSharpSource.targets
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@
<DefineConstants>$(DefineConstants);NETSTANDARD1_6</DefineConstants>
<DefineConstants>$(DefineConstants);NETCOREAPP1_0</DefineConstants>
<OtherFlags>$(OtherFlags) --simpleresolution</OtherFlags>
<TargetProfile>netcore</TargetProfile>
<TargetFrameworkProfile></TargetFrameworkProfile> <!-- We are currently directly referencing corefx assemblies, so profile7 is not really true -->
<TargetFrameworkVersion Condition="'$(TargetFrameworkVersion)' == ''">v5.0</TargetFrameworkVersion>
<ImplicitlyExpandTargetFramework>false</ImplicitlyExpandTargetFramework> <!-- To stop msbuild being helpfull and referencing the dlls for the profile -->
Expand Down Expand Up @@ -278,8 +279,8 @@
<DefineConstants>$(DefineConstants);FX_NO_MISSINGMETHODEXCEPTION</DefineConstants>
<DefineConstants>$(DefineConstants);FX_RESHAPED_REFLECTION</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_EXIT_CONTEXT_FLAGS</DefineConstants>
<DefineConstants>$(DefineConstants);FX_EVENTWAITHANDLE_NO_IDISPOSABLE</DefineConstants>
<TargetingNetCorePortable>true</TargetingNetCorePortable>
<DefineConstants>$(DefineConstants);FX_EVENTWAITHANDLE_NO_IDISPOSABLE</DefineConstants>
<TargetProfile>netcore</TargetProfile>
<TargetFrameworkProfile>Profile7</TargetFrameworkProfile>
<TargetFrameworkVersion Condition="'$(TargetFrameworkVersion)' == ''">v4.5</TargetFrameworkVersion>
</PropertyGroup>
Expand Down Expand Up @@ -317,6 +318,7 @@
<DefineConstants>$(DefineConstants);FX_NO_MISSINGMETHODEXCEPTION</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_CONCURRENT_DICTIONARY</DefineConstants>
<DefineConstants>$(DefineConstants);FX_ATLEAST_LINQ</DefineConstants>
<TargetProfile>netcore</TargetProfile>
<TargetFrameworkProfile>Profile78</TargetFrameworkProfile>
<TargetFrameworkVersion Condition="'$(TargetFrameworkVersion)' == ''">v4.5</TargetFrameworkVersion>
</PropertyGroup>
Expand Down Expand Up @@ -354,6 +356,7 @@
<DefineConstants>$(DefineConstants);FX_NO_MISSINGMETHODEXCEPTION</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_CONCURRENT_DICTIONARY</DefineConstants>
<DefineConstants>$(DefineConstants);FX_ATLEAST_LINQ</DefineConstants>
<TargetProfile>netcore</TargetProfile>
<TargetFrameworkProfile>Profile259</TargetFrameworkProfile>
<TargetFrameworkVersion Condition="'$(TargetFrameworkVersion)' == ''">v4.5</TargetFrameworkVersion>
</PropertyGroup>
Expand Down
1 change: 0 additions & 1 deletion src/fsharp/FSharp.Build/FSharp.Build.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
<AssemblyName>FSharp.Build</AssemblyName>
<AllowCrossTargeting>true</AllowCrossTargeting>
<ProjectGuid>{702A7979-BCF9-4C41-853E-3ADFC9897890}</ProjectGuid>
<OtherFlags Condition=" '$(TargetFramework)'=='coreclr'">$(OtherFlags) --targetprofile:netcore</OtherFlags>
<FX_NOLOADER>true</FX_NOLOADER>
</PropertyGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
<DefineConstants>EXTENSIONTYPING;$(DefineConstants)</DefineConstants>
<AssemblyName>FSharp.Compiler.Interactive.Settings</AssemblyName>
<FileAlignment>512</FileAlignment>
<OtherFlags Condition=" '$(TargetFramework)'=='coreclr'">$(OtherFlags) --targetprofile:netcore</OtherFlags>
</PropertyGroup>
<ItemGroup>
<FsSrGen Include="..\FSInteractiveSettings.txt">
Expand Down
1 change: 0 additions & 1 deletion src/fsharp/FSharp.Compiler/FSharp.Compiler.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
<AllowCrossTargeting>true</AllowCrossTargeting>
<BaseAddress>0x06800000</BaseAddress>
<OtherFlags>$(OtherFlags) /warnon:1182</OtherFlags>
<OtherFlags Condition=" '$(TargetFramework)'=='coreclr'">$(OtherFlags) --targetprofile:netcore</OtherFlags>
</PropertyGroup>
<!-- References -->
<Import Project="$(FSharpSourcesRoot)\.nuget\NuGet.targets" Condition="Exists('$(FSharpSourcesRoot)\.nuget\NuGet.targets')" />
Expand Down
8 changes: 4 additions & 4 deletions src/fsharp/FSharp.Core/FSharp.Core.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
<OtherFlags>$(OtherFlags) --warnon:1182 --compiling-fslib --maxerrors:20 --extraoptimizationloops:1 </OtherFlags>
<OtherFlags Condition=" '$(TargetFramework)'=='net20'">$(OtherFlags) --compiling-fslib-20:"$(SystemRoot)\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll" </OtherFlags>
<OtherFlags Condition=" '$(TargetFramework)'=='net40'">$(OtherFlags) --compiling-fslib-40</OtherFlags>
<OtherFlags Condition=" '$(TargetFramework)'=='coreclr'">$(OtherFlags) --compiling-fslib-40 --targetprofile:netcore</OtherFlags>
<OtherFlags Condition=" '$(TargetFramework)'=='portable7'">$(OtherFlags) --compiling-fslib-40 --targetprofile:netcore</OtherFlags>
<OtherFlags Condition=" '$(TargetFramework)'=='portable78'">$(OtherFlags) --compiling-fslib-40 --compiling-fslib-nobigint --targetprofile:netcore</OtherFlags>
<OtherFlags Condition=" '$(TargetFramework)'=='portable259'">$(OtherFlags) --compiling-fslib-40 --compiling-fslib-nobigint --targetprofile:netcore</OtherFlags>
<OtherFlags Condition=" '$(TargetFramework)'=='coreclr'">$(OtherFlags) --compiling-fslib-40</OtherFlags>
<OtherFlags Condition=" '$(TargetFramework)'=='portable7'">$(OtherFlags) --compiling-fslib-40</OtherFlags>
<OtherFlags Condition=" '$(TargetFramework)'=='portable78'">$(OtherFlags) --compiling-fslib-40 --compiling-fslib-nobigint</OtherFlags>
<OtherFlags Condition=" '$(TargetFramework)'=='portable259'">$(OtherFlags) --compiling-fslib-40 --compiling-fslib-nobigint</OtherFlags>
</PropertyGroup>
<ItemGroup>
<FilesToLocalize Include="$(OutDir)$(AssemblyName).dll">
Expand Down
1 change: 0 additions & 1 deletion src/fsharp/Fsc/Fsc.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
<AllowCrossTargeting>true</AllowCrossTargeting>
<TargetFrameworkVersion Condition="'$(TargetFramework)'=='net20'">v2.0</TargetFrameworkVersion>
<OtherFlags>$(OtherFlags) --warnon:1182</OtherFlags>
<OtherFlags Condition=" '$(TargetFramework)'=='coreclr'">$(OtherFlags) --targetprofile:netcore</OtherFlags>
</PropertyGroup>
<ItemGroup>
<FilesToLocalize Include="$(OutDir)$(AssemblyName).exe">
Expand Down
1 change: 0 additions & 1 deletion src/fsharp/fsi/Fsi.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
<OtherFlags>$(OtherFlags) --warnon:1182</OtherFlags>
<Win32Resource>fsi.res</Win32Resource>
<TargetFrameworkVersion Condition="'$(TargetFramework)' != 'coreclr'">v4.6</TargetFrameworkVersion>
<OtherFlags Condition=" '$(TargetFramework)'=='coreclr'">$(OtherFlags) --targetprofile:netcore</OtherFlags>
</PropertyGroup>
<ItemGroup>
<FilesToLocalize Include="$(OutDir)$(AssemblyName).exe">
Expand Down

0 comments on commit 2f06e21

Please sign in to comment.