summaryrefslogtreecommitdiff
path: root/packaging
diff options
context:
space:
mode:
authorKonstantin Baladurin <k.baladurin@samsung.com>2019-04-18 12:29:56 +0300
committerGleb Balykov <g.balykov@samsung.com>2020-03-25 15:29:41 +0300
commit9ac48932809e5ed602206f144f404d5089f9d8f3 (patch)
tree8aa86255a00a70b78bd0eecff44e2b4428d48a2c /packaging
parenta8344f4f0871f2c5887f6f4f152e61c87b3789db (diff)
downloadcoreclr-9ac48932809e5ed602206f144f404d5089f9d8f3.tar.gz
coreclr-9ac48932809e5ed602206f144f404d5089f9d8f3.tar.bz2
coreclr-9ac48932809e5ed602206f144f404d5089f9d8f3.zip
[Tizen] Enable PGO for Linux/arm
Diffstat (limited to 'packaging')
-rwxr-xr-xpackaging/coreclr.spec27
1 files changed, 25 insertions, 2 deletions
diff --git a/packaging/coreclr.spec b/packaging/coreclr.spec
index 04554c70a3..a7cbbf856c 100755
--- a/packaging/coreclr.spec
+++ b/packaging/coreclr.spec
@@ -2,6 +2,10 @@
%define skipnative 0
%define skipmscorlib 0
+
+%define pgo_instrument 0
+%define pgo_optimize 1
+
%ifarch %{ix86}
%define dotnet_buildtype Release
%endif
@@ -78,6 +82,11 @@ BuildRequires: libopenssl11-64bit
%endif
%endif
+%if 0%{pgo_instrument} || 0%{pgo_optimize}
+BuildRequires: binutils-gold
+BuildRequires: compiler-rt
+%endif
+
%description
The CoreCLR repo contains the complete runtime implementation for .NET Core. It includes RyuJIT, the .NET GC, native interop and many other components. It is cross-platform, with multiple OS and CPU ports in progress.
@@ -181,6 +190,20 @@ export CXXFLAGS+="-fstack-protector-strong"
%endif
%endif
+%if 0%{skipnative}
+%else
+%if 0%{pgo_instrument}
+%define _pgo_flags -pgoinstrument
+%else
+%if 0%{pgo_optimize}
+# pgo optimization is enabled by default
+%define _pgo_flags ""
+%else
+%define _pgo_flags -nopgooptimize
+%endif
+%endif
+%endif
+
%ifarch %{arm}
%define _ngen_relocs_opts cmakeargs "-DFEATURE_NGEN_RELOCS_OPTIMIZATIONS=true"
%else
@@ -194,7 +217,7 @@ export CXXFLAGS+="-fstack-protector-strong"
# Build native only.
export NUGET_PACKAGES=%{_builddir}/%{name}-%{version}/.packages/
export LD_LIBRARY_PATH=%{_builddir}/%{name}-%{version}/libicu-57.1/
-./build.sh -%{_barch} -%{_buildtype} -numproc %{_numproc} -clang3.8 -skipmscorlib -skipgenerateversion -skipnuget -msbuildonunsupportedplatform cmakeargs "-DFEATURE_PREJIT=true -DFEATURE_ENABLE_NO_ADDRESS_SPACE_RANDOMIZATION=true -DCLR_ADDITIONAL_LINKER_FLAGS=-Wl,-z,relro" %{_ngen_relocs_opts}
+./build.sh -%{_barch} -%{_buildtype} -numproc %{_numproc} -skipmscorlib -skipgenerateversion -skipnuget -msbuildonunsupportedplatform cmakeargs "-DFEATURE_PREJIT=true -DFEATURE_ENABLE_NO_ADDRESS_SPACE_RANDOMIZATION=true -DCLR_ADDITIONAL_LINKER_FLAGS=-Wl,-z,relro" %{_ngen_relocs_opts} %{_pgo_flags}
%endif
%else
%if 0%{skipnative}
@@ -206,7 +229,7 @@ export LD_LIBRARY_PATH=%{_builddir}/%{name}-%{version}/libicu-57.1/
# Build native and mscorlib.
export NUGET_PACKAGES=%{_builddir}/%{name}-%{version}/.packages/
export LD_LIBRARY_PATH=%{_builddir}/%{name}-%{version}/libicu-57.1/
-./build.sh -%{_barch} -%{_buildtype} -numproc %{_numproc} -clang3.8 -skipgenerateversion -skiprestore -skiprestoreoptdata -skipnuget -skipcrossgen -msbuildonunsupportedplatform cmakeargs "-DFEATURE_IBCLOGGER=true -DFEATURE_PREJIT=true -DFEATURE_ENABLE_NO_ADDRESS_SPACE_RANDOMIZATION=true -DCLR_ADDITIONAL_LINKER_FLAGS=-Wl,-z,relro" %{_ngen_relocs_opts}
+./build.sh -%{_barch} -%{_buildtype} -numproc %{_numproc} -skipgenerateversion -skiprestore -skiprestoreoptdata -skipnuget -skipcrossgen -msbuildonunsupportedplatform cmakeargs "-DFEATURE_IBCLOGGER=true -DFEATURE_PREJIT=true -DFEATURE_ENABLE_NO_ADDRESS_SPACE_RANDOMIZATION=true -DCLR_ADDITIONAL_LINKER_FLAGS=-Wl,-z,relro" %{_ngen_relocs_opts} %{_pgo_flags}
%endif
%endif