Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0a3a5a8

Browse files
committed
Add capability to build portable profile 7 FSharp.Core in open source, and update tests accordingly. (changeset 1275032)
1 parent01c621c commit0a3a5a8

File tree

8 files changed

+63
-12
lines changed

8 files changed

+63
-12
lines changed

‎DEVGUIDE.html‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,7 @@ <h3>2. Building an F# (Debug) library, compiler, type providers and unit tests<
351351
msbuild fsharp-library-unittests-build.proj /p:TargetFramework=net40
352352
msbuild fsharp-library-build.proj /p:TargetFramework=net20
353353
msbuild fsharp-library-build.proj /p:TargetFramework=portable47
354+
msbuild fsharp-library-build.proj /p:TargetFramework=portable7
354355
</pre>
355356

356357

‎src/FSharpSource.targets‎

Lines changed: 44 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,11 @@
2424
<OtherFlags>$(OtherFlags) --version:4.3.1.9055</OtherFlags>
2525
<OtherFlagsCondition="'$(TargetFramework)' == 'net20'">$(OtherFlags) --version:2.3.1.9055</OtherFlags>
2626
<OtherFlagsCondition="'$(TargetFramework)' == 'portable47'">$(OtherFlags) --version:2.3.5.9055</OtherFlags>
27+
<OtherFlagsCondition="'$(TargetFramework)' == 'portable7'">$(OtherFlags) --version:3.3.1.9055</OtherFlags>
2728
</PropertyGroup>
2829

2930
<!-- We sign with the Microsoft key and use delay-signing-->
30-
<PropertyGroupCondition="'$(AssemblyName)' == 'FSharp.Core' AND ('$(Configuration)'=='Debug' OR '$(Configuration)'=='Release') AND ('$(TargetFramework)' == 'net20' OR '$(TargetFramework)' == 'net40' OR '$(TargetFramework)' == 'portable47')">
31+
<PropertyGroupCondition="'$(AssemblyName)' == 'FSharp.Core' AND ('$(Configuration)'=='Debug' OR '$(Configuration)'=='Release') AND ('$(TargetFramework)' == 'net20' OR '$(TargetFramework)' == 'net40' OR '$(TargetFramework)' == 'portable47' OR '$(TargetFramework)' == 'portable7')">
3132
<DefineConstants>STRONG_NAME_AND_DELAY_SIGN_FSHARP_COMPILER_WITH_MSFT_KEY;$(DefineConstants)</DefineConstants>
3233
<OtherFlags>$(OtherFlags) --delaysign+ --keyfile:"$(FSharpSourcesRoot)\fsharp\msft.pubkey"</OtherFlags>
3334
<StrongNames>true</StrongNames>
@@ -103,7 +104,7 @@
103104
<!-- MSbuild works out the assembly references-->
104105
</PropertyGroup>
105106

106-
<!-- Target Portable-->
107+
<!-- Target PortableProfile 47-->
107108
<PropertyGroupCondition="'$(TargetFramework)'=='portable47'">
108109

109110
<DefineConstants>$(DefineConstants);FSHARP_CORE_PORTABLE</DefineConstants>
@@ -158,6 +159,44 @@
158159
<TargetFrameworkProfile>Profile47</TargetFrameworkProfile>
159160
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
160161
</PropertyGroup>
162+
163+
<!-- Target Portable Profile 7-->
164+
<PropertyGroupCondition="'$(TargetFramework)'=='portable7'">
165+
<DefineConstants>$(DefineConstants);QUERIES_IN_FSLIB</DefineConstants>
166+
<DefineConstants>$(DefineConstants);FSHARP_CORE_NETCORE_PORTABLE</DefineConstants>
167+
<DefineConstants>$(DefineConstants);FX_ATLEAST_35</DefineConstants>
168+
<DefineConstants>$(DefineConstants);FX_ATLEAST_PORTABLE</DefineConstants>
169+
<DefineConstants>$(DefineConstants);FX_NO_ARRAY_LONG_LENGTH</DefineConstants>
170+
<DefineConstants>$(DefineConstants);FX_NO_EXIT</DefineConstants>
171+
<DefineConstants>$(DefineConstants);FX_NO_CHAR_PARSE</DefineConstants>
172+
<DefineConstants>$(DefineConstants);FX_NO_DEFAULT_DEPENDENCY_TYPE</DefineConstants>
173+
<DefineConstants>$(DefineConstants);FX_SIMPLE_SECURITY_PERMISSIONS</DefineConstants>
174+
<DefineConstants>$(DefineConstants);FX_NO_REFLECTION_MODULES</DefineConstants>
175+
<DefineConstants>$(DefineConstants);FX_NO_REFLECTION_METADATA_TOKENS</DefineConstants>
176+
<DefineConstants>$(DefineConstants);FX_NO_EXIT_CONTEXT_FLAGS</DefineConstants>
177+
<DefineConstants>$(DefineConstants);FX_NO_BASED_ARRAYS</DefineConstants>
178+
<DefineConstants>$(DefineConstants);FX_NO_BINARY_SERIALIZATION</DefineConstants>
179+
<DefineConstants>$(DefineConstants);FX_NO_WEB_CLIENT</DefineConstants>
180+
<DefineConstants>$(DefineConstants);FX_NO_CONVERTER</DefineConstants>
181+
<DefineConstants>$(DefineConstants);FX_NO_ICLONEABLE</DefineConstants>
182+
<DefineConstants>$(DefineConstants);FX_NO_SECURITY_PERMISSIONS</DefineConstants>
183+
<DefineConstants>$(DefineConstants);FX_NO_SYSTEM_CONSOLE</DefineConstants>
184+
<DefineConstants>$(DefineConstants);FX_NO_ARRAY_KEY_SORT</DefineConstants>
185+
<DefineConstants>$(DefineConstants);FX_NO_REFLECTION_EMIT</DefineConstants>
186+
<DefineConstants>$(DefineConstants);FX_NO_PARAMETERIZED_THREAD_START</DefineConstants>
187+
<DefineConstants>$(DefineConstants);FX_NO_REGISTERED_WAIT_HANDLES</DefineConstants>
188+
<DefineConstants>$(DefineConstants);FX_ATLEAST_LINQ</DefineConstants>
189+
<DefineConstants>$(DefineConstants);FX_NO_THREAD</DefineConstants>
190+
<DefineConstants>$(DefineConstants);FX_NO_THREADPOOL</DefineConstants>
191+
<DefineConstants>$(DefineConstants);PUT_TYPE_PROVIDERS_IN_FSCORE</DefineConstants>
192+
<DefineConstants>$(DefineConstants);FX_NO_CUSTOMATTRIBUTEDATA</DefineConstants>
193+
<DefineConstants>$(DefineConstants);FX_RESHAPED_REFLECTION</DefineConstants>
194+
<DefineConstants>$(DefineConstants);FX_NO_EXIT_CONTEXT_FLAGS</DefineConstants>
195+
<DefineConstants>$(DefineConstants);FX_EVENTWAITHANDLE_NO_IDISPOSABLE</DefineConstants>
196+
<TargetingNetCorePortable>true</TargetingNetCorePortable>
197+
<TargetFrameworkProfile>Profile7</TargetFrameworkProfile>
198+
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
199+
</PropertyGroup>
161200

162201
<!-- Target Portable-->
163202
<PropertyGroupCondition="'$(TargetFramework)'=='netcore78'">
@@ -552,7 +591,7 @@
552591
</PropertyGroup>
553592

554593
<Choose>
555-
<WhenCondition="'$(TargetFramework)'=='portable47'">
594+
<WhenCondition="'$(TargetFramework)'=='portable47' OR '$(TargetFramework)'=='portable7'">
556595
<PropertyGroup>
557596
<FSharpTargetsPath>..\Proto\$(protoCLIDir)\bin\Microsoft.Portable.FSharp-proto.Targets</FSharpTargetsPath>
558597
</PropertyGroup>
@@ -623,12 +662,13 @@
623662
Text="Configuration '$(Configuration)' is not one of the supported configurations: Debug, Release, Proto"
624663
Condition="'$(Configuration)'!='Release' and '$(Configuration)'!='Debug' and '$(Configuration)'!='Proto'"/>
625664
<Error
626-
Text="TargetFramework '$(TargetFramework)' is not one of the supported configurations: 'empty', net20, net40, sl3-wp, sl5, sl5-compiler, portable47, netcore78, netcore259"
665+
Text="TargetFramework '$(TargetFramework)' is not one of the supported configurations: 'empty', net20, net40, sl3-wp, sl5, sl5-compiler, portable47,portable7,netcore78, netcore259"
627666
Condition="! ('$(TargetFramework)' == 'net40' or
628667
'$(TargetFramework)' == 'net20' or
629668
'$(TargetFramework)' == 'sl5' or
630669
'$(TargetFramework)' == 'sl3-wp' or
631670
'$(TargetFramework)' == 'portable47' or
671+
'$(TargetFramework)' == 'portable7' or
632672
'$(TargetFramework)' == 'netcore78' or
633673
'$(TargetFramework)' == 'netcore259')"/>
634674
<Error

‎src/fsharp/FSharp.Core/FSharp.Core.fsproj‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
<OtherFlags>$(OtherFlags) --warnon:1182 --compiling-fslib --optimize --maxerrors:20 --extraoptimizationloops:1 </OtherFlags>
2020
<OtherFlagsCondition=" '$(TargetFramework)'=='net20'">$(OtherFlags) --compiling-fslib-20:"$(SystemRoot)\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll" </OtherFlags>
2121
<OtherFlagsCondition=" '$(TargetFramework)'=='net40'">$(OtherFlags) --compiling-fslib-40</OtherFlags>
22+
<OtherFlagsCondition=" '$(TargetFramework)'=='portable7'">$(OtherFlags) --targetprofile:netcore</OtherFlags>
2223
</PropertyGroup>
2324

2425

@@ -195,7 +196,7 @@
195196
<Link>assemblyinfo.FSharp.Core.dll.fs</Link>
196197
</Compile>
197198
</ItemGroup>
198-
<ItemGroup>
199+
<ItemGroupCondition="'$(TargetFramework)' != 'portable7'">
199200
<ReferenceInclude="mscorlib" />
200201
<ReferenceInclude="System" />
201202
<ReferenceInclude="System.Numerics"Condition="'$(TargetFramework)' == 'net40'" />

‎tests/RunTests.cmd‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,17 +94,20 @@ REM == VS-installed paths to FSharp.Core.dll
9494
setFSCOREDLLPATH=%X86_PROGRAMFILES%\Reference Assemblies\Microsoft\FSharp\.NETFramework\v4.0\4.3.1.0
9595
setFSCOREDLL20PATH=%X86_PROGRAMFILES%\Reference Assemblies\Microsoft\FSharp\.NETFramework\v2.0\2.3.0.0
9696
setFSCOREDLLPORTABLEPATH=%X86_PROGRAMFILES%\Reference Assemblies\Microsoft\FSharp\.NETPortable\2.3.5.1
97+
setFSCOREDLLNETCOREPATH=%X86_PROGRAMFILES%\Reference Assemblies\Microsoft\FSharp\.NETCore\3.3.1.0
9798
setFSDATATPPATH=%X86_PROGRAMFILES%\Reference Assemblies\Microsoft\FSharp\.NETFramework\v4.0\4.3.0.0\Type Providers
9899

99100
REM == open source logic
100101
ifexist"%FSCBinPath%\FSharp.Core.dll"setFSCOREDLLPATH=%FSCBinPath%
101102
ifexist"%FSCBinPath%\..\..\net20\bin\FSharp.Core.dll"setFSCOREDLL20PATH=%FSCBinPath%\..\..\net20\bin
102103
ifexist"%FSCBinPath%\..\..\portable47\bin\FSharp.Core.dll"setFSCOREDLLPORTABLEPATH=%FSCBinPath%\..\..\portable47\bin
104+
ifexist"%FSCBinPath%\..\..\portable7\bin\FSharp.Core.dll"setFSCOREDLLNETCOREPATH=%FSCBinPath%\..\..\portable7\bin
103105
ifexist"%FSCBinPath%\FSharp.Data.TypeProviders.dll"setFSDATATPPATH=%FSCBinPath%
104106

105107
setFSCOREDLLPATH=%FSCOREDLLPATH%\FSharp.Core.dll
106108
setFSCOREDLL20PATH=%FSCOREDLL20PATH%\FSharp.Core.dll
107109
setFSCOREDLLPORTABLEPATH=%FSCOREDLLPORTABLEPATH%\FSharp.Core.dll
110+
setFSCOREDLLNETCOREPATH=%FSCOREDLLNETCOREPATH%\FSharp.Core.dll
108111
setFSDATATPPATH=%FSDATATPPATH%\FSharp.Data.TypeProviders.dll
109112

110113
for /d%%iin (%WINDIR%\Microsoft.NET\Framework\v4.0.?????)dosetCORDIR=%%i

‎tests/config.bat‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,8 @@ echo fsc_flags =%fsc_flags%
207207
echo FSCBinPath =%FSCBinPath%
208208
echo FSCOREDLL20PATH =%FSCOREDLL20PATH%
209209
echo FSCOREDLLPATH =%FSCOREDLLPATH%
210-
echo FSCOREDLLPORTABLEPATH =%FSCOREDLLPATH%
210+
echo FSCOREDLLPORTABLEPATH =%FSCOREDLLPORTABLEPATH%
211+
echo FSCOREDLLNETCOREPATH =%FSCOREDLLNETCOREPATH%
211212
echo FSDATATPPATH =%FSDATATPPATH%
212213
echo FSDIFF =%FSDIFF%
213214
echo FSI =%FSI%
@@ -257,15 +258,18 @@ REM == Default VS install locations
257258
setFSCOREDLLPATH=%X86_PROGRAMFILES%\Reference Assemblies\Microsoft\FSharp\.NETFramework\v4.0\4.3.1.0
258259
setFSCOREDLL20PATH=%X86_PROGRAMFILES%\Reference Assemblies\Microsoft\FSharp\.NETFramework\v2.0\2.3.0.0
259260
setFSCOREDLLPORTABLEPATH=%X86_PROGRAMFILES%\Reference Assemblies\Microsoft\FSharp\.NETPortable\2.3.5.1
261+
setFSCOREDLLNETCOREPATH=%X86_PROGRAMFILES%\Reference Assemblies\Microsoft\FSharp\.NETCore\3.3.1.0
260262
setFSDATATPPATH=%X86_PROGRAMFILES%\Reference Assemblies\Microsoft\FSharp\.NETFramework\v4.0\4.3.0.0\Type Providers
261263

262264
REM == Check if using open build instead
263265
IFEXIST"%FSCBinPath%\FSharp.Core.dll"setFSCOREDLLPATH=%FSCBinPath%
264266
IFEXIST"%FSCBinPath%\..\..\net20\bin\FSharp.Core.dll"setFSCOREDLL20PATH=%FSCBinPath%\..\..\net20\bin
265267
IFEXIST"%FSCBinPath%\..\..\portable47\bin\FSharp.Core.dll"setFSCOREDLLPORTABLEPATH=%FSCBinPath%\..\..\portable47\bin
268+
IFEXIST"%FSCBinPath%\..\..\portable7\bin\FSharp.Core.dll"setFSCOREDLLNETCOREPATH=%FSCBinPath%\..\..\portable7\bin
266269
IFEXIST"%FSCBinPath%\FSharp.Data.TypeProviders.dll"setFSDATATPPATH=%FSCBinPath%
267270

268271
setFSCOREDLLPATH=%FSCOREDLLPATH%\FSharp.Core.dll
269272
setFSCOREDLL20PATH=%FSCOREDLL20PATH%\FSharp.Core.dll
270273
setFSCOREDLLPORTABLEPATH=%FSCOREDLLPORTABLEPATH%\FSharp.Core.dll
274+
setFSCOREDLLNETCOREPATH=%FSCOREDLLNETCOREPATH%\FSharp.Core.dll
271275
setFSDATATPPATH=%FSDATATPPATH%\FSharp.Data.TypeProviders.dll

‎tests/fsharp/core/netcore/ConsoleApplication1/portabletestentry.csproj‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@
3636
<WarningLevel>4</WarningLevel>
3737
</PropertyGroup>
3838
<ItemGroup>
39-
<ReferenceInclude="FSharp.Core, Version=3.3.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
39+
<ReferenceInclude="FSharp.Core">
4040
<SpecificVersion>False</SpecificVersion>
41-
<HintPath>$(MSBuildProgramFiles32)\Reference Assemblies\Microsoft\FSharp\.NETCore\3.3.1.0\FSharp.Core.dll</HintPath>
41+
<HintPath>$(FSCOREDLLNETCOREPATH)</HintPath>
4242
</Reference>
4343
<ReferenceInclude="System" />
4444
<ReferenceInclude="System.Core" />

‎tests/fsharp/core/netcore/netcoreautomationhelperlibrary/netcoreautomationhelperlibrary.fsproj‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,9 @@
3939
</PropertyGroup>
4040
<PropertyGroup>
4141
<MinimumVisualStudioVersionCondition="'$(MinimumVisualStudioVersion)' == ''">11</MinimumVisualStudioVersion>
42+
<FscToolPath>$(FSCBINPATH)</FscToolPath>
4243
</PropertyGroup>
43-
<ImportProject="$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.1\Framework\v4.0\Microsoft.Portable.FSharp.Targets" />
44+
<ImportProject="$(FSCBINPATH)\Microsoft.Portable.FSharp.Targets" />
4445
<ItemGroup>
4546
<CompileInclude="Hooks.fs" />
4647
<CompileInclude="Extensions.fs" />
@@ -53,7 +54,7 @@
5354
<ReferenceInclude="FSharp.Core">
5455
<Name>FSharp.Core</Name>
5556
<AssemblyName>FSharp.Core.dll</AssemblyName>
56-
<HintPath>$(MSBuildExtensionsPath32)\..\Reference Assemblies\Microsoft\FSharp\.NETCore\3.3.1.0\FSharp.Core.dll</HintPath>
57+
<HintPath>$(FSCOREDLLNETCOREPATH)</HintPath>
5758
</Reference>
5859
</ItemGroup>
5960
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.

‎tests/fsharp/core/netcore/netcorelibrary1/netcoretestinglibrary.fsproj‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
<ReferenceInclude="FSharp.Core">
4242
<Name>FSharp.Core</Name>
4343
<AssemblyName>FSharp.Core.dll</AssemblyName>
44-
<HintPath>$(MSBuildExtensionsPath32)\..\Reference Assemblies\Microsoft\FSharp\.NETCore\3.3.1.0\FSharp.Core.dll</HintPath>
44+
<HintPath>$(FSCOREDLLNETCOREPATH)</HintPath>
4545
</Reference>
4646
</ItemGroup>
4747
<ItemGroup>
@@ -158,8 +158,9 @@
158158
</ItemGroup>
159159
<PropertyGroup>
160160
<MinimumVisualStudioVersionCondition="'$(MinimumVisualStudioVersion)' == ''">11</MinimumVisualStudioVersion>
161+
<FscToolPath>$(FSCBINPATH)</FscToolPath>
161162
</PropertyGroup>
162-
<ImportProject="$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.1\Framework\v4.0\Microsoft.Portable.FSharp.Targets" />
163+
<ImportProject="$(FSCBinPath)\Microsoft.Portable.FSharp.Targets" />
163164
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
164165
Other similar extension points exist, see Microsoft.Common.targets.
165166
<Target Name="BeforeBuild">

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp