summaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authorJiyoung Yun <jy910.yun@samsung.com>2017-06-13 09:47:36 (GMT)
committerJiyoung Yun <jy910.yun@samsung.com>2017-06-13 09:47:36 (GMT)
commit61d6a817e39d3bae0f47dbc09838d51db22a5d30 (patch)
treecb37caa1784bc738b976273335d6ed04a7cc80b0 /build.sh
parent5b975f8233e8c8d17b215372f89ca713b45d6a0b (diff)
downloadcoreclr-61d6a817e39d3bae0f47dbc09838d51db22a5d30.zip
coreclr-61d6a817e39d3bae0f47dbc09838d51db22a5d30.tar.gz
coreclr-61d6a817e39d3bae0f47dbc09838d51db22a5d30.tar.bz2
Imported Upstream version 2.0.0.11992upstream/2.0.0.11992
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh70
1 files changed, 57 insertions, 13 deletions
diff --git a/build.sh b/build.sh
index 018cdf0..55b4ba3 100755
--- a/build.sh
+++ b/build.sh
@@ -38,7 +38,6 @@ usage()
echo "skiptests - skip the tests in the 'tests' subdirectory."
echo "skipnuget - skip building nuget packages."
echo "skiprestoreoptdata - skip restoring optimization data used by profile-based optimizations."
- echo "portable - build for portable RID."
echo "verbose - optional argument to enable verbose build output."
echo "-skiprestore: skip restoring packages ^(default: packages are restored during build^)."
echo "-disableoss: Disable Open Source Signing for System.Private.CoreLib."
@@ -142,6 +141,16 @@ restore_optdata()
echo "Failed to restore the optimization data package."
exit 1
fi
+
+ # Parse the optdata package versions out of msbuild so that we can pass them on to CMake
+ local DotNetCli="$__ProjectRoot/Tools/dotnetcli/dotnet"
+ if [ ! -f $DotNetCli ]; then
+ echo "Assertion failed: dotnet CLI not found at '$DotNetCli'"
+ exit 1
+ fi
+ local OptDataProjectFilePath="$__ProjectRoot/src/.nuget/optdata/optdata.csproj"
+ __PgoOptDataVersion=$($DotNetCli msbuild $OptDataProjectFilePath /t:DumpPgoDataPackageVersion /nologo | sed 's/^\s*//')
+ __IbcOptDataVersion=$($DotNetCli msbuild $OptDataProjectFilePath /t:DumpIbcDataPackageVersion /nologo | sed 's/^\s*//')
fi
}
@@ -154,15 +163,27 @@ generate_event_logging_sources()
# Event Logging Infrastructure
__GeneratedIntermediate="$__IntermediatesDir/Generated"
__GeneratedIntermediateEventProvider="$__GeneratedIntermediate/eventprovider_new"
+ __GeneratedIntermediateEventPipe="$__GeneratedIntermediate/eventpipe_new"
+
if [[ -d "$__GeneratedIntermediateEventProvider" ]]; then
rm -rf "$__GeneratedIntermediateEventProvider"
fi
+ if [[ -d "$__GeneratedIntermediateEventPipe" ]]; then
+ rm -rf "$__GeneratedIntermediateEventPipe"
+ fi
+
if [[ ! -d "$__GeneratedIntermediate/eventprovider" ]]; then
mkdir -p "$__GeneratedIntermediate/eventprovider"
fi
+ if [[ ! -d "$__GeneratedIntermediate/eventpipe" ]]; then
+ mkdir -p "$__GeneratedIntermediate/eventpipe"
+ fi
+
mkdir -p "$__GeneratedIntermediateEventProvider"
+ mkdir -p "$__GeneratedIntermediateEventPipe"
+
if [[ $__SkipCoreCLR == 0 || $__ConfigureOnly == 1 ]]; then
echo "Laying out dynamically generated files consumed by the build system "
echo "Laying out dynamically generated Event Logging Test files"
@@ -172,6 +193,18 @@ generate_event_logging_sources()
exit
fi
+ case $__BuildOS in
+ Linux)
+ echo "Laying out dynamically generated EventPipe Implementation"
+ $PYTHON -B -Wall -Werror "$__ProjectRoot/src/scripts/genEventPipe.py" --man "$__ProjectRoot/src/vm/ClrEtwAll.man" --intermediate "$__GeneratedIntermediateEventPipe" --exc "$__ProjectRoot/src/vm/ClrEtwAllMeta.lst"
+ if [[ $? != 0 ]]; then
+ exit
+ fi
+ ;;
+ *)
+ ;;
+ esac
+
#determine the logging system
case $__BuildOS in
Linux)
@@ -193,6 +226,14 @@ generate_event_logging_sources()
fi
rm -rf "$__GeneratedIntermediateEventProvider"
+
+ echo "Cleaning the temp folder of dynamically generated EventPipe files"
+ $PYTHON -B -Wall -Werror -c "import sys;sys.path.insert(0,\"$__ProjectRoot/src/scripts\"); from Utilities import *;UpdateDirectory(\"$__GeneratedIntermediate/eventpipe\",\"$__GeneratedIntermediateEventPipe\")"
+ if [[ $? != 0 ]]; then
+ exit
+ fi
+
+ rm -rf "$__GeneratedIntermediateEventPipe"
}
build_native()
@@ -379,7 +420,7 @@ build_CoreLib_ni()
{
if [ $__SkipCoreCLR == 0 -a -e $__BinDir/crossgen ]; then
echo "Generating native image for System.Private.CoreLib."
- $__BinDir/crossgen $__IbcTuning $__BinDir/System.Private.CoreLib.dll
+ $__BinDir/crossgen /Platform_Assemblies_Paths $__BinDir/IL $__IbcTuning /out $__BinDir/System.Private.CoreLib.dll $__BinDir/IL/System.Private.CoreLib.dll
if [ $? -ne 0 ]; then
echo "Failed to generate native image for System.Private.CoreLib."
exit 1
@@ -387,7 +428,7 @@ build_CoreLib_ni()
if [ "$__BuildOS" == "Linux" ]; then
echo "Generating symbol file for System.Private.CoreLib."
- $__BinDir/crossgen /CreatePerfMap $__BinDir $__BinDir/System.Private.CoreLib.ni.dll
+ $__BinDir/crossgen /CreatePerfMap $__BinDir $__BinDir/System.Private.CoreLib.dll
if [ $? -ne 0 ]; then
echo "Failed to generate symbol file for System.Private.CoreLib."
exit 1
@@ -585,7 +626,7 @@ __DistroRid=""
__cmakeargs=""
__SkipGenerateVersion=0
__DoCrossArchBuild=0
-__PortableBuild=0
+__PortableBuild=1
__msbuildonunsupportedplatform=0
__PgoOptDataVersion=""
__IbcOptDataVersion=""
@@ -642,8 +683,8 @@ while :; do
__CrossBuild=1
;;
- -portable)
- __PortableBuild=1
+ -portablebuild=false)
+ __PortableBuild=0
;;
verbose)
@@ -800,12 +841,22 @@ if [[ $__ClangMajorVersion == 0 && $__ClangMinorVersion == 0 ]]; then
__ClangMajorVersion=3
__ClangMinorVersion=6
fi
+
+ if [[ "$__BuildArch" == "armel" ]]; then
+ # Armel cross build is Tizen specific and does not support Portable RID build
+ __PortableBuild=0
+ fi
+
else
__ClangMajorVersion=3
__ClangMinorVersion=5
fi
fi
+if [ $__PortableBuild == 0 ]; then
+ __RunArgs="$__RunArgs -PortableBuild=false"
+fi
+
# Set dependent variables
__LogsDir="$__RootBinDir/Logs"
@@ -858,13 +909,6 @@ if [ $__CrossBuild == 1 ]; then
fi
fi
-# Parse the optdata package version from its project.json file
-optDataProjectJsonPath="$__ProjectRoot/src/.nuget/optdata/project.json"
-if [ -f $optDataProjectJsonPath ]; then
- __PgoOptDataVersion=$("$__ProjectRoot/extract-from-json.py" -rf $optDataProjectJsonPath dependencies optimization.PGO.CoreCLR)
- __IbcOptDataVersion=$("$__ProjectRoot/extract-from-json.py" -rf $optDataProjectJsonPath dependencies optimization.IBC.CoreCLR)
-fi
-
# init the target distro name
initTargetDistroRid