Skip to content

Commit d1bbbe0

Browse files
authored
fix(auth): Build failure due to unsafe flag (#2465)
1 parent c7e2779 commit d1bbbe0

File tree

4 files changed

+16
-8
lines changed

4 files changed

+16
-8
lines changed

.swiftpm/xcode/xcshareddata/xcschemes/AWSCognitoAuthPlugin.xcscheme

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,16 @@
4343
</Test>
4444
</SkippedTests>
4545
</TestableReference>
46+
<TestableReference
47+
skipped = "NO">
48+
<BuildableReference
49+
BuildableIdentifier = "primary"
50+
BlueprintIdentifier = "AmplifyBigIntegerTests"
51+
BuildableName = "AmplifyBigIntegerTests"
52+
BlueprintName = "AmplifyBigIntegerTests"
53+
ReferencedContainer = "container:">
54+
</BuildableReference>
55+
</TestableReference>
4656
</Testables>
4757
</TestAction>
4858
<LaunchAction
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
# libtommath
22

3-
This is the fork for [LibTomMath](https://github.com/libtom/libtommath). Fork is created from the v1.2.0 at the commit 6ca6898bf37f583c4cc9943441cd60dd69f4b8f2 and renamed files and variables with `amplify` prefix.
3+
This is the fork for [LibTomMath](https://github.com/libtom/libtommath). Fork is created from the v1.2.0 at the commit 6ca6898bf37f583c4cc9943441cd60dd69f4b8f2
4+
With the following changes:
5+
6+
- Renamed files and variables with `amplify` prefix.
7+
- Removed unsupported platform code from Sources/libtommath/amplify_bn_s_mp_rand_platform.c
8+
- Removed compile time warning due to unreachable code in Sources/libtommath/amplify_bn_mp_set_double.c

AmplifyPlugins/Auth/Sources/libtommath/amplify_bn_s_mp_rand_platform.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,11 +138,7 @@ amplify_mp_err s_read_ltm_rng(void *p, size_t n);
138138
amplify_mp_err amplify_s_mp_rand_platform(void *p, size_t n)
139139
{
140140
amplify_mp_err err = AMPLIFY_MP_ERR;
141-
if ((err != AMPLIFY_MP_OKAY) && AMPLIFY_MP_HAS(S_READ_ARC4RANDOM)) err = s_read_arc4random(p, n);
142-
if ((err != AMPLIFY_MP_OKAY) && AMPLIFY_MP_HAS(S_READ_WINCSP)) err = s_read_wincsp(p, n);
143-
if ((err != AMPLIFY_MP_OKAY) && AMPLIFY_MP_HAS(S_READ_GETRANDOM)) err = s_read_getrandom(p, n);
144141
if ((err != AMPLIFY_MP_OKAY) && AMPLIFY_MP_HAS(S_READ_URANDOM)) err = s_read_urandom(p, n);
145-
if ((err != AMPLIFY_MP_OKAY) && AMPLIFY_MP_HAS(S_READ_LTM_RNG)) err = s_read_ltm_rng(p, n);
146142
return err;
147143
}
148144

Package.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,6 @@ let authTargets: [Target] = [
160160
"changes.txt",
161161
"LICENSE",
162162
"README.md"
163-
],
164-
cSettings: [
165-
.unsafeFlags(["-flto=thin"]) // for Dead Code Elimination
166163
]
167164
),
168165
.testTarget(

0 commit comments

Comments
 (0)