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

zig cc with -c parameter and no -target parameter should look for native include directories #4938

Closed
andrewrk opened this issue Apr 4, 2020 · 0 comments
Labels
accepted This proposal is planned. contributor friendly This issue is limited in scope and/or knowledge of Zig internals. enhancement Solving this issue will likely involve adding new logic or components to the codebase. proposal This issue suggests modifications. If it also has the "accepted" label then it is planned. zig cc Zig as a drop-in C compiler feature
Milestone

Comments

@andrewrk
Copy link
Member

andrewrk commented Apr 4, 2020

Without -nostdinc, and when the target is native, and -c parameter is provided (really it's when zig is not going to be used as a linker), it is not expected for the C command line options to contain -l parameters, which is what currently triggers zig to pay attention to system include directories.

This proposal is to look for native system include directories in zig cc mode under the following conditions:

  • -nostdinc is not provided
  • -c, -E or other parameter is provided, meaning that Zig will not be used as a linker
  • The target is native
@andrewrk andrewrk added contributor friendly This issue is limited in scope and/or knowledge of Zig internals. proposal This issue suggests modifications. If it also has the "accepted" label then it is planned. accepted This proposal is planned. zig cc Zig as a drop-in C compiler feature labels Apr 4, 2020
@andrewrk andrewrk added this to the 0.7.0 milestone Apr 4, 2020
@andrewrk andrewrk added the enhancement Solving this issue will likely involve adding new logic or components to the codebase. label Apr 4, 2020
@andrewrk andrewrk modified the milestones: 0.7.0, 0.6.0 Apr 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted This proposal is planned. contributor friendly This issue is limited in scope and/or knowledge of Zig internals. enhancement Solving this issue will likely involve adding new logic or components to the codebase. proposal This issue suggests modifications. If it also has the "accepted" label then it is planned. zig cc Zig as a drop-in C compiler feature
Projects
None yet
Development

No branches or pull requests

1 participant