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

ALLINONE and EXPORT macros #38

Closed
uno20001 opened this issue Apr 13, 2020 · 3 comments
Closed

ALLINONE and EXPORT macros #38

uno20001 opened this issue Apr 13, 2020 · 3 comments

Comments

@uno20001
Copy link
Contributor

While browsing the code base I found two macros: ALLINONE and EXPORT. Is there any value this functionality brings to the software? Because I could not figure out why it is beneficial to have just a single translation unit. In a brief correspondence with the current owner of the project, @Rudde, s/he said s/he did not know the origins of these two macros. So this question is mainly directed towards the original author, @esmil (as far as I know).

@esmil
Copy link
Collaborator

esmil commented Apr 13, 2020

As far as I recall this was like a poor mans LTO way before it existed in GCC. Similar to LTO compiling everything as a single translation unit allows the compiler to do optimizations (inlining, constant propagation etc.) across files. It was probably never worth it, but these days you can just add -flto to CFLAGS to get a similar effect.

@uno20001
Copy link
Contributor Author

I see. What is your opinion on removing them from the code altogether?

@esmil
Copy link
Collaborator

esmil commented Apr 17, 2020

I think that's a great idea. but I've handed the project over to Rudde, so it's his call.

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