Static Lib Not Relinked

I have a macOS app that links to several static libraries. Each library has its own Xcode project, and we have a workspace that includes the app along with all of the static libraries. After upgrading to Xcode 15, any changes made to the code in one of the libraries will get compiled, but not relinked into the app (so the app will still be run using the old code without the change). So far, the only way I can get it to include the change is to clean the entire workspace and rebuild, which takes several minutes.

Following suggestions I've found online, I've tried turning off "Find Implicit Dependencies" in the scheme but I can't figure out how to explicitly set the dependencies (they don't appear when trying to add a Target Dependency under Build Phases). Also, it seems to be correctly finding the dependencies since it recognizes when a change has been made and recompiles.

I've tried specifying the libraries in both the "Link Binary With Libraries" Build Phase and the Other Linker Flags build setting. Both work in terms of correctly building the app but neither one fixes this issue.

Does anyone know how to fix this issue? Waiting 5 minutes to recompile the entire project after each minor change is destroying my productivity!

Post not yet marked as solved Up vote post of KGraus Down vote post of KGraus
766 views

Replies

I dont have an answer, but I've noticed the exact same problem

I have the same problem. It started with Xcode 15, worked fine before that. Now I have to clean the build folder for linking to trigger.

I've found that making a change to the code in the main app will cause the newly compiled static libs to be relinked. Still not great, but better than cleaning and recompiling the entire workspace.

Do you guys have a custom Intermediate Build Files Path in your build settings?

The Intermediate Build Files Path is set to the default "build" in my project settings.

I'm seeing this issue when linking a Rust static library using CGO from Go. Very annoying and subtle.

I have the same problem since I updated to Xcode 15

The workaround with changing the code in the main app does not help. Any changes in a statically linked library do not appear without a "Clean build folder" and then full rebuild. Any other workaround that works for you?

It looks like a regression, did anyone report this bug to Apple's Xcode team?

I've reported it to the Apple in the Feedback Assistant as FB13728754. Does anyone have a small and simple project to reproduce the issue?