Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Commit

Permalink
Merge branch 'master' into FXCIUnix
Browse files Browse the repository at this point in the history
  • Loading branch information
A-And authored Jul 9, 2018
2 parents da2f8bc + 7baedfd commit 2826e91
Show file tree
Hide file tree
Showing 80 changed files with 1,732 additions and 1,075 deletions.
17 changes: 14 additions & 3 deletions Documentation/building/linux-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,18 @@ In order to get clang-3.9, llvm-3.9 and lldb-3.9 on Ubuntu 14.04, we need to add
~$ wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key | sudo apt-key add -
~$ sudo apt-get update

Note: ARM clang has a known issue with CompareExchange ([#15074](https://github.com/dotnet/coreclr/issues/15074)), so for ARM you must use clang-4.0 or higher. The official build uses clang-5.0.
Note: ARM clang has a known issue with CompareExchange
([#15074](https://github.com/dotnet/coreclr/issues/15074)), so for ARM you must
use clang-4.0 or higher. Moreover, when building with clang-5.0, the
following errors occur:

```
coreclr/src/debug/inc/arm/primitives.h:66:1: error: __declspec attribute 'selectany' is
not supported [-Werror,-Wignored-attributes]
```

This is fixed in clang-5.0.2, which can be installed from the apt
repository listed below.

For other version of Debian/Ubuntu, please visit http://apt.llvm.org/.

Expand Down Expand Up @@ -121,9 +132,9 @@ The current Docker tag being used by the CI can be found in the `getDockerImageN

Libunwind issue
---------------
Libunwind-arm requires fixes that are not included in Ubuntu 14.04, yet. The fix allows libunwind-arm not to break when it is ordered to access unaccessible memory locations.
ARM libunwind versions before 1.3 require a fix. The fix allows libunwind not to break when it is ordered to access unaccessible memory locations. See [this](https://github.com/dotnet/coreclr/pull/3923) issue for history.

First, import the patch from the libunwind upstream: http://git.savannah.gnu.org/gitweb/?p=libunwind.git;a=commit;h=770152268807e460184b4152e23aba9c86601090
If required, first import the patch from the libunwind upstream: http://git.savannah.gnu.org/gitweb/?p=libunwind.git;a=commit;h=770152268807e460184b4152e23aba9c86601090.

Then, expand the coverage of the upstream patch by:

Expand Down
2 changes: 1 addition & 1 deletion ILAsmVersion.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.0-preview1-26703-04
3.0.0-preview1-26704-01
1 change: 1 addition & 0 deletions build-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,7 @@ usage()
echo "verbose - optional argument to enable verbose build output."
echo "rebuild - if tests have already been built - rebuild them"
echo "generatelayoutonly - only pull down dependencies and build coreroot"
echo "generatetesthostonly - only pull down dependencies and build coreroot and the CoreFX testhost"
echo "buildagainstpackages - pull down and build using packages."
echo "runtests - run tests after building them"
echo "ziptests - zips CoreCLR tests & Core_Root for a Helix run"
Expand Down
10 changes: 5 additions & 5 deletions dependencies.props
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,18 @@

<!-- Source of truth for dependency tooling: the commit hash of the dotnet/versions master branch as of the last auto-upgrade. -->
<PropertyGroup>
<CoreFxCurrentRef>70c44f38436f4ae4734e792e06cefba1e412f9fc</CoreFxCurrentRef>
<CoreClrCurrentRef>d8a64e527e67cae4bb3c9d93379fd43aa317165b</CoreClrCurrentRef>
<CoreFxCurrentRef>8c9a65325fc401a27c76a23299d7501ff24f4dd8</CoreFxCurrentRef>
<CoreClrCurrentRef>8c9a65325fc401a27c76a23299d7501ff24f4dd8</CoreClrCurrentRef>
<BuildToolsCurrentRef>3b2844e866d3898d43d98aad0e3e57dd5675d259</BuildToolsCurrentRef>
<PgoDataCurrentRef>d8a64e527e67cae4bb3c9d93379fd43aa317165b</PgoDataCurrentRef>
</PropertyGroup>

<!-- Tests/infrastructure dependency versions. -->
<PropertyGroup>
<MicrosoftPrivateCoreFxNETCoreAppPackageVersion>4.6.0-preview1-26628-03</MicrosoftPrivateCoreFxNETCoreAppPackageVersion>
<MicrosoftNETCorePlatformsPackageVersion>3.0.0-preview1-26628-03</MicrosoftNETCorePlatformsPackageVersion>
<MicrosoftPrivateCoreFxNETCoreAppPackageVersion>4.6.0-preview1-26704-01</MicrosoftPrivateCoreFxNETCoreAppPackageVersion>
<MicrosoftNETCorePlatformsPackageVersion>3.0.0-preview1-26704-01</MicrosoftNETCorePlatformsPackageVersion>
<PgoDataPackageVersion>99.99.99-master-20180703-0030</PgoDataPackageVersion>
<MicrosoftNETCoreRuntimeCoreCLRPackageVersion>3.0.0-preview1-26703-04</MicrosoftNETCoreRuntimeCoreCLRPackageVersion>
<MicrosoftNETCoreRuntimeCoreCLRPackageVersion>3.0.0-preview1-26704-01</MicrosoftNETCoreRuntimeCoreCLRPackageVersion>
<XunitPackageVersion>2.2.0-beta2-build3300</XunitPackageVersion>
<XunitConsoleNetcorePackageVersion>2.2.0-preview1-02830-02</XunitConsoleNetcorePackageVersion>
<XunitPerformanceApiPackageVersion>1.0.0-beta-build0015</XunitPerformanceApiPackageVersion>
Expand Down
157 changes: 76 additions & 81 deletions netci.groovy

Large diffs are not rendered by default.

5 changes: 1 addition & 4 deletions src/System.Private.CoreLib/Resources/Strings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@
<value>Delegate to an instance method cannot have null 'this'.</value>
</data>
<data name="Arg_DlgtTargMeth" xml:space="preserve">
<value>Cannot bind to the target method because its signature or security transparency is not compatible with that of the delegate type.</value>
<value>Cannot bind to the target method because its signature is not compatible with that of the delegate type.</value>
</data>
<data name="Arg_DlgtTypeMis" xml:space="preserve">
<value>Delegates must be of the same type.</value>
Expand Down Expand Up @@ -2524,9 +2524,6 @@
<data name="InvalidOperation_ConstructorNotAllowedOnInterface" xml:space="preserve">
<value>Interface cannot have constructors.</value>
</data>
<data name="InvalidOperation_CriticalTransparentAreMutuallyExclusive" xml:space="preserve">
<value>SecurityTransparent and SecurityCritical attributes cannot be applied to the assembly scope at the same time.</value>
</data>
<data name="InvalidOperation_DateTimeParsing" xml:space="preserve">
<value>Internal Error in DateTime and Calendar operations.</value>
</data>
Expand Down
3 changes: 0 additions & 3 deletions src/System.Private.CoreLib/System.Private.CoreLib.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,6 @@
<Compile Include="$(BclSourcesRoot)\System\Threading\WaitHandle.cs" />
<Compile Include="$(BclSourcesRoot)\System\Threading\SpinLock.cs" />
<Compile Include="$(BclSourcesRoot)\System\Threading\ThreadLocal.cs" />
<Compile Include="$(BclSourcesRoot)\System\Threading\ManualResetEventSlim.cs" />
<Compile Include="$(BclSourcesRoot)\System\Threading\CancellationTokenRegistration.cs" />
<Compile Include="$(BclSourcesRoot)\System\Threading\CancellationTokenSource.cs" />
<Compile Include="$(BclSourcesRoot)\System\Threading\Tasks\future.cs" />
Expand Down Expand Up @@ -534,8 +533,6 @@
<!-- These files are shared with other framework components and don't live the same folder as the rest of them-->
<Compile Include="$(CommonPath)\NotImplemented.cs" />
<Compile Include="$(CommonPath)\System\SR.cs" />
<!-- Include Internals visible to file in the compilation -->
<Compile Include="$(BclSourcesRoot)\mscorlib.Friends.cs" Condition="'$(FeatureCominterop)' == 'true'" />
</ItemGroup>
<ItemGroup>
<Compile Include="src\System\Runtime\RuntimeImports.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,11 @@ internal static partial class Globalization
[DllImport(Libraries.GlobalizationNative, CharSet = CharSet.Unicode, EntryPoint = "GlobalizationNative_CompareString")]
internal static extern unsafe int CompareString(SafeSortHandle sortHandle, char* lpStr1, int cwStr1Len, char* lpStr2, int cwStr2Len, CompareOptions options);

[DllImport(Libraries.GlobalizationNative, CharSet = CharSet.Unicode, EntryPoint = "GlobalizationNative_IndexOf")]
internal static extern unsafe int IndexOf(SafeSortHandle sortHandle, string target, int cwTargetLength, char* pSource, int cwSourceLength, CompareOptions options, int* matchLengthPtr);
[DllImport(Libraries.GlobalizationNative, CharSet = CharSet.Unicode, EntryPoint = "GlobalizationNative_IndexOf")]
internal static extern unsafe int IndexOf(SafeSortHandle sortHandle, char* target, int cwTargetLength, char* pSource, int cwSourceLength, CompareOptions options, int* matchLengthPtr);

[DllImport(Libraries.GlobalizationNative, CharSet = CharSet.Unicode, EntryPoint = "GlobalizationNative_LastIndexOf")]
internal static extern unsafe int LastIndexOf(SafeSortHandle sortHandle, string target, int cwTargetLength, char* pSource, int cwSourceLength, CompareOptions options);
internal static extern unsafe int LastIndexOf(SafeSortHandle sortHandle, char* target, int cwTargetLength, char* pSource, int cwSourceLength, CompareOptions options);

[DllImport(Libraries.GlobalizationNative, CharSet = CharSet.Unicode, EntryPoint = "GlobalizationNative_IndexOfOrdinalIgnoreCase")]
internal static extern unsafe int IndexOfOrdinalIgnoreCase(string target, int cwTargetLength, char* pSource, int cwSourceLength, bool findLast);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -591,6 +591,7 @@
<Compile Include="$(MSBuildThisFileDirectory)System\Threading\LazyThreadSafetyMode.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Threading\LockRecursionException.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Threading\ManualResetEvent.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Threading\ManualResetEventSlim.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Threading\Mutex.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Threading\NativeOverlapped.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Threading\ParameterizedThreadStart.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ internal static unsafe int InvariantIndexOf(string source, string value, int sta
fixed (char* pSource = source) fixed (char* pValue = value)
{
char* pSrc = &pSource[startIndex];
int index = InvariantFindString(pSrc, count, pValue, value.Length, ignoreCase, start : true);
int index = InvariantFindString(pSrc, count, pValue, value.Length, ignoreCase, fromBeginning : true);
if (index >= 0)
{
return index + startIndex;
Expand All @@ -27,15 +27,15 @@ internal static unsafe int InvariantIndexOf(string source, string value, int sta
}
}

internal static unsafe int InvariantIndexOf(ReadOnlySpan<char> source, ReadOnlySpan<char> value, bool ignoreCase)
internal static unsafe int InvariantIndexOf(ReadOnlySpan<char> source, ReadOnlySpan<char> value, bool ignoreCase, bool fromBeginning = true)
{
Debug.Assert(source.Length != 0);
Debug.Assert(value.Length != 0);

fixed (char* pSource = &MemoryMarshal.GetReference(source))
fixed (char* pValue = &MemoryMarshal.GetReference(value))
{
return InvariantFindString(pSource, source.Length, pValue, value.Length, ignoreCase, start: true);
return InvariantFindString(pSource, source.Length, pValue, value.Length, ignoreCase, fromBeginning);
}
}

Expand All @@ -48,7 +48,7 @@ internal static unsafe int InvariantLastIndexOf(string source, string value, int
fixed (char* pSource = source) fixed (char* pValue = value)
{
char* pSrc = &pSource[startIndex - count + 1];
int index = InvariantFindString(pSrc, count, pValue, value.Length, ignoreCase, start : false);
int index = InvariantFindString(pSrc, count, pValue, value.Length, ignoreCase, fromBeginning : false);
if (index >= 0)
{
return index + startIndex - count + 1;
Expand All @@ -57,7 +57,7 @@ internal static unsafe int InvariantLastIndexOf(string source, string value, int
}
}

private static unsafe int InvariantFindString(char* source, int sourceCount, char* value, int valueCount, bool ignoreCase, bool start)
private static unsafe int InvariantFindString(char* source, int sourceCount, char* value, int valueCount, bool ignoreCase, bool fromBeginning)
{
int ctrSource = 0; // index value into source
int ctrValue = 0; // index value into value
Expand All @@ -72,15 +72,15 @@ private static unsafe int InvariantFindString(char* source, int sourceCount, cha

if (valueCount == 0)
{
return start ? 0 : sourceCount - 1;
return fromBeginning ? 0 : sourceCount - 1;
}

if (sourceCount < valueCount)
{
return -1;
}

if (start)
if (fromBeginning)
{
lastSourceStart = sourceCount - valueCount;
if (ignoreCase)
Expand Down
Loading

0 comments on commit 2826e91

Please sign in to comment.