From c334ba89ada065be74fbe449e115dc56ab51dd38 Mon Sep 17 00:00:00 2001 From: Gautham B A Date: Tue, 30 Aug 2022 22:41:03 +0530 Subject: [PATCH] HADOOP-18428. Parameterize platform toolset version (#4815) * This PR adds an option use.platformToolsetVersion that makes the build systems to use this platform toolset version. * This also makes sure that win-vs-upgrade.cmd does not get executed when the use.platformToolsetVersion option is specified. --- hadoop-common-project/hadoop-common/pom.xml | 84 +++++++++++++++++++++ 1 file changed, 84 insertions(+) diff --git a/hadoop-common-project/hadoop-common/pom.xml b/hadoop-common-project/hadoop-common/pom.xml index 937015ed668..5b5ffe1b006 100644 --- a/hadoop-common-project/hadoop-common/pom.xml +++ b/hadoop-common-project/hadoop-common/pom.xml @@ -841,6 +841,36 @@ + + + org.apache.maven.plugins + maven-antrun-plugin + 1.8 + + + validate + + run + + + true + + + + + + + + + Skip platform toolset version detection = ${skip.platformToolsetDetection} + + + + + org.codehaus.mojo exec-maven-plugin @@ -852,6 +882,7 @@ exec + ${skip.platformToolsetDetection} ${basedir}\..\..\dev-support\bin\win-vs-upgrade.cmd ${basedir}\src\main\winutils @@ -866,6 +897,7 @@ exec + ${skip.platformToolsetDetection} msbuild ${basedir}/src/main/winutils/winutils.sln @@ -878,6 +910,27 @@ + + compile-ms-winutils-using-build-tools + compile + + exec + + + ${skip.platformToolsetDetection.negated} + msbuild + + ${basedir}/src/main/winutils/winutils.sln + /nologo + /p:Configuration=Release + /p:OutDir=${project.build.directory}/bin/ + /p:IntermediateOutputPath=${project.build.directory}/winutils/ + /p:WsceConfigDir=${wsce.config.dir} + /p:WsceConfigFile=${wsce.config.file} + /p:PlatformToolset=${use.platformToolsetVersion} + + + convert-ms-native-dll generate-sources @@ -885,6 +938,7 @@ exec + ${skip.platformToolsetDetection} ${basedir}\..\..\dev-support\bin\win-vs-upgrade.cmd ${basedir}\src\main\native @@ -899,6 +953,7 @@ exec + ${skip.platformToolsetDetection} msbuild ${basedir}/src/main/native/native.sln @@ -919,6 +974,35 @@ + + compile-ms-native-dll-using-build-tools + compile + + exec + + + ${skip.platformToolsetDetection.negated} + msbuild + + ${basedir}/src/main/native/native.sln + /nologo + /p:Configuration=Release + /p:OutDir=${project.build.directory}/bin/ + /p:CustomZstdPrefix=${zstd.prefix} + /p:CustomZstdLib=${zstd.lib} + /p:CustomZstdInclude=${zstd.include} + /p:RequireZstd=${require.zstd} + /p:CustomOpensslPrefix=${openssl.prefix} + /p:CustomOpensslLib=${openssl.lib} + /p:CustomOpensslInclude=${openssl.include} + /p:RequireOpenssl=${require.openssl} + /p:RequireIsal=${require.isal} + /p:CustomIsalPrefix=${isal.prefix} + /p:CustomIsalLib=${isal.lib} + /p:PlatformToolset=${use.platformToolsetVersion} + + +