-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Pass macOS version min flag in osx CROSSTOOL #6891
Conversation
I think the Apple rules folks are better suited to review this. Assigned to them as reviewers. |
I'm investigating the failures, it looks like somehow the iOS SDK version is sneaking into the commands |
Hmm actually. I think the problem is related to #6366 Since we're not passing |
Perhaps the platform override specifying 'macos' is causing it to use the darwin CROSSTOOL stanza (and thus, your new flags) but the lack of apple_platform_type is passing the wrong version-min into the build var? |
It must be. Without my patch the correct target is passed to one of these failing tests:
But with this patch that triple and this new flag are broken:
|
It turns out even with my change the isysroot / |
Can you modify the test configurations for things which run on darwin/macos to pass the correct --apple_platform_type, does that help? |
Yes that does fix it. But I believe since Google doesn't do that this would be a breaking change
…--
Keith Smiley
On Dec 14, 2018, at 08:33, trybka ***@***.***> wrote:
Can you modify the test configurations for things which run on darwin/macos to pass the correct --apple_platform_type, does that help?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
For more info, please see #6891. RELNOTES: None. PiperOrigin-RevId: 225565277
Does it work now with bf04c53 submitted? |
25ccda5
to
6cefcf6
Compare
I've rebased on master so if someone could re-trigger the tests we can find out! |
Looks like it's having the same issue. Which makes sense locally since that change only applied to CI |
@sergiocampama any advice on the test side here? |
these tests continue to fail because the tests themselves invoke bazel, and those invocations do not have the |
6cefcf6
to
b4e10f3
Compare
Hmm so I actually think this is an existing bug that my change is surfacing. Without my commit if you build a tiny cc_binary:
with
I think this is already wrong because since
Then with my change we actually start passing the version min flag, with the version based on apple_platform_type, but somehow it's pulling from the macOS portion of the crosstool, even though apple_platform_type is iOS, which correctly leads to the clang error. |
The error stems from this line. What happens is that the version is being set for the platform type, which by default is iOS. But the CROSSTOOL is setting up the flags for whatever CPU is set, which by default appears to be the host cpu, in this case being |
Trying to fix this by merging #6366 first instead |
b4e10f3
to
958efac
Compare
Now that the linked PR is merged I've rebased this one, which should mean our tests are green here. I have a local change to validate that |
This fixes an issue where cc_library targets that are dependent on from swift_binaries weren't passed the version min flag which lead to linker warnings about version mismatches.
958efac
to
1b9e840
Compare
@trybka mind reviewing this now that everything's green? |
@trybka friendly ping! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks! @trybka can you help me land this? |
@trybka if you have a chance it would be great if we could land this for 0.23 |
@keith sorry for the delay, I'm not officially on the Bazel team, but they're helping me learn the process. I've sent it for review to land, and hope to get it imported on Monday. |
Oh sorry I didn't know. Sounds great though thanks! |
Thanks! |
This fixes an issue where cc_library targets that are dependent on from swift_binaries weren't passed the version min flag which lead to linker warnings about version mismatches. More details: bazelbuild/rules_swift#114 Closes bazelbuild#6891. PiperOrigin-RevId: 231229169
This fixes an issue where cc_library targets that are dependent on from
swift_binaries weren't passed the version min flag which lead to linker
warnings about version mismatches.
More details: bazelbuild/rules_swift#114