Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/clear-peas-fly.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"cmake-rn": patch
---

Fix auto-linking failures due to lack of padding when renaming install name of libraries, by passing headerpad_max_install_names argument to linker.
2 changes: 2 additions & 0 deletions packages/cmake-rn/src/platforms/apple.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,8 @@ export const platform: Platform<Triplet[], AppleOpts> = {
CMAKE_SYSTEM_NAME: CMAKE_SYSTEM_NAMES[triplet],
CMAKE_OSX_SYSROOT: XCODE_SDK_NAMES[triplet],
CMAKE_OSX_ARCHITECTURES: APPLE_ARCHITECTURES[triplet],
// Passing a linker flag to increase the header pad size to allow renaming the install name when linking it into the app.
CMAKE_SHARED_LINKER_FLAGS: "-Wl,-headerpad_max_install_names",
},
{
// Setting the output directories works around an issue with Xcode generator
Expand Down
4 changes: 4 additions & 0 deletions scripts/init-macos-test-app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ async function patchPackageJson() {
APP_PATH,
path.join(ROOT_PATH, "packages", "host"),
),
"weak-node-api": path.relative(
APP_PATH,
path.join(ROOT_PATH, "packages", "weak-node-api"),
),
...Object.fromEntries(
Object.entries(otherDependencies).filter(([name]) =>
transferredDependencies.has(name),
Expand Down