Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B buck
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 201
    • Issues 201
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 22
    • Merge requests 22
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • buck
  • Merge requests
  • !818

[Apple] Add prebuilt dynamic framework support

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/robbertvanginkel/prebuilt_frameworks into master Jul 26, 2016
  • Overview 20
  • Commits 2
  • Pipelines 0
  • Changes 24

Created by: robbertvanginkel

This PR proposes a way to embed prebuilt dynamic frameworks into apple_bundles, linking that framework against the binary for the apple bundle. This is a start to solving #440 (closed), in buck it (mostly) works, the project generation still has to be done. The rule syntax for this would be:

prebuilt_apple_framework(
    name = 'BuckTest',
    framework = 'BuckTest.framework',
)

You can add this rule to an apple_library or apple_binary, this should do the following:

  • Symlink the Headers folder inside the framework as the exposed headers for the rule.
  • Export linkerflag -rpath @loader_path/Frameworks/ -rpath @executable_path/Frameworks
  • Export the linkerflag -framework <frameworkname>, and -F path/to/framework/
  • Embed the framework in the bundle's "Frameworks" folder

I'm however encountering the following problem when trying to embed the framework: the INCLUDE_FRAMEWORKS flavor is tied to apple_library's FRAMEWORK flavor, and I don't want that. This happens in AppleDescriptions.java. I have the following situation: an apple_binary (wrapped in apple_bundle) with two dependencies: a prebuilt_apple_framework and an apple_libary. I want to statically link the apple_library, and embed and dynamically link the prebuilt_apple_framework. The probelm is, when I build the apple_binary with #INCLUDE_FRAMEWORKS, the mentioned code in AppleDescriptions goes through the deps and requires them with the FRAMEWORK_FLAVOR, which tries to embed the apple_library as a framework which is broken.

I sort of avoided this by making apple_binary not require the framework flavor, but this is inconsistent and will cause headaches. Suggestions on how to move forward with this?

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/robbertvanginkel/prebuilt_frameworks