Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support to import macOS versioned frameworks. #2133

Merged
merged 5 commits into from
Aug 18, 2023

Conversation

keith
Copy link
Member

@keith keith commented Aug 18, 2023

This change adds support to import macOS versioned frameworks
for both framework and XCFramework importing rules:

  • apple_dynamic_framework_import
  • apple_dynamic_xcframework_import

This change fixes an issue with imported macOS frameworks causing build
failures at the signing step for macos_application targets due to an
incorrect framework bundle format since Bazel will resolve symlinks for
versioned frameworks (standalone or bundled inside an XCFramework).

codesign will fail with the following error:

"bundle format is ambiguous (could be app or framework)"

Since macOS frameworks include different framework versions under a
Versions directory and symlinks for the effective version this change
updates imported_dynamic_framework_processor to handle re-do symbolic
links from imported macOS frameworks, as well code signing each
framework version per Apple documentation.

Support to bundle macOS versioned frameworks with tree artifact outputs
is not supported because Bazel does not re-create symbolic links from
remote executed actions yet (bazelbuild/bazel#16361).

PiperOrigin-RevId: 503486495
(cherry picked from commit a82a299)

This change adds support to import macOS versioned frameworks
for both framework and XCFramework importing rules:

  - apple_dynamic_framework_import
  - apple_dynamic_xcframework_import

This change fixes an issue with imported macOS frameworks causing build
failures at the signing step for `macos_application` targets due to an
incorrect framework bundle format since Bazel will resolve symlinks for
versioned frameworks (standalone or bundled inside an XCFramework).

`codesign` will fail with the following error:

  "bundle format is ambiguous (could be app or framework)"

Since macOS frameworks include different framework versions under a
`Versions` directory and symlinks for the effective version this change
updates imported_dynamic_framework_processor to handle re-do symbolic
links from imported macOS frameworks, as well code signing each
framework version per Apple documentation.

Support to bundle macOS versioned frameworks with tree artifact outputs
is not supported because Bazel does not re-create symbolic links from
remote executed actions yet (bazelbuild/bazel#16361).

PiperOrigin-RevId: 503486495
(cherry picked from commit a82a299)
@keith keith enabled auto-merge (squash) August 18, 2023 19:50
keith referenced this pull request Aug 18, 2023
This change adds support to import macOS versioned frameworks
for both framework and XCFramework importing rules:

  - apple_dynamic_framework_import
  - apple_dynamic_xcframework_import

This change fixes an issue with imported macOS frameworks causing build
failures at the signing step for `macos_application` targets due to an
incorrect framework bundle format since Bazel will resolve symlinks for
versioned frameworks (standalone or bundled inside an XCFramework).

`codesign` will fail with the following error:

  "bundle format is ambiguous (could be app or framework)"

Since macOS frameworks include different framework versions under a
`Versions` directory and symlinks for the effective version this change
updates imported_dynamic_framework_processor to handle re-do symbolic
links from imported macOS frameworks, as well code signing each
framework version per Apple documentation.

Support to bundle macOS versioned frameworks with tree artifact outputs
is not supported because Bazel does not re-create symbolic links from
remote executed actions yet (bazelbuild/bazel#16361).

PiperOrigin-RevId: 503486495
keith and others added 2 commits August 18, 2023 12:50
This change updates generate_import_framework and
generate_dynamic_xcframework test rules to include
versioned frameworks by default for the macOS platform.

Additionally, this change updates existing test fixtures
to flip the rule attr where applicable, to keep macOS
test fixture for both types of frameworks.

PiperOrigin-RevId: 504091989
(cherry picked from commit e9152e0)
keith referenced this pull request Aug 18, 2023
This change updates generate_import_framework and
generate_dynamic_xcframework test rules to include
versioned frameworks by default for the macOS platform.

Additionally, this change updates existing test fixtures
to flip the rule attr where applicable, to keep macOS
test fixture for both types of frameworks.

PiperOrigin-RevId: 504091989
Set Unix permissions to the sliced binary from `lipo` when
processing an imported framework. This is already done when
the framework binary is copied (and not sliced).

PiperOrigin-RevId: 508418118
(cherry picked from commit aebc4f1)
keith referenced this pull request Aug 18, 2023
Set Unix permissions to the sliced binary from `lipo` when
processing an imported framework. This is already done when
the framework binary is copied (and not sliced).

PiperOrigin-RevId: 508418118
@keith keith merged commit 93d5b18 into master Aug 18, 2023
@keith keith deleted the ks/add-support-to-import-macos-versioned-frameworks branch August 18, 2023 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants