Skip to content

swift: Pass C base compile options to swiftc #14296

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

Merged
merged 1 commit into from
Jun 5, 2025

Conversation

2xsaiko
Copy link
Contributor

@2xsaiko 2xsaiko commented Feb 25, 2025

If the C/Obj-C source code needs a particular standard version, swiftc should know about it so it can parse imported headers correctly.

(This makes more sense with C++ support (commit 2xsaiko@push-nmuxysxxokuy), since setting the standard version is more common there, and was pulled out of #14261, but still applies for C as well)

@2xsaiko 2xsaiko requested a review from dcbaker as a code owner February 25, 2025 23:27
@2xsaiko 2xsaiko mentioned this pull request Feb 25, 2025
4 tasks
@2xsaiko 2xsaiko force-pushed the push-uxoqqoqywmwu branch 2 times, most recently from c5af688 to e79331a Compare February 26, 2025 16:49
@2xsaiko 2xsaiko force-pushed the push-uxoqqoqywmwu branch 2 times, most recently from a3461bb to d5df540 Compare March 7, 2025 19:39
@2xsaiko 2xsaiko force-pushed the push-uxoqqoqywmwu branch from d5df540 to be6623a Compare March 25, 2025 16:18
@bonzini bonzini added this to the 1.8 milestone Apr 10, 2025
@bonzini
Copy link
Collaborator

bonzini commented Apr 10, 2025

@2xsaiko can you rebase to check it the ci failure goes away?

@2xsaiko 2xsaiko force-pushed the push-uxoqqoqywmwu branch from be6623a to f1c7bf3 Compare April 10, 2025 11:55
@bonzini bonzini added the bug label Apr 16, 2025
@bonzini
Copy link
Collaborator

bonzini commented Apr 24, 2025

Failure is unrelated.

@2xsaiko 2xsaiko force-pushed the push-uxoqqoqywmwu branch 2 times, most recently from 1e29c7d to 88f6478 Compare April 26, 2025 12:30
@2xsaiko 2xsaiko requested a review from jpakkane as a code owner April 26, 2025 12:30
@bonzini bonzini modified the milestones: 1.8, 1.9 Apr 29, 2025
@2xsaiko 2xsaiko force-pushed the push-uxoqqoqywmwu branch from 88f6478 to 5b9a75e Compare April 29, 2025 13:19
@dcbaker
Copy link
Member

dcbaker commented May 1, 2025

@2xsaiko this looks good, and we're past the release freeze, if you can rebase this I'll go ahead and merge.

@2xsaiko 2xsaiko force-pushed the push-uxoqqoqywmwu branch from 5b9a75e to 1c67320 Compare May 1, 2025 16:28
@2xsaiko
Copy link
Contributor Author

2xsaiko commented May 1, 2025

Oh, just noticed! Should this be added in get_option_compile_args and not get_option_std_args since that's the method it also calls?

EDIT: or actually, I think this should just call get_option_std_args here since that's what actually adds the -std option. Did this change recently?

EDIT 2: Actually, let me add some tests as well so this does not happen in the future…

@2xsaiko 2xsaiko force-pushed the push-uxoqqoqywmwu branch from 1c67320 to 7a7be91 Compare May 1, 2025 18:37
@2xsaiko 2xsaiko requested a review from dcbaker May 1, 2025 18:40
@2xsaiko 2xsaiko force-pushed the push-uxoqqoqywmwu branch from 7a7be91 to 148672c Compare May 1, 2025 19:36
@2xsaiko 2xsaiko force-pushed the push-uxoqqoqywmwu branch from 148672c to 8478709 Compare May 10, 2025 18:10
@bonzini bonzini modified the milestones: 1.9, 1.8.2 May 24, 2025
@bonzini
Copy link
Collaborator

bonzini commented May 31, 2025

@2xsaiko hopefully last rebase to fix CI, please :)

(Yes, the separate method for std was added recently to fix a CUDA bug. Thanks for adjusting)

@2xsaiko 2xsaiko force-pushed the push-uxoqqoqywmwu branch from 8478709 to 080246a Compare May 31, 2025 18:46
@dcbaker dcbaker merged commit 6624e4a into mesonbuild:master Jun 5, 2025
31 of 32 checks passed
@eli-schwartz eli-schwartz removed this from the 1.8.2 milestone Jun 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants