Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is that a thing?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a property used by the Fsc task

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is all internal build engineering stuff trying to clear up the legacy, Right now we use MSBuild and Microsoft.DotNet.BuildTools in this repo to build .NET Core stuff. No one else does that except corefx, it's just different

Enrico's stuff is orthogonal - when it's real it will help us to converge

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool thanks for clarification.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As don said, the TargetFramework (and TargetFrameworks ) depends on on .net core sdk msbuild targets.
Atm i pass --targetprofile:netcore flag to fsc (in sdk preview2 too) if target framework is netstandard or netcoreapp ( ref https://github.com/dotnet/netcorecli-fsc/blob/b5dd998bc6d444812c62cbac96eae48078eb77f7/src/dotnet-compile-fsc/Program.cs#L179-L182 )
Maybe that is another thing the FcsTask can infer by itself becased on TargetFramework

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@enricosada You should also pass it when compiling up the .NET Portable profiles where System.Runtime is king (everything except the "legacy" profiles like Profile47)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dsyme thx, i'll do.
i was asking usage times ago, adding ref to dotnet/netcorecli-fsc#2 for remeber to do it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@enricosada great

<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