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

Fixes for using -embed-bitcode on Xcode13 #684

Merged

Conversation

rsahara
Copy link
Contributor

@rsahara rsahara commented Sep 10, 2021

Adds the file path of llvm-bc files to the output file maps created by rules_swift, when -embed-bitcode is requested.

Without this file path, on Xcode13, we get compile errors due to object files not created in the correct paths - the paths specified as object in the output file maps are ignored.

Fixes #682.

@google-cla google-cla bot added the cla: yes label Sep 10, 2021
@brentleyjones
Copy link
Collaborator

Can you also add some tests for this if possible?

@rsahara rsahara force-pushed the fix/output-file-map-with-embed-bitcode branch from 6498dff to b9fe5fc Compare September 14, 2021 04:38
@rsahara
Copy link
Contributor Author

rsahara commented Sep 14, 2021

I tried to mimic the other tests. Please let me know if this is not the right way.

test/BUILD Outdated Show resolved Hide resolved
test/BUILD Outdated Show resolved Hide resolved
test/rules/output_file_map_test.bzl Outdated Show resolved Hide resolved
test/output_file_map_tests.bzl Outdated Show resolved Hide resolved
Copy link
Member

@thii thii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, will merge this once we fix the failure on the master branch.

Runo Sahara added 3 commits September 17, 2021 10:20
Tests that the bitcode objects will be in the output file map ('llvm-bc')
when bitcode must be embedded. Prevents bazelbuild#682.
@thii thii force-pushed the fix/output-file-map-with-embed-bitcode branch from 711f876 to ad67efd Compare September 17, 2021 01:24
@thii thii merged commit fa254e1 into bazelbuild:master Sep 17, 2021
@rsahara rsahara deleted the fix/output-file-map-with-embed-bitcode branch October 7, 2021 01:36
tymurmustafaiev pushed a commit to tymurmustafaiev/rules_swift that referenced this pull request Jul 19, 2023
Adds the file path of `llvm-bc` files to the output file maps created by rules_swift, when `-embed-bitcode` is requested.

Without this file path, on Xcode13, we get compile errors due to object files not created in the correct paths - the paths specified as `object` in the output file maps are ignored.

Fixes bazelbuild#682.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build error on Xcode13 with bitcode enabled ("not all outputs were created or valid")
3 participants