Skip to content

Commit

Permalink
Remove the src/mono/netcore directory, move its contents to src/mono. (
Browse files Browse the repository at this point in the history
…dotnet#47847)

* Remove the src/mono/netcore directory, move its contents to src/mono.

* Fix docs and make targets.

* Remove the netcore dir itself.

* Fix samples.
  • Loading branch information
vargaz authored Feb 4, 2021
1 parent e7e7dd1 commit 382de3d
Show file tree
Hide file tree
Showing 210 changed files with 38 additions and 54 deletions.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@
<PropertyGroup>
<CoreLibSharedDir>$([MSBuild]::NormalizeDirectory('$(LibrariesProjectRoot)', 'System.Private.CoreLib', 'src'))</CoreLibSharedDir>
<CoreLibProject Condition="'$(RuntimeFlavor)' == 'CoreCLR'">$([MSBuild]::NormalizePath('$(CoreClrProjectRoot)', 'System.Private.CoreLib', 'System.Private.CoreLib.csproj'))</CoreLibProject>
<CoreLibProject Condition="'$(RuntimeFlavor)' == 'Mono'">$([MSBuild]::NormalizePath('$(MonoProjectRoot)', 'netcore', 'System.Private.CoreLib', 'System.Private.CoreLib.csproj'))</CoreLibProject>
<CoreLibProject Condition="'$(RuntimeFlavor)' == 'Mono'">$([MSBuild]::NormalizePath('$(MonoProjectRoot)', 'System.Private.CoreLib', 'System.Private.CoreLib.csproj'))</CoreLibProject>
</PropertyGroup>

<!-- Packaging -->
Expand Down
2 changes: 1 addition & 1 deletion docs/workflow/building/mono/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ The following packages will be created under `artifacts\packages\<configuration>

## To get started with "Hello World"

Try the sample at `src/mono/netcore/sample/HelloWorld`.
Try the sample at `src/mono/sample/HelloWorld`.
To run this sample, from the above folder
```cd ../..
make run-sample
Expand Down
4 changes: 2 additions & 2 deletions docs/workflow/testing/mono/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Build and run library tests against Mono JIT or interpreter
```
$(REPO_ROOT)/dotnet.sh build /t:Test /p:RuntimeFlavor=mono /p:Configuration=<Release/Debug> $(REPO_ROOT)/src/libraries/<library>/tests
```
Alternatively, you could execute the following command from `$(REPO_ROOT)/src/mono/netcore`
Alternatively, you could execute the following command from `$(REPO_ROOT)/src/mono`
```
make run-tests-corefx-<library>
```
Expand All @@ -76,7 +76,7 @@ make run-tests-corefx-System.Runtime
Build and run library tests against Webassembly, Android or iOS. See instructions located in [Library testing document folder](../libraries/)

# Running the Mono samples
There are a few convenient samples located in `$(REPO_ROOT)/src/mono/netcore/sample`, which could help you test your program easily with different flavors of Mono or do a sanity check on the build. The samples are set up to work with a specific configuration; please refer to the relevant Makefile for specifics. If you would like to work with a different configuration, you can edit the Makefile.
There are a few convenient samples located in `$(REPO_ROOT)/src/mono/sample`, which could help you test your program easily with different flavors of Mono or do a sanity check on the build. The samples are set up to work with a specific configuration; please refer to the relevant Makefile for specifics. If you would like to work with a different configuration, you can edit the Makefile.

## Desktop Mono
To run the desktop Mono sample, cd to `HelloWorld` and execute:
Expand Down
4 changes: 2 additions & 2 deletions eng/Subsets.props
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@
</ItemGroup>

<ItemGroup Condition="$(_subset.Contains('+mono.packages+'))">
<ProjectToBuild Include="$(MonoProjectRoot)netcore\nuget\mono-packages.proj" Category="mono" Pack="true" />
<ProjectToBuild Include="$(MonoProjectRoot)nuget\mono-packages.proj" Category="mono" Pack="true" />
</ItemGroup>

<ItemGroup Condition="$(_subset.Contains('+mono.runtime+'))">
Expand All @@ -222,7 +222,7 @@
</ItemGroup>

<ItemGroup Condition="$(_subset.Contains('+mono.corelib+'))">
<ProjectToBuild Include="$(MonoProjectRoot)netcore\System.Private.CoreLib\System.Private.CoreLib.csproj" Category="mono" />
<ProjectToBuild Include="$(MonoProjectRoot)System.Private.CoreLib\System.Private.CoreLib.csproj" Category="mono" />
</ItemGroup>

<!-- Libraries sets -->
Expand Down
6 changes: 3 additions & 3 deletions src/libraries/tests.proj
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@
</ItemGroup>

<ItemGroup Condition="'$(ArchiveTests)' == 'true' and ('$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'tvOS')">
<ProjectReference Include="$(MonoProjectRoot)netcore\sample\iOS\Program.csproj"
<ProjectReference Include="$(MonoProjectRoot)sample\iOS\Program.csproj"
BuildInParallel="false" />
<!-- TODO: remove Exclude after "tests.mobile.targets(107,5): error : Unable to compile method" fixed -->
<ProjectReference Include="$(RepoRoot)\src\tests\FunctionalTests\iOS\**\*.Test.csproj"
Expand All @@ -278,14 +278,14 @@
</ItemGroup>

<ItemGroup Condition="'$(ArchiveTests)' == 'true' and '$(TargetOS)' == 'Android'">
<ProjectReference Include="$(MonoProjectRoot)netcore\sample\Android\AndroidSampleApp.csproj"
<ProjectReference Include="$(MonoProjectRoot)sample\Android\AndroidSampleApp.csproj"
BuildInParallel="false" />
<ProjectReference Include="$(RepoRoot)\src\tests\FunctionalTests\Android\**\*.Test.csproj"
BuildInParallel="false" />
</ItemGroup>

<ItemGroup Condition="'$(ArchiveTests)' == 'true' and '$(TargetOS)' == 'Browser'">
<ProjectReference Include="$(MonoProjectRoot)netcore\sample\wasm\**\*.Sample.csproj"
<ProjectReference Include="$(MonoProjectRoot)sample\wasm\**\*.Sample.csproj"
BuildInParallel="false" />
<ProjectReference Include="$(RepoRoot)\src\tests\FunctionalTests\wasm\**\*.Test.csproj"
BuildInParallel="false" />
Expand Down
20 changes: 10 additions & 10 deletions src/mono/netcore/Makefile → src/mono/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ifeq ($(wildcard ../../../.dotnet),)
ifeq ($(wildcard ../../.dotnet),)
$(info Downloading local dotnet...)
endif

Expand All @@ -9,16 +9,16 @@ CORECLR_TESTS_CONFIG=Release
MONO_RUNTIME_CONFIG=Release

# auto detect configurations for mono runtime and coreclr tests
ifeq ($(words $(wildcard ../../../artifacts/bin/mono/*.*.*)), 1)
MONO_RUNTIME_CONFIG := $(word 3,$(subst ., ,$(notdir $(wildcard ../../../artifacts/bin/mono/*.*.*))))
ifeq ($(words $(wildcard ../../artifacts/bin/mono/*.*.*)), 1)
MONO_RUNTIME_CONFIG := $(word 3,$(subst ., ,$(notdir $(wildcard ../../artifacts/bin/mono/*.*.*))))
endif

ifeq ($(words $(wildcard ../../../artifacts/tests/coreclr/*.*.*)), 1)
CORECLR_TESTS_CONFIG := $(word 3,$(subst ., ,$(notdir $(wildcard ../../../artifacts/tests/coreclr/*.*.*))))
ifeq ($(words $(wildcard ../../artifacts/tests/coreclr/*.*.*)), 1)
CORECLR_TESTS_CONFIG := $(word 3,$(subst ., ,$(notdir $(wildcard ../../artifacts/tests/coreclr/*.*.*))))
endif

ifeq ($(words $(wildcard ../../../artifacts/bin/testhost/*-*-*-*)), 1)
LIBRARIES_TESTS_CONFIG := $(word 3,$(subst -, ,$(notdir $(wildcard ../../../artifacts/bin/testhost/*-*-*-*))))
ifeq ($(words $(wildcard ../../artifacts/bin/testhost/*-*-*-*)), 1)
LIBRARIES_TESTS_CONFIG := $(word 3,$(subst -, ,$(notdir $(wildcard ../../artifacts/bin/testhost/*-*-*-*))))
endif

MONO_PROJ=/p:CoreClrTestConfig=$(CORECLR_TESTS_CONFIG) /p:LibrariesTestConfig=$(LIBRARIES_TESTS_CONFIG) /p:Configuration=$(MONO_RUNTIME_CONFIG) ../mono.proj
Expand All @@ -34,11 +34,11 @@ run-sample-coreclr:

# build System.Private.CoreLib.dll
bcl corelib:
../../.././build.sh -c $(MONO_RUNTIME_CONFIG) -subset Mono.CoreLib
../.././build.sh -c $(MONO_RUNTIME_CONFIG) -subset Mono.CoreLib

# build runtime and copy to artifacts
runtime:
../../.././build.sh -c $(MONO_RUNTIME_CONFIG) -subset Mono.Runtime
../.././build.sh -c $(MONO_RUNTIME_CONFIG) -subset Mono.Runtime

# copy mono runtime bits from artifacts to $(DST)
copy-runtime-files-to:
Expand All @@ -58,5 +58,5 @@ run-tests-coreclr-all:
# make run-tests-corefx-System.Runtime
# for `System.Runtime.Tests` (the rule builds both the lib and the test if needed)
run-tests-corefx-%:
$(DOTNET) build ../../../src/libraries/$*/tests -c $(LIBRARIES_TESTS_CONFIG) /p:RuntimeFlavor=mono /t:Test
$(DOTNET) build ../../src/libraries/$*/tests -c $(LIBRARIES_TESTS_CONFIG) /p:RuntimeFlavor=mono /t:Test

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ VisualStudioVersion = 16.0.28902.138
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "System.Private.CoreLib.csproj", "{8FBEB036-6F52-464C-8BC9-B0B5F18262A6}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "System.Private.CoreLib.Shared", "..\..\..\libraries\System.Private.CoreLib\src\System.Private.CoreLib.Shared.shproj", "{845C8B26-350B-4E63-BD11-2C8150444E28}"
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "System.Private.CoreLib.Shared", "..\..\libraries\System.Private.CoreLib\src\System.Private.CoreLib.Shared.shproj", "{845C8B26-350B-4E63-BD11-2C8150444E28}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib.Generators", "..\..\..\libraries\System.Private.CoreLib\generators\System.Private.CoreLib.Generators.csproj", "{A4CD9C83-5937-46B7-A1F2-1990F5B938E7}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib.Generators", "..\..\libraries\System.Private.CoreLib\generators\System.Private.CoreLib.Generators.csproj", "{A4CD9C83-5937-46B7-A1F2-1990F5B938E7}"
EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
..\..\..\libraries\System.Private.CoreLib\src\System.Private.CoreLib.Shared.projitems*{845c8b26-350b-4e63-bd11-2c8150444e28}*SharedItemsImports = 13
..\..\..\libraries\System.Private.CoreLib\src\System.Private.CoreLib.Shared.projitems*{8fbeb036-6f52-464c-8bc9-b0b5f18262a6}*SharedItemsImports = 5
..\..\libraries\System.Private.CoreLib\src\System.Private.CoreLib.Shared.projitems*{845c8b26-350b-4e63-bd11-2c8150444e28}*SharedItemsImports = 13
..\..\libraries\System.Private.CoreLib\src\System.Private.CoreLib.Shared.projitems*{8fbeb036-6f52-464c-8bc9-b0b5f18262a6}*SharedItemsImports = 5
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Checked|amd64 = Checked|amd64
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
16 changes: 0 additions & 16 deletions src/mono/netcore/.gitignore

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<!-- Packaging projects (.pkgproj) are non-SDK-style, so they need to directly import Directory.Build.props -->
<Import Project="..\..\Directory.Build.props" />
<Import Project="..\Directory.Build.props" />
<Import Project="$(NuGetPackageRoot)\microsoft.dotnet.build.tasks.packaging\$(MicrosoftDotNetBuildTasksPackagingVersion)\build\Microsoft.DotNet.Build.Tasks.Packaging.props" />

<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project>
<Import Project="..\..\Directory.Build.targets" />
<Import Project="..\Directory.Build.targets" />
<Import Project="$(NuGetPackageRoot)\microsoft.dotnet.build.tasks.packaging\$(MicrosoftDotNetBuildTasksPackagingVersion)\build\Microsoft.DotNet.Build.Tasks.Packaging.targets" />
</Project>
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
MONO_CONFIG=Release
MONO_ARCH=x64
DOTNET := ../../../../.././dotnet.sh
DOTNET := ../../../../dotnet.sh
USE_LLVM=true
AOT=false

all: runtimepack run

runtimepack:
../../../../.././build.sh Mono+Libs -os Android -arch $(MONO_ARCH) -c $(MONO_CONFIG)
../../../../build.sh Mono+Libs -os Android -arch $(MONO_ARCH) -c $(MONO_CONFIG)

run:
$(DOTNET) publish \
Expand All @@ -20,4 +20,4 @@ run:
/p:RunActivity=false

clean:
rm -rf ../../../../../artifacts/bin/AndroidSampleApp
rm -rf ../../../../artifacts/bin/AndroidSampleApp
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<Import Project="..\..\Directory.Build.props"/>
<Import Project="..\Directory.Build.props"/>
</Project>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
TOP=../../../../../
TOP=../../../../
DOTNET:=$(TOP)./dotnet.sh
DOTNET_Q_ARGS=--nologo -v:q -consoleloggerparameters:NoSummary

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
MONO_CONFIG=Debug
MONO_ARCH=x64
DOTNET := ../../../../.././dotnet.sh
DOTNET := ../../../../dotnet.sh
USE_LLVM=true
AOT=false

all: runtimepack run

TOOLS_DIR=../../../../tasks
TOOLS_DIR=../../../tasks
appbuilder:
$(DOTNET) build -c Debug $(TOOLS_DIR)/AotCompilerTask/MonoAOTCompiler.csproj
$(DOTNET) build -c Debug $(TOOLS_DIR)/AppleAppBuilder/AppleAppBuilder.csproj

runtimepack:
../../../../.././build.sh Mono+Libs -os iOS -arch $(MONO_ARCH) -c $(MONO_CONFIG)
../../../../build.sh Mono+Libs -os iOS -arch $(MONO_ARCH) -c $(MONO_CONFIG)

run: clean appbuilder
$(DOTNET) publish -c $(MONO_CONFIG) /p:TargetArchitecture=$(MONO_ARCH) \
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
TOP=../../../../../..
TOP=../../../../..

include ../../wasm/wasm.mk

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
TOP=../../../../../../
TOP=../../../../../
DOTNET:=$(TOP)./dotnet.sh
DOTNET_Q_ARGS=--nologo -v:q -consoleloggerparameters:NoSummary

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
TOP=../../../../../..
TOP=../../../../..

include ../wasm.mk

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
TOP=../../../../../..
TOP=../../../../..

include ../wasm.mk

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
TOP=../../../../../..
TOP=../../../../..

include ../wasm.mk

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 382de3d

Please sign in to comment.