Skip to content

Commit

Permalink
Fixes compilation of framework when its Swift uses symbols from anoth…
Browse files Browse the repository at this point in the history
…er linked one

Signed-off-by: Yauheni Khnykin <[email protected]>
  • Loading branch information
Hsilgos committed Feb 21, 2024
1 parent 45d7b1f commit 856f5f1
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Gluecodium project Release Notes

## Unpublished:
### Bug fixes:
* Bridging headers from linked frameworks are used. It solves problem with some cases, for example when interface inherts (extends) another one in lime.

## 13.8.1
Release date: 2024-02-07
### Bug fixes:
Expand Down
5 changes: 5 additions & 0 deletions cmake/modules/gluecodium/swift/TargetLinkFrameworks.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,11 @@ function(_gluecodium_target_link_framework target_dst target_framework)
set_property(
TARGET ${target_dst} APPEND_STRING
PROPERTY XCODE_ATTRIBUTE_OTHER_SWIFT_FLAGS " -framework ${_framework_name} -F${framework_dir} ")

# In some cases bridging headers from dependencies are necessary. For example when one interface
# inherits (i.e. extends) another.
get_target_property(_bridging_headers ${target_framework} GLUECODIUM_BRIDGING_HEADERS)
set_property(TARGET ${_target} APPEND PROPERTY GLUECODIUM_BRIDGING_HEADERS "${_bridging_headers}")
endfunction()

function(_gluecodium_find_common_target_in_framework result target_framework)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,15 @@ class MainBar {
constructor make(foo: CommonMainFoo)
}

interface MainExtendBaseInterface: CommonMainBase {
fun extended_fun()
}

class MainDerived : unit.test.CommonMainBase {
property id: Long {
get
}
}

class MainDerivedExtendednInterface: MainExtendBaseInterface {
}

0 comments on commit 856f5f1

Please sign in to comment.