From: Rew Date: Mon, 10 Apr 2017 20:06:49 +0000 (-0400) Subject: CoreLib Build System portability updates (dotnet/coreclr#10839) X-Git-Tag: submit/tizen/20210909.063632~11030^2~7327 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9e037d996c7f4f61676a18bfe4adb782a5203cf6;p=platform%2Fupstream%2Fdotnet%2Fruntime.git CoreLib Build System portability updates (dotnet/coreclr#10839) Updates to corelib project file for target specific includes. Intended to ease maintainability of existing targets and clarify necessary work for new targets. Commit migrated from https://github.com/dotnet/coreclr/commit/80423b67b16f563bbcb281f996c7b5cdee96093a --- diff --git a/src/coreclr/clr.coreclr.props b/src/coreclr/clr.coreclr.props index 53c66e2..5251eab 100644 --- a/src/coreclr/clr.coreclr.props +++ b/src/coreclr/clr.coreclr.props @@ -81,7 +81,7 @@ true - + true true true diff --git a/src/coreclr/clr.defines.targets b/src/coreclr/clr.defines.targets index 6edd968..2f97c8d 100644 --- a/src/coreclr/clr.defines.targets +++ b/src/coreclr/clr.defines.targets @@ -36,5 +36,6 @@ $(DefineConstants);FEATURE_SYMDIFF $(DefineConstants);PLATFORM_UNIX + $(DefineConstants);PLATFORM_WINDOWS diff --git a/src/coreclr/src/mscorlib/System.Private.CoreLib.csproj b/src/coreclr/src/mscorlib/System.Private.CoreLib.csproj index 5f55547..76027f8 100644 --- a/src/coreclr/src/mscorlib/System.Private.CoreLib.csproj +++ b/src/coreclr/src/mscorlib/System.Private.CoreLib.csproj @@ -382,12 +382,6 @@ - - - - - - @@ -498,35 +492,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -602,13 +567,10 @@ - - - @@ -620,8 +582,6 @@ - - @@ -664,7 +624,6 @@ - @@ -683,7 +642,6 @@ - @@ -734,10 +692,44 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/coreclr/src/mscorlib/shared/System.Private.CoreLib.Shared.projitems b/src/coreclr/src/mscorlib/shared/System.Private.CoreLib.Shared.projitems index 2383960..01ad69f 100644 --- a/src/coreclr/src/mscorlib/shared/System.Private.CoreLib.Shared.projitems +++ b/src/coreclr/src/mscorlib/shared/System.Private.CoreLib.Shared.projitems @@ -13,75 +13,6 @@ false false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -436,34 +367,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -505,4 +408,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/coreclr/src/mscorlib/shared/System/Diagnostics/Tracing/EventSource.cs b/src/coreclr/src/mscorlib/shared/System/Diagnostics/Tracing/EventSource.cs index 53aaae1..cf4901d 100644 --- a/src/coreclr/src/mscorlib/shared/System/Diagnostics/Tracing/EventSource.cs +++ b/src/coreclr/src/mscorlib/shared/System/Diagnostics/Tracing/EventSource.cs @@ -4,7 +4,7 @@ // This program uses code hyperlinks available as part of the HyperAddin Visual Studio plug-in. // It is available from http://www.codeplex.com/hyperAddin -#if !PLATFORM_UNIX +#if PLATFORM_WINDOWS #define FEATURE_MANAGED_ETW @@ -12,7 +12,7 @@ #define FEATURE_ACTIVITYSAMPLING #endif // !ES_BUILD_STANDALONE -#endif // !PLATFORM_UNIX +#endif // PLATFORM_WINDOWS #if ES_BUILD_STANDALONE #define FEATURE_MANAGED_ETW_CHANNELS diff --git a/src/coreclr/src/mscorlib/shared/System/Diagnostics/Tracing/TraceLogging/TraceLoggingEventSource.cs b/src/coreclr/src/mscorlib/shared/System/Diagnostics/Tracing/TraceLogging/TraceLoggingEventSource.cs index 8c875fc..e733399 100644 --- a/src/coreclr/src/mscorlib/shared/System/Diagnostics/Tracing/TraceLogging/TraceLoggingEventSource.cs +++ b/src/coreclr/src/mscorlib/shared/System/Diagnostics/Tracing/TraceLogging/TraceLoggingEventSource.cs @@ -5,13 +5,13 @@ // This program uses code hyperlinks available as part of the HyperAddin Visual Studio plug-in. // It is available from http://www.codeplex.com/hyperAddin -#if !PLATFORM_UNIX +#if PLATFORM_WINDOWS #define FEATURE_MANAGED_ETW #if !ES_BUILD_STANDALONE #define FEATURE_ACTIVITYSAMPLING #endif -#endif // PLATFORM_UNIX +#endif // PLATFORM_WINDOWS #if ES_BUILD_STANDALONE #define FEATURE_MANAGED_ETW_CHANNELS diff --git a/src/coreclr/src/mscorlib/src/System/Environment.cs b/src/coreclr/src/mscorlib/src/System/Environment.cs index b981601..b9070ae 100644 --- a/src/coreclr/src/mscorlib/src/System/Environment.cs +++ b/src/coreclr/src/mscorlib/src/System/Environment.cs @@ -334,11 +334,11 @@ namespace System get { Contract.Ensures(Contract.Result() != null); -#if !PLATFORM_UNIX +#if PLATFORM_WINDOWS return "\r\n"; #else return "\n"; -#endif // !PLATFORM_UNIX +#endif // PLATFORM_WINDOWS } } diff --git a/src/coreclr/src/mscorlib/src/System/IO/Directory.cs b/src/coreclr/src/mscorlib/src/System/IO/Directory.cs index c472cdf..6417207 100644 --- a/src/coreclr/src/mscorlib/src/System/IO/Directory.cs +++ b/src/coreclr/src/mscorlib/src/System/IO/Directory.cs @@ -117,10 +117,10 @@ namespace System.IO buffer.Length = (int)result; -#if !PLATFORM_UNIX +#if PLATFORM_WINDOWS if (buffer.Contains('~')) return Path.GetFullPath(buffer.ToString()); -#endif +#endif // PLATFORM_WINDOWS return buffer.ToString(); } diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/RuntimeAssembly.cs b/src/coreclr/src/mscorlib/src/System/Reflection/RuntimeAssembly.cs index 1cca9e1..4632525 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/RuntimeAssembly.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/RuntimeAssembly.cs @@ -657,7 +657,7 @@ namespace System.Reflection ((codebase[j + 1] == '/') || (codebase[j + 1] == '\\')) && ((codebase[j + 2] == '/') || (codebase[j + 2] == '\\'))) return codebase; -#if !PLATFORM_UNIX +#if PLATFORM_WINDOWS else if ((len > 2) && (codebase[0] == '\\') && (codebase[1] == '\\')) return "file://" + codebase; else @@ -665,7 +665,7 @@ namespace System.Reflection #else else return "file://" + Path.GetFullPath(codebase); -#endif // !PLATFORM_UNIX +#endif // PLATFORM_WINDOWS } internal Stream GetManifestResourceStream( diff --git a/src/coreclr/src/mscorlib/src/System/Threading/Mutex.cs b/src/coreclr/src/mscorlib/src/System/Threading/Mutex.cs index 5e77e35..454a323 100644 --- a/src/coreclr/src/mscorlib/src/System/Threading/Mutex.cs +++ b/src/coreclr/src/mscorlib/src/System/Threading/Mutex.cs @@ -47,12 +47,12 @@ namespace System.Threading // Empty name is treated as an unnamed mutex. Set to null, and we will check for null from now on. name = null; } -#if !PLATFORM_UNIX +#if PLATFORM_WINDOWS if (name != null && System.IO.Path.MaxPath < name.Length) { throw new ArgumentException(SR.Format(SR.Argument_WaitHandleNameTooLong, Path.MaxPath), nameof(name)); } -#endif +#endif // PLATFORM_WINDOWS Contract.EndContractBlock(); Win32Native.SECURITY_ATTRIBUTES secAttrs = null; diff --git a/src/coreclr/src/mscorlib/src/System/Threading/WaitHandle.cs b/src/coreclr/src/mscorlib/src/System/Threading/WaitHandle.cs index 97b9ff2..f3412d2 100644 --- a/src/coreclr/src/mscorlib/src/System/Threading/WaitHandle.cs +++ b/src/coreclr/src/mscorlib/src/System/Threading/WaitHandle.cs @@ -437,11 +437,11 @@ namespace System.Threading == SignalAndWait == ==================================================*/ -#if !PLATFORM_UNIX +#if PLATFORM_WINDOWS [MethodImplAttribute(MethodImplOptions.InternalCall)] private static extern int SignalAndWaitOne(SafeWaitHandle waitHandleToSignal, SafeWaitHandle waitHandleToWaitOn, int millisecondsTimeout, bool hasThreadAffinity, bool exitContext); -#endif // !PLATFORM_UNIX +#endif // PLATFORM_WINDOWS public static bool SignalAndWait( WaitHandle toSignal,