awslabs / aws-sdk-swift

Apache License 2.0
359 stars 71 forks source link

Models may fail compile on watchOS due to object file size #1283

Open jbelkins opened 6 months ago

jbelkins commented 6 months ago

Describe the bug

watchOS support requires that the SDK compile for 32-bit. The LLVM compiler has a limitation that a 32-bit object file cannot exceed 16MB in size. Several of our model files for various AWS services will hit this limit.

See #1279 for a user-reported example of this. The immediate fix in this case was to change the settings for writing debug information on compile, but since this affects the debuggability of SDK code and has to be applied by the customer (not automatically by the SDK), this solution is not ideal.

Expected Behavior

All AWS services should compile for watch without issue.

Current Behavior

The AWS Pinpoint service (and likely others) fail to compile with messages as listed in #1279.

Reproduction Steps

See the reproduction steps in #1279.

Possible Solution

Additional Information/Context

No response

AWS SWIFT SDK version used

0.33.0

Compiler and Version used

Xcode 15.1

Operating System and version

macOS 14.2.1

jbelkins commented 2 months ago

Perform investigation to see if this can be done with preprocessor directives. Followup may then be ticketed and should be non-GA because not a breaking change.