summaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authorPat Gavlin <pagavlin@microsoft.com>2017-06-28 17:37:51 (GMT)
committerPat Gavlin <pagavlin@microsoft.com>2017-06-28 18:35:54 (GMT)
commit3c1c553bc9c27dab04258ce184c74af151f6a311 (patch)
treee72459c630c44967260662d3930043a398bd68b1 /build.sh
parent217ab30d021f27be6fe4f35126a88e592366acbf (diff)
downloadcoreclr-3c1c553bc9c27dab04258ce184c74af151f6a311.zip
coreclr-3c1c553bc9c27dab04258ce184c74af151f6a311.tar.gz
coreclr-3c1c553bc9c27dab04258ce184c74af151f6a311.tar.bz2
Add a flag to build.{sh,cmd} to disable PGO.
This is helpful when performing JIT throughput measurements.
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh11
1 files changed, 9 insertions, 2 deletions
diff --git a/build.sh b/build.sh
index 30856d5..5ebf40a 100755
--- a/build.sh
+++ b/build.sh
@@ -29,6 +29,7 @@ usage()
echo " - will use ROOTFS_DIR environment variable if set."
echo "crosscomponent - optional argument to build cross-architecture component,"
echo " - will use CAC_ROOTFS_DIR environment variable if set."
+ echo "nopgooptimize - do not use profile guided optimizations."
echo "pgoinstrument - generate instrumented code for profile guided optimization enabled binaries."
echo "ibcinstrument - generate IBC-tuning-enabled native images when invoking crossgen."
echo "configureonly - do not perform any builds; just configure the build."
@@ -363,7 +364,7 @@ build_cross_arch_component()
fi
fi
- __ExtraCmakeArgs="-DCLR_CMAKE_TARGET_ARCH=$__BuildArch -DCLR_CMAKE_TARGET_OS=$__BuildOS -DCLR_CMAKE_PACKAGES_DIR=$__PackagesDir -DCLR_CMAKE_PGO_INSTRUMENT=$__PgoInstrument -DCLR_CMAKE_OPTDATA_VERSION=$__PgoOptDataVersion"
+ __ExtraCmakeArgs="-DCLR_CMAKE_TARGET_ARCH=$__BuildArch -DCLR_CMAKE_TARGET_OS=$__BuildOS -DCLR_CMAKE_PACKAGES_DIR=$__PackagesDir -DCLR_CMAKE_PGO_INSTRUMENT=$__PgoInstrument -DCLR_CMAKE_OPTDATA_VERSION=$__PgoOptDataVersion -DCLR_CMAKE_PGO_OPTIMIZE=$__PgoOptimize"
build_native $__SkipCrossArchBuild "$__CrossArch" "$__CrossCompIntermediatesDir" "$__ExtraCmakeArgs" "cross-architecture component"
# restore ROOTFS_DIR, CROSSCOMPONENT, and CROSSCOMPILE
@@ -595,6 +596,7 @@ __MSBCleanBuildArgs=
__UseNinja=0
__VerboseBuild=0
__PgoInstrument=0
+__PgoOptimize=1
__IbcTuning=""
__ConfigureOnly=0
__SkipConfigure=0
@@ -730,6 +732,11 @@ while :; do
__PgoInstrument=1
;;
+ nopgooptimize)
+ __PgoOptimize=0
+ __SkipRestoreOptData=1
+ ;;
+
ibcinstrument)
__IbcTuning="/Tuning"
;;
@@ -936,7 +943,7 @@ restore_optdata
generate_event_logging_sources
# Build the coreclr (native) components.
-__ExtraCmakeArgs="-DCLR_CMAKE_TARGET_OS=$__BuildOS -DCLR_CMAKE_PACKAGES_DIR=$__PackagesDir -DCLR_CMAKE_PGO_INSTRUMENT=$__PgoInstrument -DCLR_CMAKE_OPTDATA_VERSION=$__PgoOptDataVersion"
+__ExtraCmakeArgs="-DCLR_CMAKE_TARGET_OS=$__BuildOS -DCLR_CMAKE_PACKAGES_DIR=$__PackagesDir -DCLR_CMAKE_PGO_INSTRUMENT=$__PgoInstrument -DCLR_CMAKE_OPTDATA_VERSION=$__PgoOptDataVersion -DCLR_CMAKE_PGO_OPTIMIZE=$__PgoOptimize"
build_native $__SkipCoreCLR "$__BuildArch" "$__IntermediatesDir" "$__ExtraCmakeArgs" "CoreCLR component"
# Build cross-architecture components