File tree Expand file tree Collapse file tree 10 files changed +16
-6
lines changed
nativeaot/BuildIntegration Expand file tree Collapse file tree 10 files changed +16
-6
lines changed Original file line number Diff line number Diff line change 311311 '$(OfficialBuildId)' == ''" >true</DisableSourceLink >
312312 <!-- Runtime doesn't support Arcade-driven target framework filtering. -->
313313 <NoTargetFrameworkFiltering >true</NoTargetFrameworkFiltering >
314+ <!-- NativeAOT doesn't use the linker flags required for linking with non-portable OpenSSL builds. -->
315+ <PortableSsl Condition =" '$(NativeAotSupported)' == 'true'" >true</PortableSsl >
314316 </PropertyGroup >
315317
316318 <!-- RepositoryEngineeringDir isn't set when Installer tests import this file. -->
Original file line number Diff line number Diff line change 3737 <InnerBuildArgs >$(InnerBuildArgs) --nodereuse false</InnerBuildArgs >
3838 <InnerBuildArgs >$(InnerBuildArgs) --warnAsError false</InnerBuildArgs >
3939 <InnerBuildArgs >$(InnerBuildArgs) --outputrid $(TargetRid)</InnerBuildArgs >
40+ <InnerBuildArgs Condition =" '$(NativeAotSupported)' != ''" >$(InnerBuildArgs) /p:NativeAotSupported=$(NativeAotSupported)</InnerBuildArgs >
4041 <!-- PackageOS and ToolsOS control the rids of prebuilts consumed by the build.
4142 They are set to RuntimeOS so they match with the build SDK rid. -->
4243 <InnerBuildArgs Condition =" '$(RuntimeOS)' != ''" >$(InnerBuildArgs) /p:PackageOS=$(RuntimeOS) /p:ToolsOS=$(RuntimeOS)</InnerBuildArgs >
Original file line number Diff line number Diff line change @@ -81,6 +81,7 @@ usage()
8181 echo " --gcc Optional argument to build using gcc in PATH (default)."
8282 echo " --gccx.y Optional argument to build using gcc version x.y."
8383 echo " --portablebuild Optional argument: set to false to force a non-portable build."
84+ echo " --portablessl Optional argument: set to true to force a portable OpenSSL build."
8485 echo " --keepnativesymbols Optional argument: set to true to keep native symbols/debuginfo in generated binaries."
8586 echo " --ninja Optional argument: set to true to use Ninja instead of Make to run the native build."
8687 echo " --pgoinstrument Optional argument: build PGO-instrumented runtime"
Original file line number Diff line number Diff line change @@ -411,6 +411,10 @@ while :; do
411411 __PortableBuild=0
412412 ;;
413413
414+ portablessl=true|-portablebuild=true)
415+ __PortableSsl=1
416+ ;;
417+
414418 release|-release)
415419 __BuildType=Release
416420 ;;
@@ -511,6 +515,8 @@ if [[ "$__PortableBuild" == 0 ]]; then
511515 __CommonMSBuildArgs=" $__CommonMSBuildArgs /p:PortableBuild=false"
512516fi
513517
518+ __PortableSsl=" ${__PortableSsl:- $__PortableBuild } "
519+
514520if [[ " $__TargetArch " == wasm ]]; then
515521 # nothing to do here
516522 true
@@ -524,7 +530,7 @@ elif [[ "$__TargetOS" == android ]]; then
524530 # nothing to do here
525531 true
526532else
527- __CMakeArgs=" -DFEATURE_DISTRO_AGNOSTIC_SSL=$__PortableBuild $__CMakeArgs "
533+ __CMakeArgs=" -DFEATURE_DISTRO_AGNOSTIC_SSL=$__PortableSsl $__CMakeArgs "
528534fi
529535
530536# Configure environment if we are doing a cross compile.
Original file line number Diff line number Diff line change @@ -136,9 +136,6 @@ The .NET Foundation licenses this file to you under the MIT license.
136136 <LinkerArg Include =" -static-pie" Condition =" '$(StaticExecutable)' == 'true' and '$(PositionIndependentExecutable)' != 'false'" />
137137 <LinkerArg Include =" -dynamiclib" Condition =" '$(_IsApplePlatform)' == 'true' and '$(NativeLib)' == 'Shared'" />
138138 <LinkerArg Include =" -shared" Condition =" '$(_IsApplePlatform)' != 'true' and '$(NativeLib)' == 'Shared'" />
139- <!-- source-build links directly with openssl (-lssl -lcrypto) -->
140- <LinkerArg Include =" -lssl" Condition =" '$(_targetOS)' == 'linux'" />
141- <LinkerArg Include =" -lcrypto" Condition =" '$(_targetOS)' == 'linux'" />
142139 <!-- binskim warning BA3001 PIE disabled on executable -->
143140 <LinkerArg Include =" -pie -Wl,-pie" Condition =" '$(_IsApplePlatform)' != 'true' and '$(NativeLib)' == '' and '$(StaticExecutable)' != 'true' and '$(PositionIndependentExecutable)' != 'false'" />
144141 <LinkerArg Include =" -Wl,-no-pie" Condition =" '$(_IsApplePlatform)' != 'true' and '$(NativeLib)' == '' and '$(StaticExecutable)' != 'true' and '$(PositionIndependentExecutable)' == 'false'" />
Original file line number Diff line number Diff line change 3030 <_CoreClrBuildArg Condition =" '$(ContinuousIntegrationBuild)' == 'true'" Include =" -ci" />
3131 <_CoreClrBuildArg Condition =" '$(CrossBuild)' == 'true'" Include =" -cross" />
3232 <_CoreClrBuildArg Condition =" '$(PortableBuild)' != 'true'" Include =" -portablebuild=false" />
33+ <_CoreClrBuildArg Condition =" '$(PortableSsl)' == 'true'" Include =" -portablessl=true" />
3334 <_CoreClrBuildArg Condition =" '$(KeepNativeSymbols)' != 'false'" Include =" -keepnativesymbols" />
3435 <_CoreClrBuildArg Include =" -os $(_BuildNativeTargetOS)" />
3536
Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ export __BinDir __IntermediatesDir __RuntimeFlavor
8282__CMakeArgs=" -DCLI_CMAKE_HOST_VER=\" $__host_ver \" -DCLI_CMAKE_COMMON_HOST_VER=\" $__apphost_ver \" -DCLI_CMAKE_HOST_FXR_VER=\" $__fxr_ver \" $__CMakeArgs "
8383__CMakeArgs=" -DCLI_CMAKE_HOST_POLICY_VER=\" $__policy_ver \" -DCLI_CMAKE_PKG_RID=\" $__OutputRid \" -DCLI_CMAKE_FALLBACK_OS=\" $__HostFallbackOS \" -DCLI_CMAKE_COMMIT_HASH=\" $__commit_hash \" $__CMakeArgs "
8484__CMakeArgs=" -DRUNTIME_FLAVOR=\" $__RuntimeFlavor \" $__CMakeArgs "
85- __CMakeArgs=" -DFEATURE_DISTRO_AGNOSTIC_SSL=$__PortableBuild $__CMakeArgs "
85+ __CMakeArgs=" -DFEATURE_DISTRO_AGNOSTIC_SSL=$__PortableSsl $__CMakeArgs "
8686
8787# Specify path to be set for CMAKE_INSTALL_PREFIX.
8888# This is where all built CoreClr libraries will copied to.
Original file line number Diff line number Diff line change 7575 <BuildArgs >$(BuildArgs) -cmakeargs "-DVERSION_FILE_PATH=$(NativeVersionFile)"</BuildArgs >
7676 <BuildArgs Condition =" '$(ConfigureOnly)' == 'true'" >$(BuildArgs) -configureonly</BuildArgs >
7777 <BuildArgs Condition =" '$(PortableBuild)' != 'true'" >$(BuildArgs) -portablebuild=false</BuildArgs >
78+ <BuildArgs Condition =" '$(PortableSsl)' == 'true'" >$(BuildArgs) -portablessl=true</BuildArgs >
7879 <BuildArgs Condition =" '$(KeepNativeSymbols)' != 'false'" >$(BuildArgs) -keepnativesymbols</BuildArgs >
7980 <BuildArgs Condition =" '$(CrossBuild)' == 'true'" >$(BuildArgs) -cross</BuildArgs >
8081 <BuildArgs Condition =" '$(Compiler)' != ''" >$(BuildArgs) $(Compiler)</BuildArgs >
Original file line number Diff line number Diff line change 4141 -->
4242 <_ProcessorCountArg > -numproc $(MSBuildNodeCount)</_ProcessorCountArg >
4343 <_PortableBuildArg Condition =" '$(PortableBuild)' != 'true'" > -portablebuild=false</_PortableBuildArg >
44+ <_PortableBuildArg Condition =" '$(PortableSsl)' == 'true'" > -portablessl=true</_PortableBuildArg >
4445 <_CrossBuildArg Condition =" '$(CrossBuild)' == 'true'" > -cross</_CrossBuildArg >
4546 <_KeepNativeSymbolsBuildArg Condition =" '$(KeepNativeSymbols)' != 'false'" > -keepnativesymbols</_KeepNativeSymbolsBuildArg >
4647 <_CMakeArgs Condition =" '$(CMakeArgs)' != ''" > -cmakeargs "$(CMakeArgs)"</_CMakeArgs >
Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ elif [[ "$__TargetOS" == android && -z "$ROOTFS_DIR" ]]; then
8787 # nothing to do here
8888 true
8989else
90- __CMakeArgs=" -DFEATURE_DISTRO_AGNOSTIC_SSL=$__PortableBuild $__CMakeArgs "
90+ __CMakeArgs=" -DFEATURE_DISTRO_AGNOSTIC_SSL=$__PortableSsl $__CMakeArgs "
9191 __CMakeArgs=" -DCMAKE_STATIC_LIB_LINK=$__StaticLibLink $__CMakeArgs "
9292
9393 if [[ " $__TargetOS " != linux-bionic && " $__TargetArch " != x86 && " $__TargetArch " != x64 && " $__TargetArch " != " $__HostArch " ]]; then
You can’t perform that action at this time.
0 commit comments