Conversation
Replace cJSON, tinyXML2, and system zlib with CRT-based alternatives in the modern build path (LEGACY_BUILD=OFF): - 2a: Replace cJSON with aws-c-common JSON parser (aws/common/json.h) - New: source/utils/json/JsonSerializer_crt.cpp - New: source/utils/Document_crt.cpp - Headers conditionally use aws_json_value* via NON_LEGACY_BUILD - 2b: Replace tinyXML2 with aws-c-common XML parser (SAX-to-DOM bridge) - New: source/utils/xml/XmlSerializer_crt.cpp - Header conditionally uses shared_ptr-based DOM tree - 2c: Replace system zlib with FetchContent-bundled zlib - Compression always available without system install - AWS_SDK_USE_INSTALLED_ZLIB=ON for system zlib opt-in - 2d: Replace embedded gtest with FetchContent googletest - New: cmake/fetch_test_dependencies.cmake - Gated behind AWS_SDK_ENABLE_TESTING - AWS_SDK_USE_INSTALLED_GTEST=ON for system gtest opt-in The legacy build path remains unchanged. All changes are gated behind the NON_LEGACY_BUILD compile definition.
Add remaining Phase 1 files that were not previously committed: - cmake/aws_sdk_compiler.cmake: Per-target compiler flags - cmake/aws_sdk_options.cmake: Centralized options with AWS_SDK_ prefix - cmake/fetch_dependencies.cmake: FetchContent-based CRT dependency - src/aws-cpp-sdk-core/CMakeLists.txt: Dispatch guard to route to CMakeLists.modern.txt when LEGACY_BUILD=OFF
Implement Phase 3 of the build modernization: - Create cmake/aws_sdk_service_clients.cmake with functions to discover and build generated service clients filtered by AWS_SDK_BUILD_ONLY - Make AWS_SDK_BUILD_ONLY required with a clear FATAL_ERROR message - Wire up high-level SDKs (transfer, s3-encryption, identity-management, queues, text-to-speech, access-management) with dependency resolution from sdksCommon.cmake - Fix symbol visibility: remove global hidden visibility preset that conflicts with the SDK's export mechanism on non-Windows platforms - Fix DLL export macro to only apply on Windows (non-Windows uses the template instantiation guards in generated endpoint provider sources) Tested with -DAWS_SDK_BUILD_ONLY=s3 - both core and S3 build and link successfully as shared libraries. cr: https://code.amazon.com/reviews/CR-272324241
Gate all test logic behind AWS_SDK_ENABLE_TESTING option. Port testing-resources and aws-cpp-sdk-core-tests to the modern build path using GTest::gtest from FetchContent instead of embedded gtest source. - Add CMakeLists.modern.txt for tests/testing-resources - Add CMakeLists.modern.txt for tests/aws-cpp-sdk-core-tests - Add dispatch guards to existing CMakeLists.txt files - Wire up test subdirectories in root CMakeLists.txt modern path - Fix InterceptorTest.cpp Optional<String> comparison with gtest - Verify no gtest symbols leak into SDK shared libraries
Add cmake/aws_sdk_packaging.cmake which configures CPack to generate
TGZ and ZIP source tarballs via the package_source target. Include it
at the bottom of the modern (LEGACY_BUILD=OFF) build path.
Users can now run:
cmake --build <build-dir> --target package_source
to produce aws-sdk-cpp-<version>-Source.{tar.gz,zip} for GitHub Releases.
Add tools/CI/build-matrix.json defining platform configurations (AL2, Ubuntu, macOS, Windows, Android) and a GitHub Actions workflow that reads the matrix and fans out parallel builds with LEGACY_BUILD=OFF. Triggered on changes to CMakeLists.txt, cmake/**, and core sources.
The modern build path is now the default. Users who need the legacy path can still opt in with -DLEGACY_BUILD=ON for one release cycle. The legacy path will be removed entirely in 1.12.0.
- Change LEGACY_BUILD default to ON for safe migration - Add install/export rules for service clients (find_package support) - Fix cross-compilation: use target platform vars instead of CMAKE_HOST_* - Pin CRT to commit SHA (bd19f64) for supply chain security - Add find_package(AWSSDK) backward-compatibility forwarding shim - Update README with Modern Build section and FetchContent example
- Remove global add_compile_definitions leak in aws_sdk_platform.cmake; CRT HTTP defines now applied per-target only - Add per-target hidden symbol visibility (CXX_VISIBILITY_PRESET hidden) - Pin GTest to commit SHA (f8d7d77c) instead of mutable tag - Replace zlib FetchContent with CRT compression (aws-c-compression) - Add C++14 minimum validation guard in aws_sdk_options.cmake - Add CMP0091 policy guard for MSVC_RUNTIME_LIBRARY compatibility - Rewrite CI workflow with inline 12-config matrix and offline build job - Create docs/Migration_Guide.md with deprecation timeline and before/after examples for legacy-to-modern migration
…tecture docs - Add early FATAL_ERROR if AWS_SDK_BUILD_ONLY is empty, before CRT fetch (fail fast instead of waiting for download) - Add cmake/modern/symbol_check.cmake: post-build verification that no gtest/tinyxml2/cjson symbols leak from installed artifacts (design doc requirement aws#10) - Wire symbol check into modern build path for aws-cpp-sdk-core - Add cmake/README.md documenting modern build architecture, module responsibilities, and consumption patterns
- Disable ENABLED_ZLIB_REQUEST_COMPRESSION define (source calls zlib
directly; CRT compression adapter not yet implemented)
- Restrict hidden visibility to Windows only (Unix SDK headers lack
visibility("default") annotations on AWS_CORE_API)
- Fix symbol_check.cmake to use add_test instead of POST_BUILD
(target created in subdirectory, not accessible from root)
- Add enable_testing() before symbol check registration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue #, if available:
#1888
Description of changes:
Addresses gaps in the modern (non-legacy) build path (-DLEGACY_BUILD=OFF) identified through a comprehensive multi-agent architecture review:
Build correctness:
ENABLED_REQUEST_COMPRESSION still set for future CRT-based implementation.
Supply chain security:
CI & quality:
Documentation:
Check all that applies:
Check which platforms you have built SDK on to verify the correctness of this PR.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.