Skip to content

Commit d83cc7c

Browse files
committed
Stop passing -no_objc_category_merging to the linker on Darwin.
ObjC category merging is a really useful optimization, so we should stop doing that. This flag was added in the legacy driver as a workaround in 2014: commit 9a1cf1af1691edc5da237b88be0b0fac548a5a09 Author: Greg Parker <[email protected]> Date: Wed Feb 19 09:22:38 2014 +0000 And whatever issue it was working around should now be resolved. Resolves rdar://84099601
1 parent dad8040 commit d83cc7c

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

Sources/SwiftDriver/Jobs/DarwinToolchain+LinkerSupport.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -418,8 +418,6 @@ extension DarwinToolchain {
418418
sdkPath: targetInfo.sdkPath?.path
419419
)
420420

421-
commandLine.appendFlag("-no_objc_category_merging")
422-
423421
// These custom arguments should be right before the object file at the
424422
// end.
425423
try commandLine.appendAllExcept(

Tests/SwiftDriverTests/JobExecutorTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ final class JobExecutorTests: XCTestCase {
183183
"-lobjc", "-lSystem", "-arch", .flag(hostTriple.archName),
184184
"-L", .path(.absolute(try toolchain.resourcesDirectory.get())),
185185
"-L", .path(.absolute(try toolchain.sdkStdlib(sdk: toolchain.sdk.get()))),
186-
"-rpath", "/usr/lib/swift", "-macosx_version_min", "10.14.0", "-no_objc_category_merging", "-o",
186+
"-rpath", "/usr/lib/swift", "-macosx_version_min", "10.14.0", "-o",
187187
.path(.relative(RelativePath("main"))),
188188
],
189189
inputs: [
@@ -254,7 +254,7 @@ final class JobExecutorTests: XCTestCase {
254254
"-lobjc", "-lSystem", "-arch", .flag(hostTriple.archName),
255255
"-L", .path(.absolute(try toolchain.resourcesDirectory.get())),
256256
"-L", .path(.absolute(try toolchain.sdkStdlib(sdk: toolchain.sdk.get()))),
257-
"-rpath", "/usr/lib/swift", "-macosx_version_min", "10.14.0", "-no_objc_category_merging",
257+
"-rpath", "/usr/lib/swift", "-macosx_version_min", "10.14.0",
258258
"-o", .path(.absolute(exec)),
259259
],
260260
inputs: [

0 commit comments

Comments
 (0)