Skip to content
This repository has been archived by the owner on Aug 10, 2021. It is now read-only.

Support -Xexport-library in reverse C interop. #2740

Merged
merged 3 commits into from
Mar 1, 2019
Merged

Support -Xexport-library in reverse C interop. #2740

merged 3 commits into from
Mar 1, 2019

Conversation

olonho
Copy link
Contributor

@olonho olonho commented Mar 1, 2019

No description provided.

@@ -283,7 +283,8 @@ private fun selectExportedLibraries(
): List<String> {
val exportedLibraries = arguments.exportedLibraries?.toList().orEmpty()

return if (exportedLibraries.isNotEmpty() && outputKind != CompilerOutputKind.FRAMEWORK) {
return if (exportedLibraries.isNotEmpty() && outputKind != CompilerOutputKind.FRAMEWORK &&
outputKind != CompilerOutputKind.STATIC && outputKind != CompilerOutputKind.DYNAMIC) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe fix error message below too?

moduleDescriptors += context.moduleDescriptor
moduleDescriptors += context.getExportedDependencies()

currentPackageFragments = context.moduleDescriptor.getPackageFragments().sortedWith(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe include exported dependencies' package fragments too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But why, looks like everything is exported anyway (as descriptor tree contains all them).

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is currentPackageFragments for then?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, reworked.

@olonho olonho merged commit d74384d into master Mar 1, 2019
@olonho olonho deleted the export_libs branch March 1, 2019 14:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants