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

compiler_flags from pod spec not propagated to build file #63

Open
ileitch opened this issue Feb 17, 2022 · 0 comments
Open

compiler_flags from pod spec not propagated to build file #63

ileitch opened this issue Feb 17, 2022 · 0 comments

Comments

@ileitch
Copy link

ileitch commented Feb 17, 2022

The compiler_flags attribute in pod specs are ignored by cocoapods-bazel, which can result in that pod failing to build under Bazel. For example, the CNIODarwin pod requires -D__APPLE_USE_RFC_3542=1 in order to compile successfully on macOS.

The following addition to the Podfile serves as a temporary workaround:

pre_install do |installer|
  cniodarwin = installer.pod_targets.detect { |t| t.name == 'CNIODarwin' }
  cniodarwin.spec_consumers.each do |c|
    compiler_flags = c.spec.attributes_hash['compiler_flags']
    c.spec.attributes_hash['pod_target_xcconfig'] = {'OTHER_CFLAGS' => compiler_flags}
  end
end
@ileitch ileitch changed the title compiler_flags from pod spec not propagate to build file compiler_flags from pod spec not propagated to build file Feb 17, 2022
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