Skip to content

Commit

Permalink
Simplify solutions used to build monolinker/illink (dotnet/linker#474)
Browse files Browse the repository at this point in the history
Until I can make more progress on SDK-style projects (see dotnet/linker#471), I'll begin trying to set up a build of illink using arcade and the old-style projects. In this change I'm getting rid of the scattered linker.sln files in favor of monolinker.sln for monolinker, and illink.sln for the illink/ILLink.Tasks build.

Commit migrated from dotnet/linker@1331119
  • Loading branch information
sbomer authored and marek-safar committed Feb 26, 2019
1 parent d4f5a26 commit 2fc2358
Show file tree
Hide file tree
Showing 11 changed files with 35 additions and 97 deletions.
2 changes: 1 addition & 1 deletion src/tools/illink/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ programs might require to run as opposed to the full libraries.
It is used by the various Xamarin products to extract only the bits of code that are needed to run
an application on Android, iOS and other platforms.

It can also be used in the form of [ILLink.Tasks](corebuild/README.md) to reduce the size of .NET Core apps.
It can also be used in the form of [ILLink.Tasks](src/ILLink.Tasks/README.md) to reduce the size of .NET Core apps.

# [Analyzer](src/analyzer/README.md)

Expand Down
2 changes: 1 addition & 1 deletion src/tools/illink/corebuild/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
# build.sh will bootstrap the cli and ultimately call "dotnet build"

working_tree_root="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
$working_tree_root/dotnet.sh build $working_tree_root/linker.sln $@
$working_tree_root/dotnet.sh build $working_tree_root/../illink.sln $@
exit $?
6 changes: 3 additions & 3 deletions src/tools/illink/corebuild/integration/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ If (Test-Path $tasksFolder) {
Remove-Item -r $tasksFolder
}

$dotNetTool = Join-Path $PSScriptRoot "..\corebuild\dotnet.ps1"
$dotNetTool = Join-Path $PSScriptRoot "..\dotnet.ps1"
# create integration packages
& $dotNetTool restore (Join-Path $PSScriptRoot "linker.sln")
& $dotNetTool pack (Join-Path $PSScriptRoot "linker.sln")
& $dotNetTool restore (Join-Path $PSScriptRoot ".." ".." "illink.sln")
& $dotNetTool pack (Join-Path $PSScriptRoot ".." ".." "illink.sln")
6 changes: 3 additions & 3 deletions src/tools/illink/corebuild/integration/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ then
rm -r $tasksFolder
fi

dotNetTool=$__scriptpath/../corebuild/dotnet.sh
dotNetTool=$__scriptpath/../dotnet.sh
# create integration packages
$dotNetTool restore $__scriptpath/linker.sln
$dotNetTool pack $__scriptpath/linker.sln
$dotNetTool restore $__scriptpath/../../illink.sln
$dotNetTool pack $__scriptpath/../../illink.sln
76 changes: 0 additions & 76 deletions src/tools/illink/corebuild/integration/linker.sln

This file was deleted.

2 changes: 1 addition & 1 deletion src/tools/illink/corebuild/restore.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
REM restore.sh will bootstrap the cli and ultimately call "dotnet
REM restore". Dependencies of the linker will get restored as well.

@call %~dp0dotnet.cmd restore %~dp0integration\linker.sln %*
@call %~dp0dotnet.cmd restore %~dp0..\illink.sln %*
@exit /b %ERRORLEVEL%
2 changes: 1 addition & 1 deletion src/tools/illink/corebuild/restore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
# restore". Dependencies of the linker will get restored as well.

working_tree_root="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
$working_tree_root/dotnet.sh restore $working_tree_root/integration/linker.sln $@
$working_tree_root/dotnet.sh restore $working_tree_root/../illink.sln $@
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
Microsoft Visual Studio Solution File, Format Version 12.00
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26124.0
MinimumVisualStudioVersion = 15.0.26124.0
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Linker", "..\src\linker\Mono.Linker.csproj", "{DD28E2B1-057B-4B4D-A04D-B2EBD9E76E46}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Linker", "src\linker\Mono.Linker.csproj", "{DD28E2B1-057B-4B4D-A04D-B2EBD9E76E46}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Cecil", "..\external\cecil\Mono.Cecil.csproj", "{D68133BD-1E63-496E-9EDE-4FBDBF77B486}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Cecil", "external\cecil\Mono.Cecil.csproj", "{D68133BD-1E63-496E-9EDE-4FBDBF77B486}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Cecil.Pdb", "..\external\cecil\symbols\pdb\Mono.Cecil.Pdb.csproj", "{63E6915C-7EA4-4D76-AB28-0D7191EEA626}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Cecil.Pdb", "external\cecil\symbols\pdb\Mono.Cecil.Pdb.csproj", "{63E6915C-7EA4-4D76-AB28-0D7191EEA626}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Cecil.Mdb", "..\external\cecil\symbols\mdb\Mono.Cecil.Mdb.csproj", "{8559DD7F-A16F-46D0-A05A-9139FAEBA8FD}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Cecil.Mdb", "external\cecil\symbols\mdb\Mono.Cecil.Mdb.csproj", "{8559DD7F-A16F-46D0-A05A-9139FAEBA8FD}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ILLink.CustomSteps", "..\src\ILLink.CustomSteps\ILLink.CustomSteps.csproj", "{275C1D10-168A-4AC4-8F3E-AD969F580B9C}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ILLink.CustomSteps", "src\ILLink.CustomSteps\ILLink.CustomSteps.csproj", "{275C1D10-168A-4AC4-8F3E-AD969F580B9C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ILLink.Tasks", "src\ILLink.Tasks\ILLink.Tasks.csproj", "{A7A026C4-DEB4-4EF6-963E-17E7B98A6527}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -85,6 +87,18 @@ Global
{275C1D10-168A-4AC4-8F3E-AD969F580B9C}.Release|x64.Build.0 = illink_Release|x64
{275C1D10-168A-4AC4-8F3E-AD969F580B9C}.Release|x86.ActiveCfg = illink_Release|x86
{275C1D10-168A-4AC4-8F3E-AD969F580B9C}.Release|x86.Build.0 = illink_Release|x86
{A7A026C4-DEB4-4EF6-963E-17E7B98A6527}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A7A026C4-DEB4-4EF6-963E-17E7B98A6527}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A7A026C4-DEB4-4EF6-963E-17E7B98A6527}.Debug|x64.ActiveCfg = Debug|Any CPU
{A7A026C4-DEB4-4EF6-963E-17E7B98A6527}.Debug|x64.Build.0 = Debug|Any CPU
{A7A026C4-DEB4-4EF6-963E-17E7B98A6527}.Debug|x86.ActiveCfg = Debug|Any CPU
{A7A026C4-DEB4-4EF6-963E-17E7B98A6527}.Debug|x86.Build.0 = Debug|Any CPU
{A7A026C4-DEB4-4EF6-963E-17E7B98A6527}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A7A026C4-DEB4-4EF6-963E-17E7B98A6527}.Release|Any CPU.Build.0 = Release|Any CPU
{A7A026C4-DEB4-4EF6-963E-17E7B98A6527}.Release|x64.ActiveCfg = Release|Any CPU
{A7A026C4-DEB4-4EF6-963E-17E7B98A6527}.Release|x64.Build.0 = Release|Any CPU
{A7A026C4-DEB4-4EF6-963E-17E7B98A6527}.Release|x86.ActiveCfg = Release|Any CPU
{A7A026C4-DEB4-4EF6-963E-17E7B98A6527}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
6 changes: 3 additions & 3 deletions src/tools/illink/monobuild/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ CONFIGURATION = Debug
all: build check

build: prepare
$(MSBUILD) ../linker.sln /p:Configuration=$(CONFIGURATION)
$(MSBUILD) ../monolinker.sln /p:Configuration=$(CONFIGURATION)

clean:
$(MSBUILD) ../linker.sln /t:clean
$(MSBUILD) ../monolinker.sln /t:clean

prepare:
nuget restore ../linker.sln
nuget restore ../monolinker.sln
# A hack for project.assets.json issues
rm -f ../external/cecil/obj/project.assets.json
rm -f ../external/cecil/symbols/pdb/obj/project.assets.json
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions src/tools/illink/src/ILLink.Tasks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ The full set of options is described below.
## Building

```
linker> ./corebuild/dotnet.{sh/ps1} restore ./corebuild/integration/linker.sln
linker> ./corebuild/dotnet.{sh/ps1} pack ./corebuild/integration/ILLink.Tasks/ILLink.Tasks.csproj
linker> ./corebuild/dotnet.{sh/ps1} restore illink.sln
linker> ./corebuild/dotnet.{sh/ps1} pack src/ILLink.Tasks/ILLink.Tasks.csproj
```

The output package will be placed in
Expand Down

0 comments on commit 2fc2358

Please sign in to comment.