[aws-sdk-cpp] [openssl] Fix iOS build (#17338)

* Add curl try_compile parameters
Don't set compiler when compiling for iOS

* Update OpenSSL and AWS SDK for C++ port versions

* [vcpkg baseline][marble] Disable find I18n

* update version record

* Update versions/a-/aws-sdk-cpp.json

* Update versions/o-/openssl.json

* Fix port-versions after merging master branch

* Update versions/a-/aws-sdk-cpp.json

* Update versions/o-/openssl.json

* Fix merge conflicts

* Merge master branch

* Refactor OpenSSL's build script

* Refactor OpenSSL's build script

* Fix version

* Fix WASM build

* Fix version

* Fix disabled flags

* Disable treating warnings as errors

* Disable treating warnings as errors

* Fix hashes

* fix indentation

* [aws-sdk-cpp] use the powershell file to generate

* Fix versions after merging

* Fix versions after merging

Co-authored-by: Ahmed Yarub Hani Al Nuaimi <ahmed.alnuaimi@zwift.com>
Co-authored-by: JackBoosY <yuzaiyang@beyondsoft.com>
Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
This commit is contained in:
Ahmed Yarub Hani Al Nuaimi 2021-06-07 16:05:29 -03:00 committed by GitHub
parent b8dbf43b08
commit c1c253fabc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 214 additions and 86 deletions

View File

@ -16,5 +16,5 @@ index 249b7d5..41a31e2 100644
- list(APPEND AWS_C_FLAGS "${_FLAGS}")
-
else()
list(APPEND AWS_C_FLAGS -Wall -Werror -Wstrict-prototypes)
list(APPEND AWS_C_FLAGS -Wall -Wstrict-prototypes)

View File

@ -0,0 +1,12 @@
diff --git a/cmake/AwsCFlags.cmake b/cmake/AwsCFlags.cmake
--- a/cmake/AwsCFlags.cmake (revision 4a21a1c0757083a16497fea27886f5f20ccdf334)
+++ b/cmake/AwsCFlags.cmake (date 1622068907622)
@@ -48,7 +48,7 @@
list(APPEND AWS_C_FLAGS "${_FLAGS}")
else()
- list(APPEND AWS_C_FLAGS -Wall -Werror -Wstrict-prototypes)
+ list(APPEND AWS_C_FLAGS -Wall -Wstrict-prototypes)
if(NOT SET_PROPERTIES_NO_WEXTRA)
list(APPEND AWS_C_FLAGS -Wextra)

View File

@ -6,6 +6,7 @@ vcpkg_from_github(
HEAD_REF master
PATCHES
disable-error-4068.patch # This patch fixes dependency port compilation failure
disable_warnings_as_errors.patch # Ref https://github.com/awslabs/aws-c-common/pull/798
disable-internal-crt-option.patch # Disable internal crt option because vcpkg contains crt processing flow
fix-cmake-target-path.patch # Shared libraries and static libraries are not built at the same time
disable_outline_atomics.patch # Disables -moutline-atomics flag which is not supported for wasm32 and Android

View File

@ -47,9 +47,15 @@ endif()
if("application-insights" IN_LIST FEATURES)
list(APPEND BUILD_ONLY application-insights)
endif()
if("applicationcostprofiler" IN_LIST FEATURES)
list(APPEND BUILD_ONLY applicationcostprofiler)
endif()
if("appmesh" IN_LIST FEATURES)
list(APPEND BUILD_ONLY appmesh)
endif()
if("apprunner" IN_LIST FEATURES)
list(APPEND BUILD_ONLY apprunner)
endif()
if("appstream" IN_LIST FEATURES)
list(APPEND BUILD_ONLY appstream)
endif()
@ -293,9 +299,18 @@ endif()
if("events" IN_LIST FEATURES)
list(APPEND BUILD_ONLY events)
endif()
if("finspace" IN_LIST FEATURES)
list(APPEND BUILD_ONLY finspace)
endif()
if("finspace-data" IN_LIST FEATURES)
list(APPEND BUILD_ONLY finspace-data)
endif()
if("firehose" IN_LIST FEATURES)
list(APPEND BUILD_ONLY firehose)
endif()
if("fis" IN_LIST FEATURES)
list(APPEND BUILD_ONLY fis)
endif()
if("fms" IN_LIST FEATURES)
list(APPEND BUILD_ONLY fms)
endif()
@ -449,6 +464,12 @@ endif()
if("lex-models" IN_LIST FEATURES)
list(APPEND BUILD_ONLY lex-models)
endif()
if("lexv2-models" IN_LIST FEATURES)
list(APPEND BUILD_ONLY lexv2-models)
endif()
if("lexv2-runtime" IN_LIST FEATURES)
list(APPEND BUILD_ONLY lexv2-runtime)
endif()
if("license-manager" IN_LIST FEATURES)
list(APPEND BUILD_ONLY license-manager)
endif()
@ -461,6 +482,12 @@ endif()
if("logs" IN_LIST FEATURES)
list(APPEND BUILD_ONLY logs)
endif()
if("lookoutequipment" IN_LIST FEATURES)
list(APPEND BUILD_ONLY lookoutequipment)
endif()
if("lookoutmetrics" IN_LIST FEATURES)
list(APPEND BUILD_ONLY lookoutmetrics)
endif()
if("lookoutvision" IN_LIST FEATURES)
list(APPEND BUILD_ONLY lookoutvision)
endif()
@ -512,6 +539,9 @@ endif()
if("meteringmarketplace" IN_LIST FEATURES)
list(APPEND BUILD_ONLY meteringmarketplace)
endif()
if("mgn" IN_LIST FEATURES)
list(APPEND BUILD_ONLY mgn)
endif()
if("migrationhub-config" IN_LIST FEATURES)
list(APPEND BUILD_ONLY migrationhub-config)
endif()
@ -542,6 +572,9 @@ endif()
if("networkmanager" IN_LIST FEATURES)
list(APPEND BUILD_ONLY networkmanager)
endif()
if("nimble" IN_LIST FEATURES)
list(APPEND BUILD_ONLY nimble)
endif()
if("opsworks" IN_LIST FEATURES)
list(APPEND BUILD_ONLY opsworks)
endif()
@ -629,6 +662,9 @@ endif()
if("s3" IN_LIST FEATURES)
list(APPEND BUILD_ONLY s3)
endif()
if("s3-crt" IN_LIST FEATURES)
list(APPEND BUILD_ONLY s3-crt)
endif()
if("s3-encryption" IN_LIST FEATURES)
list(APPEND BUILD_ONLY s3-encryption)
endif()
@ -710,6 +746,12 @@ endif()
if("ssm" IN_LIST FEATURES)
list(APPEND BUILD_ONLY ssm)
endif()
if("ssm-contacts" IN_LIST FEATURES)
list(APPEND BUILD_ONLY ssm-contacts)
endif()
if("ssm-incidents" IN_LIST FEATURES)
list(APPEND BUILD_ONLY ssm-incidents)
endif()
if("sso" IN_LIST FEATURES)
list(APPEND BUILD_ONLY sso)
endif()

View File

@ -1,17 +1,34 @@
[CmdletBinding()]
param(
[Parameter(Mandatory=$true)][string]$ExtractedSources,
[Parameter(Mandatory=$true)][string]$ManifestIn,
[Parameter(Mandatory=$true)][string]$ManifestOut,
[Parameter(Mandatory=$true)][string]$CMakeFragmentFile,
[Parameter(Mandatory=$false)][string]$vcpkg = "vcpkg"
[Parameter(Mandatory=$true)][string]$SourcesRef,
[Parameter(Mandatory=$false)][string]$PortDirectory = $PSScriptRoot,
[Parameter(Mandatory=$false)][string]$vcpkg = "$PSScriptRoot/../../vcpkg"
)
$ErrorActionPreference = "Stop"
$ManifestIn = "$PortDirectory/vcpkg.in.json"
$ManifestOut = "$PortDirectory/vcpkg.json"
$CMakeFragmentFile = "$PortDirectory/compute_build_only.cmake"
$ExtractedSources = "${env:TEMP}/aws-sdk-cpp-generateFeatures-$SourcesRef"
if (-not (Test-Path $ExtractedSources)) {
if (Test-Path "$ExtractedSources.tmp") {
Remove-Item -Force "$ExtractedSources.tmp"
}
git clone "https://github.com/aws/aws-sdk-cpp" "$ExtractedSources.tmp" | Out-Host
git -c "$ExtractedSources.tmp" checkout $SourcesRef
Move-Item "$ExtractedSources.tmp" "$ExtractedSources"
}
Write-Host "Using sources directory: $ExtractedSources"
$subfolders = Get-Item $ExtractedSources\aws-cpp-sdk-*
$manifest = Get-Content $ManifestIn | ConvertFrom-Json
$manifest | Add-Member `
-NotePropertyName '$note' `
-NotePropertyValue 'Automatically generated by generateFeatures.ps1'
$manifest | Add-Member -NotePropertyName 'features' -NotePropertyValue @{}
$cmakefragmenttext = @("# Automatically generated by generateFeatures.ps1")
@ -53,4 +70,4 @@ foreach ($subfolder in $subfolders)
Write-Verbose ($cmakefragmenttext -join "`n")
[IO.File]::WriteAllText($CMakeFragmentFile, ($cmakefragmenttext -join "`n") +"`n")
vcpkg format-manifest --feature-flags=-manifests $ManifestOut
& $vcpkg format-manifest --feature-flags=-manifests $ManifestOut

View File

@ -1,7 +1,7 @@
{
"name": "aws-sdk-cpp",
"version": "1.8.126",
"port-version": 8,
"port-version": 10,
"description": "AWS SDK for C++",
"homepage": "https://github.com/aws/aws-sdk-cpp",
"dependencies": [

View File

@ -1,7 +1,8 @@
{
"$note": "Automatically generated by generateFeatures.ps1",
"name": "aws-sdk-cpp",
"version": "1.8.126",
"port-version": 9,
"port-version": 10,
"description": "AWS SDK for C++",
"homepage": "https://github.com/aws/aws-sdk-cpp",
"dependencies": [
@ -70,9 +71,15 @@
"application-insights": {
"description": "C++ SDK for the AWS application-insights service"
},
"applicationcostprofiler": {
"description": "C++ SDK for the AWS applicationcostprofiler service"
},
"appmesh": {
"description": "C++ SDK for the AWS appmesh service"
},
"apprunner": {
"description": "C++ SDK for the AWS apprunner service"
},
"appstream": {
"description": "C++ SDK for the AWS appstream service"
},
@ -316,9 +323,18 @@
"events": {
"description": "C++ SDK for the AWS events service"
},
"finspace": {
"description": "C++ SDK for the AWS finspace service"
},
"finspace-data": {
"description": "C++ SDK for the AWS finspace-data service"
},
"firehose": {
"description": "C++ SDK for the AWS firehose service"
},
"fis": {
"description": "C++ SDK for the AWS fis service"
},
"fms": {
"description": "C++ SDK for the AWS fms service"
},
@ -472,6 +488,12 @@
"lex-models": {
"description": "C++ SDK for the AWS lex-models service"
},
"lexv2-models": {
"description": "C++ SDK for the AWS lexv2-models service"
},
"lexv2-runtime": {
"description": "C++ SDK for the AWS lexv2-runtime service"
},
"license-manager": {
"description": "C++ SDK for the AWS license-manager service"
},
@ -484,6 +506,12 @@
"logs": {
"description": "C++ SDK for the AWS logs service"
},
"lookoutequipment": {
"description": "C++ SDK for the AWS lookoutequipment service"
},
"lookoutmetrics": {
"description": "C++ SDK for the AWS lookoutmetrics service"
},
"lookoutvision": {
"description": "C++ SDK for the AWS lookoutvision service"
},
@ -535,6 +563,9 @@
"meteringmarketplace": {
"description": "C++ SDK for the AWS meteringmarketplace service"
},
"mgn": {
"description": "C++ SDK for the AWS mgn service"
},
"migrationhub-config": {
"description": "C++ SDK for the AWS migrationhub-config service"
},
@ -565,6 +596,9 @@
"networkmanager": {
"description": "C++ SDK for the AWS networkmanager service"
},
"nimble": {
"description": "C++ SDK for the AWS nimble service"
},
"opsworks": {
"description": "C++ SDK for the AWS opsworks service"
},
@ -652,6 +686,9 @@
"s3": {
"description": "C++ SDK for the AWS s3 service"
},
"s3-crt": {
"description": "C++ SDK for the AWS s3-crt service"
},
"s3-encryption": {
"description": "C++ SDK for the AWS s3-encryption service"
},
@ -733,6 +770,12 @@
"ssm": {
"description": "C++ SDK for the AWS ssm service"
},
"ssm-contacts": {
"description": "C++ SDK for the AWS ssm-contacts service"
},
"ssm-incidents": {
"description": "C++ SDK for the AWS ssm-incidents service"
},
"sso": {
"description": "C++ SDK for the AWS sso service"
},

View File

@ -149,20 +149,14 @@ else()
set(PATH_VAR ":$ENV{PATH}")
endif()
if(IOS)
add_custom_command(
OUTPUT "${BUILDDIR}/Makefile"
COMMAND "${PERL}" Configure
${SHARED}
${DISABLES}
${PLATFORM}
"--prefix=${CMAKE_INSTALL_PREFIX}"
"--openssldir=/etc/ssl"
COMMAND "${CMAKE_COMMAND}" "-DDIR=${BUILDDIR}" -P "${CMAKE_CURRENT_LIST_DIR}/remove-deps.cmake"
COMMAND ${ENV_COMMAND} "PATH=${MSYS_BIN_DIR}${PATH_VAR}"
VERBATIM
WORKING_DIRECTORY "${BUILDDIR}"
)
elseif(EMSCRIPTEN)
if(NOT IOS)
add_custom_command(
OUTPUT "${BUILDDIR}/Makefile"
COMMAND ${ENV_COMMAND} CC=${CMAKE_C_COMPILER}
@ -171,9 +165,12 @@ elseif(EMSCRIPTEN)
COMMAND ${ENV_COMMAND} RANLIB=${CMAKE_RANLIB}
COMMAND ${ENV_COMMAND} MAKE=${MAKE}
COMMAND ${ENV_COMMAND} MAKEDEPPROG=${CMAKE_C_COMPILER}
COMMAND ${ENV_COMMAND} "PATH=${MSYS_BIN_DIR}${PATH_VAR}"
COMMAND "$ENV{EMSDK}/upstream/emscripten/emconfigure" ./config
${SHARED}
VERBATIM
APPEND
)
if(EMSCRIPTEN)
list(APPEND DISABLES
threads
no-engine
no-dso
@ -181,26 +178,9 @@ elseif(EMSCRIPTEN)
no-shared
no-sse2
no-srtp
${DISABLES}
"--prefix=${CMAKE_INSTALL_PREFIX}"
"--openssldir=/etc/ssl"
"--cross-compile-prefix=\"/\""
COMMAND "${CMAKE_COMMAND}" "-DDIR=${BUILDDIR}" -P "${CMAKE_CURRENT_LIST_DIR}/remove-deps.cmake"
VERBATIM
WORKING_DIRECTORY "${BUILDDIR}"
)
else()
add_custom_command(
OUTPUT "${BUILDDIR}/Makefile"
COMMAND ${ENV_COMMAND} CC=${CMAKE_C_COMPILER}
COMMAND ${ENV_COMMAND} AR=${CMAKE_AR}
COMMAND ${ENV_COMMAND} LD=${CMAKE_LINKER}
COMMAND ${ENV_COMMAND} RANLIB=${CMAKE_RANLIB}
COMMAND ${ENV_COMMAND} MAKE=${MAKE}
COMMAND ${ENV_COMMAND} MAKEDEPPROG=${CMAKE_C_COMPILER}
COMMAND ${ENV_COMMAND} "PATH=${MSYS_BIN_DIR}${PATH_VAR}"
COMMAND "${PERL}" Configure
${SHARED}
list(APPEND DISABLES
enable-static-engine
no-zlib
no-ssl2
@ -208,30 +188,46 @@ else()
no-cast
no-seed
no-md2
no-tests
${DISABLES}
${PLATFORM}
"--prefix=${CMAKE_INSTALL_PREFIX}"
"--openssldir=/etc/ssl"
${CFLAGS}
COMMAND "${CMAKE_COMMAND}" "-DDIR=${BUILDDIR}" -P "${CMAKE_CURRENT_LIST_DIR}/remove-deps.cmake"
VERBATIM
WORKING_DIRECTORY "${BUILDDIR}"
)
no-tests)
endif()
endif()
if(EMSCRIPTEN)
add_custom_command(
OUTPUT "${BUILDDIR}/Makefile"
COMMAND "$ENV{EMSDK}/upstream/emscripten/emconfigure" ./config
${SHARED}
${DISABLES}
"--prefix=${CMAKE_INSTALL_PREFIX}"
"--openssldir=/etc/ssl"
"--cross-compile-prefix=\"/\""
VERBATIM
APPEND
)
add_custom_target(build_libs ALL
COMMAND ${ENV_COMMAND} "PATH=${MSYS_BIN_DIR}${PATH_VAR}"
COMMAND "${CMAKE_COMMAND}" -E touch "${BUILDDIR}/krb5.h"
COMMAND "${MAKE}" make build_libs
COMMAND "${MAKE}" make -j ${VCPKG_CONCURRENCY} build_libs
VERBATIM
WORKING_DIRECTORY "${BUILDDIR}"
DEPENDS "${BUILDDIR}/Makefile"
BYPRODUCTS ${INSTALL_LIBS}
)
else()
add_custom_command(
OUTPUT "${BUILDDIR}/Makefile"
COMMAND "${PERL}" Configure
${SHARED}
${DISABLES}
${PLATFORM}
"--prefix=${CMAKE_INSTALL_PREFIX}"
"--openssldir=/etc/ssl"
${CFLAGS}
VERBATIM
APPEND
)
add_custom_target(build_libs ALL
COMMAND ${ENV_COMMAND} "PATH=${MSYS_BIN_DIR}${PATH_VAR}"
COMMAND "${CMAKE_COMMAND}" -E touch "${BUILDDIR}/krb5.h"
@ -243,6 +239,13 @@ else()
)
endif()
add_custom_command(
OUTPUT "${BUILDDIR}/Makefile"
COMMAND "${CMAKE_COMMAND}" "-DDIR=${BUILDDIR}" -P "${CMAKE_CURRENT_LIST_DIR}/remove-deps.cmake"
VERBATIM
APPEND
)
if((CMAKE_SYSTEM_NAME STREQUAL "Darwin" OR CMAKE_SYSTEM_NAME STREQUAL "iOS") AND BUILD_SHARED_LIBS)
if(DEFINED CMAKE_INSTALL_NAME_DIR)
set(ID_PREFIX "${CMAKE_INSTALL_NAME_DIR}")

View File

@ -1,7 +1,7 @@
{
"name": "openssl",
"version-string": "1.1.1k",
"port-version": 3,
"port-version": 4,
"description": "OpenSSL is an open source project that provides a robust, commercial-grade, and full-featured toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols. It is also a general-purpose cryptography library.",
"homepage": "https://www.openssl.org"
}

View File

@ -1,7 +1,7 @@
{
"versions": [
{
"git-tree": "afa3b695905711c9699c03d94a77f222396e3346",
"git-tree": "18178de87240278976fc659b52d8a86dbda31329",
"version-string": "0.4.56",
"port-version": 1
},

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "13f162ba967b3eaa61320e2062eabd924e1f7a65",
"version": "1.8.126",
"port-version": 10
},
{
"git-tree": "c23d66191b235f6f388187395b62f38b8e6e35f5",
"version": "1.8.126",

View File

@ -250,7 +250,7 @@
},
"aws-sdk-cpp": {
"baseline": "1.8.126",
"port-version": 9
"port-version": 10
},
"azmq": {
"baseline": "2020-03-03",
@ -4586,7 +4586,7 @@
},
"openssl": {
"baseline": "1.1.1k",
"port-version": 3
"port-version": 4
},
"openssl-unix": {
"baseline": "1.1.1h",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "029caa3289fc2b99107efaf987c23fd65f5eac97",
"version-string": "1.1.1k",
"port-version": 4
},
{
"git-tree": "9f4e7983d2a78b8e865d0444d90ef19ce3a9636c",
"version-string": "1.1.1k",