Merge pull request #3104 from schellap/sccs
Fix build minor and add sccsid
This commit is contained in:
commit
aa578bc08e
10 changed files with 72 additions and 13 deletions
|
@ -106,6 +106,7 @@ namespace Microsoft.DotNet.Host.Build
|
|||
var ridMacro = $"-DCLI_CMAKE_RUNTIME_ID:STRING={rid}";
|
||||
var arch = IsWinx86 ? "x86" : "x64";
|
||||
var baseSupportedRid = $"win7-{arch}";
|
||||
var cmakeHostVer = $"-DCLI_CMAKE_HOST_VER:STRING={hostVersion.LatestHostVersion}";
|
||||
var cmakeHostPolicyVer = $"-DCLI_CMAKE_HOST_POLICY_VER:STRING={hostVersion.LatestHostPolicyVersion}";
|
||||
var cmakeHostFxrVer = $"-DCLI_CMAKE_HOST_FXR_VER:STRING={hostVersion.LatestHostFxrVersion}";
|
||||
var cmakeBaseRid = $"-DCLI_CMAKE_PKG_RID:STRING={baseSupportedRid}";
|
||||
|
@ -115,6 +116,7 @@ namespace Microsoft.DotNet.Host.Build
|
|||
corehostSrcDir,
|
||||
archMacro,
|
||||
ridMacro,
|
||||
cmakeHostVer,
|
||||
cmakeHostFxrVer,
|
||||
cmakeHostPolicyVer,
|
||||
cmakeBaseRid,
|
||||
|
@ -149,6 +151,8 @@ namespace Microsoft.DotNet.Host.Build
|
|||
ExecIn(cmakeOut, Path.Combine(c.BuildContext.BuildDirectory, "src", "corehost", "build.sh"),
|
||||
"--arch",
|
||||
"x64",
|
||||
"--hostver",
|
||||
hostVersion.LatestHostVersion,
|
||||
"--fxrver",
|
||||
hostVersion.LatestHostFxrVersion,
|
||||
"--policyver",
|
||||
|
@ -187,6 +191,7 @@ namespace Microsoft.DotNet.Host.Build
|
|||
.Environment("__WorkaroundCliCoreHostFxrVer", hostVersion.LatestHostFxrVersionNoSuffix)
|
||||
.Environment("__WorkaroundCliCoreHostVer", hostVersion.LatestHostVersionNoSuffix)
|
||||
.Environment("__WorkaroundCliCoreHostBuildMajor", hostVersion.LatestHostBuildMajor)
|
||||
.Environment("__WorkaroundCliCoreHostBuildMinor", hostVersion.LatestHostBuildMinor)
|
||||
.Environment("__WorkaroundCliCoreHostVersionTag", hostVersion.LatestHostPrerelease)
|
||||
.ForwardStdOut()
|
||||
.ForwardStdErr()
|
||||
|
@ -206,8 +211,10 @@ namespace Microsoft.DotNet.Host.Build
|
|||
hostVersion.LatestHostFxrVersionNoSuffix,
|
||||
"--hostver",
|
||||
hostVersion.LatestHostVersionNoSuffix,
|
||||
"--build",
|
||||
"--build-major",
|
||||
hostVersion.LatestHostBuildMajor,
|
||||
"--build-minor",
|
||||
hostVersion.LatestHostBuildMinor,
|
||||
"--vertag",
|
||||
hostVersion.LatestHostPrerelease);
|
||||
}
|
||||
|
|
|
@ -24,7 +24,8 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
public string LatestHostPolicyVersionNoSuffix => $"{Major}.{Minor}.{Patch}";
|
||||
public string LatestHostPrerelease => ReleaseSuffix;
|
||||
public string LatestHostBuildMajor => $"{CommitCountString}";
|
||||
public string LatestHostSuffix => $"{ReleaseSuffix}-{LatestHostBuildMajor}-00";
|
||||
public string LatestHostBuildMinor => "00";
|
||||
public string LatestHostSuffix => $"{ReleaseSuffix}-{LatestHostBuildMajor}-{LatestHostBuildMinor}";
|
||||
|
||||
// Full versions and package information.
|
||||
public string LatestHostVersion => $"{LatestHostVersionNoSuffix}-{LatestHostSuffix}";
|
||||
|
|
|
@ -44,9 +44,9 @@
|
|||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<HostPolicyFullVersion>$(HostPolicyVersion)-$(PreReleaseLabel)-$(BuildNumberMajor)</HostPolicyFullVersion>
|
||||
<HostResolverFullVersion>$(HostResolverVersion)-$(PreReleaseLabel)-$(BuildNumberMajor)</HostResolverFullVersion>
|
||||
<HostFullVersion>$(HostVersion)-$(PreReleaseLabel)-$(BuildNumberMajor)</HostFullVersion>
|
||||
<HostPolicyFullVersion>$(HostPolicyVersion)-$(PreReleaseLabel)-$(BuildNumberMajor)-$(BuildNumberMinor)</HostPolicyFullVersion>
|
||||
<HostResolverFullVersion>$(HostResolverVersion)-$(PreReleaseLabel)-$(BuildNumberMajor)-$(BuildNumberMinor)</HostResolverFullVersion>
|
||||
<HostFullVersion>$(HostVersion)-$(PreReleaseLabel)-$(BuildNumberMajor)-$(BuildNumberMinor)</HostFullVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<Target Name="ValidateArgs" Condition="'$(CLIBuildVersion)'==''">
|
||||
|
@ -55,5 +55,6 @@
|
|||
<Error Condition="$(HostVersion)==''" Text="HostVersion is undefined" />
|
||||
<Error Condition="$(PreReleaseLabel)==''" Text="PreReleaseLabel is undefined" />
|
||||
<Error Condition="$(BuildNumberMajor)==''" Text="BuildNumberMajor is undefined" />
|
||||
<Error Condition="$(BuildNumberMinor)==''" Text="BuildNumberMinor is undefined" />
|
||||
</Target>
|
||||
</Project>
|
||||
|
|
|
@ -15,6 +15,7 @@ set __HostVer=%__WorkaroundCliCoreHostVer%
|
|||
set __FxrVer=%__WorkaroundCliCoreHostFxrVer%
|
||||
set __PolicyVer=%__WorkaroundCliCoreHostPolicyVer%
|
||||
set __BuildMajor=%__WorkaroundCliCoreHostBuildMajor%
|
||||
set __BuildMinor=%__WorkaroundCliCoreHostBuildMinor%
|
||||
set __VersionTag=%__WorkaroundCliCoreHostVersionTag%
|
||||
::
|
||||
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
|
@ -37,7 +38,8 @@ if /i "%1" == "/hostbindir" (set __DotNetHostBinDir=%2&shift&shift&goto
|
|||
if /i "%1" == "/hostver" (set __HostVer=%2&shift&shift&goto Arg_Loop)
|
||||
if /i "%1" == "/fxrver" (set __FxrVer=%2&shift&shift&goto Arg_Loop)
|
||||
if /i "%1" == "/policyver" (set __PolicyVer=%2&shift&shift&goto Arg_Loop)
|
||||
if /i "%1" == "/build" (set __BuildMajor=%2&shift&shift&goto Arg_Loop)
|
||||
if /i "%1" == "/buildmajor" (set __BuildMajor=%2&shift&shift&goto Arg_Loop)
|
||||
if /i "%1" == "/buildminor" (set __BuildMinor=%2&shift&shift&goto Arg_Loop)
|
||||
if /i "%1" == "/vertag" (set __VersionTag=%2&shift&shift&goto Arg_Loop)
|
||||
|
||||
echo Invalid command line argument: %1
|
||||
|
@ -63,7 +65,7 @@ if exist "%__ProjectDir%\bin" (rmdir /s /q "%__ProjectDir%\bin")
|
|||
|
||||
copy /y "%__DotNetHostBinDir%\corehost.exe" "%__DotNetHostBinDir%\dotnet.exe"
|
||||
|
||||
"%__ProjectDir%\Tools\corerun" "%__ProjectDir%\Tools\MSBuild.exe" "%__ProjectDir%\projects\packages.builds" /p:Platform=%__BuildArch% /p:DotNetHostBinDir=%__DotNetHostBinDir% /p:TargetsWindows=true /p:HostVersion=%__HostVer% /p:HostResolverVersion=%__FxrVer% /p:HostPolicyVersion=%__PolicyVer% /p:BuildNumberMajor=%__BuildMajor% /p:PreReleaseLabel=%__VersionTag% /p:CLIBuildVersion=%__BuildMajor% /verbosity:minimal
|
||||
"%__ProjectDir%\Tools\corerun" "%__ProjectDir%\Tools\MSBuild.exe" "%__ProjectDir%\projects\packages.builds" /p:Platform=%__BuildArch% /p:DotNetHostBinDir=%__DotNetHostBinDir% /p:TargetsWindows=true /p:HostVersion=%__HostVer% /p:HostResolverVersion=%__FxrVer% /p:HostPolicyVersion=%__PolicyVer% /p:BuildNumberMajor=%__BuildMajor% /p:BuildNumberMinor=%__BuildMinor% /p:PreReleaseLabel=%__VersionTag% /p:CLIBuildVersion=%__BuildMajor% /verbosity:minimal
|
||||
|
||||
if not ERRORLEVEL 0 goto :Error
|
||||
|
||||
|
|
|
@ -41,6 +41,7 @@ __host_ver=
|
|||
__fxr_ver=
|
||||
__policy_ver=
|
||||
__build_major=
|
||||
__build_minor=
|
||||
__version_tag=
|
||||
|
||||
# parse arguments
|
||||
|
@ -71,10 +72,14 @@ while [ "$1" != "" ]; do
|
|||
shift
|
||||
__policy_ver=$1
|
||||
;;
|
||||
--build)
|
||||
--build-major)
|
||||
shift
|
||||
__build_major=$1
|
||||
;;
|
||||
--build-minor)
|
||||
shift
|
||||
__build_minor=$1
|
||||
;;
|
||||
--vertag)
|
||||
shift
|
||||
__version_tag=$1
|
||||
|
@ -116,7 +121,7 @@ else
|
|||
init_distro_name
|
||||
fi
|
||||
|
||||
__common_parameters="/p:Platform=$__build_arch /p:DotNetHostBinDir=$__dotnet_host_bin_dir /p:$__targets_param /p:DistroName=$__distro_name /p:HostVersion=$__host_ver /p:HostResolverVersion=$__fxr_ver /p:HostPolicyVersion=$__policy_ver /p:BuildNumberMajor=$__build_major /p:PreReleaseLabel=$__version_tag /p:CLIBuildVersion=$__build_major /verbosity:minimal"
|
||||
__common_parameters="/p:Platform=$__build_arch /p:DotNetHostBinDir=$__dotnet_host_bin_dir /p:$__targets_param /p:DistroName=$__distro_name /p:HostVersion=$__host_ver /p:HostResolverVersion=$__fxr_ver /p:HostPolicyVersion=$__policy_ver /p:BuildNumberMajor=$__build_major /p:BuildNumberMinor=$__build_minor /p:PreReleaseLabel=$__version_tag /p:CLIBuildVersion=$__build_major /verbosity:minimal"
|
||||
|
||||
$__corerun $__msbuild $__project_dir/projects/packages.builds $__common_parameters || exit 1
|
||||
|
||||
|
|
|
@ -27,11 +27,12 @@ init_distro_name_and_rid()
|
|||
|
||||
usage()
|
||||
{
|
||||
echo "Usage: $0 --arch <Architecture> --rid <Runtime Identifier> --fxrver <HostFxr library version> --policyver <HostPolicy library version> --commithash <Git commit hash> [--xcompiler <Cross C++ Compiler>]"
|
||||
echo "Usage: $0 --arch <Architecture> --rid <Runtime Identifier> --hostver <Dotnet exe version> --fxrver <HostFxr library version> --policyver <HostPolicy library version> --commithash <Git commit hash> [--xcompiler <Cross C++ Compiler>]"
|
||||
echo ""
|
||||
echo "Options:"
|
||||
echo " --arch <Architecture> Target Architecture (amd64, x86, arm)"
|
||||
echo " --rid <Runtime Identifier> Target Runtime Identifier"
|
||||
echo " --hostver <Dotnet host version> Version of the dotnet executable"
|
||||
echo " --fxrver <HostFxr version> Version of the hostfxr library"
|
||||
echo " --policyver <HostPolicy version> Version of the hostpolicy library"
|
||||
echo " --commithash <Git commit hash> Current commit hash of the repo at build time"
|
||||
|
@ -53,6 +54,7 @@ DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
|||
|
||||
__build_arch=
|
||||
__runtime_id=
|
||||
__host_ver=
|
||||
__policy_ver=
|
||||
__fxr_ver=
|
||||
__CrossBuild=0
|
||||
|
@ -73,6 +75,10 @@ while [ "$1" != "" ]; do
|
|||
shift
|
||||
__runtime_id=$1
|
||||
;;
|
||||
--hostver)
|
||||
shift
|
||||
__host_ver=$1
|
||||
;;
|
||||
--fxrver)
|
||||
shift
|
||||
__fxr_ver=$1
|
||||
|
@ -139,9 +145,9 @@ __base_rid=$__rid_plat-$__build_arch_lowcase
|
|||
echo "Building Corehost from $DIR to $(pwd)"
|
||||
set -x # turn on trace
|
||||
if [ $__CrossBuild == 1 ]; then
|
||||
cmake "$DIR" -G "Unix Makefiles" $__cmake_defines -DCLI_CMAKE_RUNTIME_ID:STRING=$__runtime_id -DCLI_CMAKE_HOST_FXR_VER:STRING=$__fxr_ver -DCLI_CMAKE_HOST_POLICY_VER:STRING=$__policy_ver -DCLI_CMAKE_PKG_RID:STRING=$__base_rid -DCLI_CMAKE_COMMIT_HASH:STRING=$__commit_hash -DCMAKE_CXX_COMPILER="$__CrossCompiler"
|
||||
cmake "$DIR" -G "Unix Makefiles" $__cmake_defines -DCLI_CMAKE_RUNTIME_ID:STRING=$__runtime_id -DCLI_CMAKE_HOST_VER:STRING=$__host_ver -DCLI_CMAKE_HOST_FXR_VER:STRING=$__fxr_ver -DCLI_CMAKE_HOST_POLICY_VER:STRING=$__policy_ver -DCLI_CMAKE_PKG_RID:STRING=$__base_rid -DCLI_CMAKE_COMMIT_HASH:STRING=$__commit_hash -DCMAKE_CXX_COMPILER="$__CrossCompiler"
|
||||
else
|
||||
cmake "$DIR" -G "Unix Makefiles" $__cmake_defines -DCLI_CMAKE_RUNTIME_ID:STRING=$__runtime_id -DCLI_CMAKE_HOST_FXR_VER:STRING=$__fxr_ver -DCLI_CMAKE_HOST_POLICY_VER:STRING=$__policy_ver -DCLI_CMAKE_PKG_RID:STRING=$__base_rid -DCLI_CMAKE_COMMIT_HASH:STRING=$__commit_hash
|
||||
cmake "$DIR" -G "Unix Makefiles" $__cmake_defines -DCLI_CMAKE_RUNTIME_ID:STRING=$__runtime_id -DCLI_CMAKE_HOST_VER:STRING=$__host_ver -DCLI_CMAKE_HOST_FXR_VER:STRING=$__fxr_ver -DCLI_CMAKE_HOST_POLICY_VER:STRING=$__policy_ver -DCLI_CMAKE_PKG_RID:STRING=$__base_rid -DCLI_CMAKE_COMMIT_HASH:STRING=$__commit_hash
|
||||
fi
|
||||
set +x # turn off trace
|
||||
make
|
||||
|
|
|
@ -76,6 +76,16 @@ int execute_app(
|
|||
return code;
|
||||
}
|
||||
|
||||
static char sccsid[] = "@(#)" \
|
||||
HOST_PKG_VER \
|
||||
"; Commit Hash: " \
|
||||
REPO_COMMIT_HASH \
|
||||
"; Built on: " \
|
||||
__DATE__ \
|
||||
" " \
|
||||
__TIME__ \
|
||||
;
|
||||
|
||||
SHARED_API int hostfxr_main(const int argc, const pal::char_t* argv[])
|
||||
{
|
||||
trace::setup();
|
||||
|
|
|
@ -222,6 +222,16 @@ SHARED_API int corehost_load(host_interface_t* init)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static char sccsid[] = "@(#)" \
|
||||
HOST_PKG_VER \
|
||||
"; Commit Hash: " \
|
||||
REPO_COMMIT_HASH \
|
||||
"; Built on: " \
|
||||
__DATE__ \
|
||||
" " \
|
||||
__TIME__ \
|
||||
;
|
||||
|
||||
SHARED_API int corehost_main(const int argc, const pal::char_t* argv[])
|
||||
{
|
||||
if (trace::is_enabled())
|
||||
|
|
|
@ -86,6 +86,12 @@ else()
|
|||
add_definitions(-DHOST_FXR_PKG_VER="${CLI_CMAKE_HOST_FXR_VER}")
|
||||
endif()
|
||||
|
||||
if("${CLI_CMAKE_HOST_VER}" STREQUAL "")
|
||||
message(FATAL_ERROR "Dotnet host version is not specified")
|
||||
else()
|
||||
add_definitions(-DHOST_PKG_VER="${CLI_CMAKE_HOST_VER}")
|
||||
endif()
|
||||
|
||||
if("${CLI_CMAKE_PKG_RID}" STREQUAL "")
|
||||
message(FATAL_ERROR "A minimum supported package rid is not specified (ex: win7-x86 or ubuntu.14.04-x64, osx.10.10-x64, rhel.7-x64)")
|
||||
else()
|
||||
|
|
|
@ -86,6 +86,17 @@ int run(const int argc, const pal::char_t* argv[])
|
|||
return code;
|
||||
}
|
||||
|
||||
static char sccsid[] = "@(#)" \
|
||||
"version: " \
|
||||
HOST_PKG_VER \
|
||||
"; commit: " \
|
||||
REPO_COMMIT_HASH \
|
||||
"; built: " \
|
||||
__DATE__ \
|
||||
" " \
|
||||
__TIME__ \
|
||||
;
|
||||
|
||||
#if defined(_WIN32)
|
||||
int __cdecl wmain(const int argc, const pal::char_t* argv[])
|
||||
#else
|
||||
|
@ -96,7 +107,7 @@ int main(const int argc, const pal::char_t* argv[])
|
|||
|
||||
if (trace::is_enabled())
|
||||
{
|
||||
trace::info(_X("--- Invoked dotnet [commit hash: %s] main = {"), _STRINGIFY(REPO_COMMIT_HASH));
|
||||
trace::info(_X("--- Invoked dotnet [version: %s, commit hash: %s] main = {"), _STRINGIFY(HOST_PKG_VER), _STRINGIFY(REPO_COMMIT_HASH));
|
||||
for (int i = 0; i < argc; ++i)
|
||||
{
|
||||
trace::info(_X("%s"), argv[i]);
|
||||
|
|
Loading…
Add table
Reference in a new issue