fsharp/build.sh

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 строки
514 B
Bash
Исходник Обычный вид История

2019-03-19 23:44:16 +03:00
#!/usr/bin/env bash
Enable Build/CI with Mono (#1703) This enables a build of this repo using Mono. - Use FSharp.Compiler.Tools nuget package as LKG (like fsharp/fsharp) - Update init-tools.cmd and init-tools.sh to be the latest from the .NET Core repos. - There are a bunch of simplifications and extra checking in FSharpSource,targets - Some of the key signing logic has Mono-compat implementations - Removed use of tuple structs from the compiler code (this was done when initially updating the LKG. I eventually updated the LKG to one that actually supports tuple structs, but the uses of the feature aren't needed in the compiler code, so I'll remove them in any case) - Adjust CustomCopyLocal and remove subst.exe. We can work out how to implement a copy-and-substitute at a later point. - Project files on Mono need to use <FSharpSourcesRoot>$(MSBuildProjectDirectory)\..\..</FSharpSourcesRoot> instead of <FSharpSourcesRoot>..\..</FSharpSourcesRoot> CoreCLR bits are not built on Mono though the PR includes some preliminary changes in that direction. We do some things differently on Linux/Mono: - UseMicroBuild is off - UseSourceLink is off - UseGatherBinaries is off - AddVsSdkAttributesToSomeCoreComponents is off The define CROSS_PLATFORM_COMPILER is set when building for Mono to workaround a couple of limitations in Mono. The code is written in a way so that it is valid to set it on Windows too, but we don't CI that. One odd de-capitalization change was needed in init-tools.sh to use microsoft.dotnet.buildtools instead of Microsoft.DotNet.BuildTools since the Linux package gets the former name See https://github.com/Microsoft/visualfsharp/pull/1703
2016-11-06 21:49:18 +03:00
2019-03-19 23:44:16 +03:00
source="${BASH_SOURCE[0]}"
# resolve $SOURCE until the file is no longer a symlink
while [[ -h $source ]]; do
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
source="$(readlink "$source")"
# if $source was a relative symlink, we need to resolve it relative to the path where the
# symlink file was located
[[ $source != /* ]] && source="$scriptroot/$source"
done
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
time "$scriptroot/eng/build.sh" --build --restore $@