CMake: make MafiaHubServices an imported static target#207
Conversation
The prebuilt MafiaHubServices was an INTERFACE library wrapping the raw archive path, so the archive couldn't be ordered or captured by a link group — order-dependent linkers dropped masterlist's Framework symbol references. Make it a real IMPORTED STATIC target and declare its dependency on Framework.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Walkthrough
ChangesMafiaHubServices CMake target type and link order
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Linking issue discovered when building HL mod on Linux CI:
MafiaHubServices(the prebuilt archive) contains references toUtils::Time, which lives in Framework. On GNUld, an archive must appear on the link line before the archive that satisfies its undefined symbols. The #203 commit removed the standaloneBuild MafiaHubServices CIstep, so the target now only gets built/linked transitively throughFrameworkServer/FrameworkClient/FrameworkLoaderwhich is exactly when the bad ordering occurrs.INTERFACE->IMPORTEDallows participation in dependency ordering against Frameworktarget_link_libraries(MafiaHubServices INTERFACE Framework)declares the real dependency ordering so that CMake emitsFrameworkafterMafiaHubServices.Summary by CodeRabbit