Skip to content

Instantly share code, notes, and snippets.

@zwaldowski
Created September 20, 2015 18:01
Show Gist options
  • Save zwaldowski/dcd218ae7334fba5833d to your computer and use it in GitHub Desktop.
Save zwaldowski/dcd218ae7334fba5833d to your computer and use it in GitHub Desktop.
Using "private" C module from Swift
SWIFT_INCLUDE_PATHS = $(SRCROOT)
import MyModule.Private
// use stuff from "MyModule"
# This should be in a directory "$(SRCROOT)/MyModule"
# and named "module.modulemap".
module MyModule {
export *
#link "system"
#link framework "Foo"
}
# This should be in a directory "$(SRCROOT)/MyModule"
# and named "module.private.modulemap".
explicit module MyModule.Private {
header "UmbrellaHeader.h"
header "OtherHeader.h"
}
@soua-hamza
Copy link

if I use this technique in a framework, the private module will be part of the framework bitcode? no need to import the dependency module in the project where I use the framework ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment