提交 5967d836 编写于 作者: A Andy Gocke

Merge pull request #5504 from agocke/GetRidOfLinuxCoreClrRuntimeCopy

Remove linux coreclr binary patching
#!/bin/bash
CORECLR_DIR="$1"
RUNTIME_SOURCE_DIR=~/.nuget/packages/tmp_coreclr_runtime
if [ ! -d $CORECLR_DIR ]; then
echo "usage: $0 core-clr-directory"
exit 1
fi
if [ -f "$CORECLR_DIR/csc.exe" ]; then
mv "$CORECLR_DIR/csc.exe" "$CORECLR_DIR/csc.dll"
fi
if [ ! -f "$CORECLR_DIR/csc" ]; then
cp "$RUNTIME_SOURCE_DIR/coreconsole" $CORECLR_DIR/csc
fi
if [ -f "$CORECLR_DIR/vbc.exe" ]; then
mv "$CORECLR_DIR/vbc.exe" "$CORECLR_DIR/vbc.dll"
fi
if [ ! -f "$CORECLR_DIR/vbc" ]; then
cp "$RUNTIME_SOURCE_DIR/coreconsole" $CORECLR_DIR/vbc
fi
cp $RUNTIME_SOURCE_DIR/{*.dll,*.so} "$CORECLR_DIR"
......@@ -56,44 +56,15 @@ do
esac
done
acquire_sem_or_wait()
{
local lockpath="/tmp/${1}.lock.d"
echo "Acquiring ${lockpath}"
while true; do
mkdir "${lockpath}" 2>/dev/null
if [ $? -eq 0 ]; then
break;
fi
echo "Waiting for lock $1"
sleep 10
done
}
release_sem()
{
rmdir "/tmp/${1}.lock.d"
}
restore_nuget()
{
# restore coreclr runtime package
pushd /tmp
local coreclr_package_name="coreclr.linux.1.zip"
rm $coreclr_package_name 2>/dev/null
curl -O https://dotnetci.blob.core.windows.net/roslyn/$coreclr_package_name
unzip -uoq $coreclr_package_name -d ~/
popd
acquire_sem_or_wait "restore_nuget"
local package_name="nuget.15.zip"
local package_name="nuget.16.zip"
local target="/tmp/$package_name"
echo "Installing NuGet Packages $target"
if [ -f $target ]; then
if [ "$USE_CACHE" = "true" ]; then
echo "Already installed"
release_sem "restore_nuget"
return
fi
fi
......@@ -105,13 +76,11 @@ restore_nuget()
unzip -uoq $package_name -d ~/
if [ $? -ne 0 ]; then
echo "Unable to download NuGet packages"
release_sem "restore_nuget"
exit 1
fi
popd
release_sem "restore_nuget"
}
run_msbuild()
......@@ -170,17 +139,6 @@ save_toolset()
{
mkdir Binaries/Bootstrap
cp Binaries/$BUILD_CONFIGURATION/core-clr/* Binaries/Bootstrap
if [ "$OS_NAME" == "Linux" ]; then
# Copy over the CoreCLR runtime
./build/linux/copy-coreclr-runtime.sh Binaries/Bootstrap
if [ $? -ne 0 ]; then
echo Saving bootstrap binaries failed
exit 1
fi
chmod +x Binaries/Bootstrap/csc
chmod +x Binaries/Bootstrap/vbc
fi
}
# Clean out all existing binaries. This ensures the bootstrap phase forces
......@@ -197,8 +155,8 @@ build_roslyn()
local bootstrapArg=""
if [ "$OS_NAME" == "Linux" ]; then
bootstrapArg="/p:CscToolPath=$(pwd)/Binaries/Bootstrap /p:CscToolExe=csc \
/p:VbcToolPath=$(pwd)/Binaries/Bootstrap /p:VbcToolExe=vbc"
bootstrapArg="/p:CscToolPath=$(pwd)/Binaries/Bootstrap /p:CscToolExe=csc.sh \
/p:VbcToolPath=$(pwd)/Binaries/Bootstrap /p:VbcToolExe=vbc.sh"
fi
echo Building CrossPlatform.sln
......@@ -211,12 +169,9 @@ install_mono_toolset()
local target=/tmp/$1
echo "Installing Mono toolset $1"
acquire_sem_or_wait "$1"
if [ -d $target ]; then
if [ "$USE_CACHE" = "true" ]; then
echo "Already installed"
release_sem "$1"
return
fi
fi
......@@ -229,12 +184,10 @@ install_mono_toolset()
tar -jxf $1.tar.bz2
if [ $? -ne 0 ]; then
echo "Unable to download toolset"
release_sem "$1"
exit 1
fi
popd
release_sem "$1"
}
# This function will update the PATH variable to put the desired
......
......@@ -89,6 +89,9 @@
<None Include="csc.rsp">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="csc.sh">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="project.json" />
</ItemGroup>
<ImportGroup Label="Targets">
......
#!/bin/sh
THISDIR=$(dirname $0)
chmod +x $THISDIR/CoreRun 2>/dev/null
$THISDIR/CoreRun $THISDIR/csc.exe "$@"
{
{
"dependencies": {
"Microsoft.NETCore.Platforms": "1.0.1-beta-23321",
"Microsoft.NETCore.Runtime.CoreCLR": "1.0.1-beta-23321",
"Microsoft.NETCore.TestHost-x64": "1.0.0-beta-23213",
"Microsoft.NETCore.TestHost": "1.0.0-beta-23321",
"System.AppContext": "4.0.1-beta-23321",
"System.Collections": "4.0.11-beta-23321",
"System.Collections.Immutable": "1.1.36",
......@@ -25,12 +25,13 @@
"System.Runtime.InteropServices": "4.0.21-beta-23321",
"System.Runtime.Loader": "4.0.0-beta-23321",
"System.Runtime.Serialization.Json": "4.0.1-beta-23321",
"System.Security.Cryptography.Hashing.Algorithms": "4.0.0-beta-23311",
"System.Security.Cryptography.Algorithms": "4.0.0-beta-23321",
"System.Text.Encoding": "4.0.11-beta-23321",
"System.Text.Encoding.CodePages": "4.0.1-beta-23321",
"System.Text.Encoding.Extensions": "4.0.11-beta-23321",
"System.Threading": "4.0.11-beta-23321",
"System.Threading.Tasks": "4.0.11-beta-23321",
"System.Threading.Tasks.Parallel": "4.0.1-beta-23321",
"System.Threading.Thread": "4.0.0-beta-23321",
"System.Xml.XDocument": "4.0.11-beta-23321",
"System.Xml.XmlDocument": "4.0.1-beta-23321",
......
......@@ -80,6 +80,9 @@
<InternalsVisibleToTest Include="Roslyn.Compilers.VisualBasic.CommandLine.UnitTests" />
</ItemGroup>
<ItemGroup>
<None Include="vbc.sh">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="vbc.cmd">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
......
......@@ -2,7 +2,7 @@
"dependencies": {
"Microsoft.NETCore.Platforms": "1.0.1-beta-23321",
"Microsoft.NETCore.Runtime.CoreCLR": "1.0.1-beta-23321",
"Microsoft.NETCore.TestHost-x64": "1.0.0-beta-23213",
"Microsoft.NETCore.TestHost": "1.0.0-beta-23321",
"System.AppContext": "4.0.1-beta-23321",
"System.Collections": "4.0.11-beta-23321",
"System.Collections.Immutable": "1.1.36",
......@@ -25,12 +25,13 @@
"System.Runtime.InteropServices": "4.0.21-beta-23321",
"System.Runtime.Loader": "4.0.0-beta-23321",
"System.Runtime.Serialization.Json": "4.0.1-beta-23321",
"System.Security.Cryptography.Hashing.Algorithms": "4.0.0-beta-23311",
"System.Security.Cryptography.Algorithms": "4.0.0-beta-23321",
"System.Text.Encoding": "4.0.11-beta-23321",
"System.Text.Encoding.CodePages": "4.0.1-beta-23321",
"System.Text.Encoding.Extensions": "4.0.11-beta-23321",
"System.Threading": "4.0.11-beta-23321",
"System.Threading.Tasks": "4.0.11-beta-23321",
"System.Threading.Tasks.Parallel": "4.0.1-beta-23321",
"System.Threading.Thread": "4.0.0-beta-23321",
"System.Xml.XDocument": "4.0.11-beta-23321",
"System.Xml.XmlDocument": "4.0.1-beta-23321",
......
#!/bin/sh
THISDIR=$(dirname $0)
chmod +x $THISDIR/CoreRun 2>/dev/null
$THISDIR/CoreRun $THISDIR/vbc.exe "$@"
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册