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

Why is hb-warning a compilation unit? #2005

Closed
dmoody256 opened this issue Oct 3, 2019 · 4 comments
Closed

Why is hb-warning a compilation unit? #2005

dmoody256 opened this issue Oct 3, 2019 · 4 comments

Comments

@dmoody256
Copy link

Can these preprocessor checks just be added to the bottom of hb.hh?

It produces a lnk4221 warning on windows builds:
https://docs.microsoft.com/en-us/cpp/error-messages/tool-errors/linker-tools-warning-lnk4221?view=vs-2019

@ebraminio
Copy link
Collaborator

Interesting, and worth to fix, however feel free also to just use harfbuzz.cc, single file, whole harfbuzz, for now :)

@behdad
Copy link
Member

behdad commented Oct 6, 2019

It was made into a compilation unit so the warnings are emitted just once.

So we have completely become slaves to compilers now.... What's wrong with a compilation unit having everything compiled out, perhaps because of preprocessor symbols?

@dmoody256
Copy link
Author

dmoody256 commented Oct 16, 2019

in hb-warning.cc aren't they preprocessor errors and would make build systems assume compilation failed, and therefore fail a build?

When you say "emitted just once", you mean in the case of parallel compilation, the compiler wont spit out the same errors multiple times.

@dmoody256
Copy link
Author

dmoody256 commented Oct 17, 2019

Could the preprocessor checks instead be at top of some main .cc file?

or if it was in some main header, it could set a processor flag (similar to header sentinals) so it only gets reported once?

@behdad behdad closed this as completed in 5e48967 Oct 22, 2019
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

3 participants