Skip to content

Commit 23f6974

Browse files
fix: SWIFT_OPTIMIZATION_LEVEL -O not -Owholemodule (#954)
1 parent 5b3cc97 commit 23f6974

File tree

10 files changed

+20
-20
lines changed

10 files changed

+20
-20
lines changed

Fixtures/WithoutWorkspace/WithoutWorkspace.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@
359359
"watchsimulator",
360360
);
361361
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "SWIFT_PACKAGE";
362-
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
362+
SWIFT_OPTIMIZATION_LEVEL = "-O";
363363
USE_HEADERMAP = "NO";
364364
};
365365
name = "Release";

Fixtures/Xcode16ProjectReferenceOrder/Test.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@
417417
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES;
418418
SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO;
419419
SWIFT_COMPILATION_MODE = wholemodule;
420-
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
420+
SWIFT_OPTIMIZATION_LEVEL = "-O";
421421
SWIFT_VERSION = 5.0;
422422
TARGETED_DEVICE_FAMILY = "1,2";
423423
};

Fixtures/Xcode16ProjectReferenceOrder/Wrong.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@
417417
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES;
418418
SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO;
419419
SWIFT_COMPILATION_MODE = wholemodule;
420-
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
420+
SWIFT_OPTIMIZATION_LEVEL = "-O";
421421
SWIFT_VERSION = 5.0;
422422
TARGETED_DEVICE_FAMILY = "1,2";
423423
};

Fixtures/iOS/BuildSettings.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
IPHONEOS_DEPLOYMENT_TARGET = 11.2;
9595
MTL_ENABLE_DEBUG_INFO = NO;
9696
SDKROOT = iphoneos;
97-
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
97+
SWIFT_OPTIMIZATION_LEVEL = "-O";
9898
VALIDATE_PRODUCT = YES;
9999
a = a;
100100
a_escapedNewLine_a = "a\\na";

Fixtures/iOS/Project.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@
439439
IPHONEOS_DEPLOYMENT_TARGET = 10.3;
440440
MTL_ENABLE_DEBUG_INFO = NO;
441441
SDKROOT = iphoneos;
442-
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
442+
SWIFT_OPTIMIZATION_LEVEL = "-O";
443443
VALIDATE_PRODUCT = YES;
444444
};
445445
name = Release;

Fixtures/iOS/ProjectWithRelativeXCLocalSwiftPackageReference/ProjectWithRelativeXCLocalSwiftPackageReference.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@
351351
IPHONEOS_DEPLOYMENT_TARGET = 10.3;
352352
MTL_ENABLE_DEBUG_INFO = NO;
353353
SDKROOT = iphoneos;
354-
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
354+
SWIFT_OPTIMIZATION_LEVEL = "-O";
355355
VALIDATE_PRODUCT = YES;
356356
};
357357
name = Release;

Fixtures/iOS/ProjectWithXCLocalSwiftPackageReference.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@
442442
IPHONEOS_DEPLOYMENT_TARGET = 10.3;
443443
MTL_ENABLE_DEBUG_INFO = NO;
444444
SDKROOT = iphoneos;
445-
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
445+
SWIFT_OPTIMIZATION_LEVEL = "-O";
446446
VALIDATE_PRODUCT = YES;
447447
};
448448
name = Release;

Fixtures/iOS/ProjectWithXCLocalSwiftPackageReferences.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@
442442
IPHONEOS_DEPLOYMENT_TARGET = 10.3;
443443
MTL_ENABLE_DEBUG_INFO = NO;
444444
SDKROOT = iphoneos;
445-
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
445+
SWIFT_OPTIMIZATION_LEVEL = "-O";
446446
VALIDATE_PRODUCT = YES;
447447
};
448448
name = Release;

Sources/XcodeProj/Utils/BuildSettingsProvider.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ public class BuildSettingsProvider {
358358
]
359359
case .release:
360360
[
361-
"SWIFT_OPTIMIZATION_LEVEL": "-Owholemodule",
361+
"SWIFT_OPTIMIZATION_LEVEL": "-O",
362362
"SWIFT_COMPILATION_MODE": "wholemodule",
363363
]
364364
default:

Tests/XcodeProjTests/Utils/BuildSettingsProviderTests.swift

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ struct BuildSettingProviderTests {
2121
],
2222
"SDKROOT": "iphoneos",
2323
"SWIFT_COMPILATION_MODE": "wholemodule",
24-
"SWIFT_OPTIMIZATION_LEVEL": "-Owholemodule",
24+
"SWIFT_OPTIMIZATION_LEVEL": "-O",
2525
"TARGETED_DEVICE_FAMILY": "1,2",
2626
]
2727
),
@@ -45,7 +45,7 @@ struct BuildSettingProviderTests {
4545
"SDKROOT": "iphoneos",
4646
"SKIP_INSTALL": "YES",
4747
"SWIFT_COMPILATION_MODE": "wholemodule",
48-
"SWIFT_OPTIMIZATION_LEVEL": "-Owholemodule",
48+
"SWIFT_OPTIMIZATION_LEVEL": "-O",
4949
"TARGETED_DEVICE_FAMILY": "1,2",
5050
"VERSIONING_SYSTEM": "apple-generic",
5151
"VERSION_INFO_PREFIX": "",
@@ -63,7 +63,7 @@ struct BuildSettingProviderTests {
6363
],
6464
"SDKROOT": "iphoneos",
6565
"SWIFT_COMPILATION_MODE": "wholemodule",
66-
"SWIFT_OPTIMIZATION_LEVEL": "-Owholemodule",
66+
"SWIFT_OPTIMIZATION_LEVEL": "-O",
6767
"TARGETED_DEVICE_FAMILY": "1,2",
6868
]
6969
),
@@ -82,7 +82,7 @@ struct BuildSettingProviderTests {
8282
],
8383
"SDKROOT": "macosx",
8484
"SWIFT_COMPILATION_MODE": "wholemodule",
85-
"SWIFT_OPTIMIZATION_LEVEL": "-Owholemodule",
85+
"SWIFT_OPTIMIZATION_LEVEL": "-O",
8686
]
8787
),
8888
TestParameters(
@@ -99,7 +99,7 @@ struct BuildSettingProviderTests {
9999
],
100100
"SDKROOT": "appletvos",
101101
"SWIFT_COMPILATION_MODE": "wholemodule",
102-
"SWIFT_OPTIMIZATION_LEVEL": "-Owholemodule",
102+
"SWIFT_OPTIMIZATION_LEVEL": "-O",
103103
"TARGETED_DEVICE_FAMILY": "3",
104104
]
105105
),
@@ -117,7 +117,7 @@ struct BuildSettingProviderTests {
117117
"SDKROOT": "watchos",
118118
"SKIP_INSTALL": "YES",
119119
"SWIFT_COMPILATION_MODE": "wholemodule",
120-
"SWIFT_OPTIMIZATION_LEVEL": "-Owholemodule",
120+
"SWIFT_OPTIMIZATION_LEVEL": "-O",
121121
"TARGETED_DEVICE_FAMILY": "4",
122122
]
123123
),
@@ -142,7 +142,7 @@ struct BuildSettingProviderTests {
142142
"SDKROOT": "watchos",
143143
"SKIP_INSTALL": "YES",
144144
"SWIFT_COMPILATION_MODE": "wholemodule",
145-
"SWIFT_OPTIMIZATION_LEVEL": "-Owholemodule",
145+
"SWIFT_OPTIMIZATION_LEVEL": "-O",
146146
"TARGETED_DEVICE_FAMILY": "4",
147147
"VERSIONING_SYSTEM": "apple-generic",
148148
"VERSION_INFO_PREFIX": "",
@@ -160,7 +160,7 @@ struct BuildSettingProviderTests {
160160
],
161161
"SDKROOT": "watchos",
162162
"SWIFT_COMPILATION_MODE": "wholemodule",
163-
"SWIFT_OPTIMIZATION_LEVEL": "-Owholemodule",
163+
"SWIFT_OPTIMIZATION_LEVEL": "-O",
164164
"TARGETED_DEVICE_FAMILY": "4",
165165
]
166166
),
@@ -178,7 +178,7 @@ struct BuildSettingProviderTests {
178178
],
179179
"SDKROOT": "xros",
180180
"SWIFT_COMPILATION_MODE": "wholemodule",
181-
"SWIFT_OPTIMIZATION_LEVEL": "-Owholemodule",
181+
"SWIFT_OPTIMIZATION_LEVEL": "-O",
182182
"TARGETED_DEVICE_FAMILY": "1,2,7",
183183
]
184184
),
@@ -202,7 +202,7 @@ struct BuildSettingProviderTests {
202202
"SDKROOT": "xros",
203203
"SKIP_INSTALL": "YES",
204204
"SWIFT_COMPILATION_MODE": "wholemodule",
205-
"SWIFT_OPTIMIZATION_LEVEL": "-Owholemodule",
205+
"SWIFT_OPTIMIZATION_LEVEL": "-O",
206206
"TARGETED_DEVICE_FAMILY": "1,2,7",
207207
"VERSIONING_SYSTEM": "apple-generic",
208208
"VERSION_INFO_PREFIX": "",
@@ -220,7 +220,7 @@ struct BuildSettingProviderTests {
220220
],
221221
"SDKROOT": "xros",
222222
"SWIFT_COMPILATION_MODE": "wholemodule",
223-
"SWIFT_OPTIMIZATION_LEVEL": "-Owholemodule",
223+
"SWIFT_OPTIMIZATION_LEVEL": "-O",
224224
"TARGETED_DEVICE_FAMILY": "1,2,7",
225225
]
226226
),

0 commit comments

Comments
 (0)