%ifarch x86_64
# Publish crossgen2 as a single file with self-contained
./build.sh --portablebuild false %{_build_args} --subset clr.alljits --cmakeargs -DFEATURE_IBCLOGGER=true --cmakeargs -DFEATURE_ENABLE_NO_ADDRESS_SPACE_RANDOMIZATION=true --cmakeargs -DCLR_ADDITIONAL_LINKER_FLAGS=-Wl,-z,relro %{_pgo_flags}
-./.dotnet/dotnet publish --self-contained true -r linux-%{_barch} ./src/coreclr/tools/aot/crossgen2/crossgen2.csproj -c Release -p:PublishSingleFile=true
+./.dotnet/dotnet publish --self-contained true -r linux-%{_barch} ./src/coreclr/tools/aot/crossgen2/crossgen2.csproj -c %{dotnet_buildtype_clr} -p:PublishSingleFile=true
%endif
%if 0%{skipmscorlib}