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

How to enable bitcode when using apple_framework #660

Open
sanju-naik opened this issue Feb 21, 2023 · 0 comments
Open

How to enable bitcode when using apple_framework #660

sanju-naik opened this issue Feb 21, 2023 · 0 comments

Comments

@sanju-naik
Copy link

Hi,

We are using cocoapods-bazel to generate BUILD files for Cocoapods, We want to enable bitcode for these pods, How Can I do this?

I tried passing these options to apple_framework macro, but it didn't work

  objc_copts = ["-embed-bitcode"],
  linkopts = ["-fembed-bitcode"],

The main ios_application where bitcode is enabled, still fails with this error:

/Users/sanju/repo/BUILD.bazel:53:16: Linking App_bin_unstripped failed: (Aborted): wrapped_clang failed: error executing command
  (cd /private/var/tmp/_bazel_sanju/<id>/execroot/__main__ && \
  exec env - \
    APPLE_SDK_PLATFORM=iPhoneOS \
    APPLE_SDK_VERSION_OVERRIDE=15.4 \
    PATH=/Users/sanju/Library/Caches/bazelisk/downloads/bazelbuild/bazel-5.0.0-darwin-arm64/bin:/opt/homebrew/opt/openjdk/bin:/Users/sanju/.rbenv/shims:/Users/sanju/.rbenv/bin:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin \
    XCODE_VERSION_OVERRIDE=13.3.0.13E113 \
    ZERO_AR_DATE=1 \
  external/local_config_cc/wrapped_clang @bazel-out/ios-arm64-min12.0-applebin_ios-ios_arm64-opt-ST-6b6216040413/bin/GojekHost_bin_unstripped-2.params)
# Configuration: a2ea44cd09dd810bcd6d0b79c10ebdaee24d6a7c4b364b0c024ba538e4f12530
# Execution platform: @local_config_platform//:host
ld: warning: -headerpad_max_install_names is ignored when used with -bitcode_bundle (Xcode setting ENABLE_BITCODE=YES)
ld: 'bazel-out/ios-arm64-min9.0-applebin_ios-ios_arm64-opt-ST-b50fc8c042fb/bin/Pods/FLEX/libFLEX_objc.a(FLEXFilteringTableViewController.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. file 'bazel-out/ios-arm64-min9.0-applebin_ios-ios_arm64-opt-ST-b50fc8c042fb/bin/Pods/FLEX/libFLEX_objc.a'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
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

No branches or pull requests

1 participant