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

Add compiler optimization flags to ceed.pc #1658

Open
jrwrigh opened this issue Sep 9, 2024 · 2 comments
Open

Add compiler optimization flags to ceed.pc #1658

jrwrigh opened this issue Sep 9, 2024 · 2 comments

Comments

@jrwrigh
Copy link
Collaborator

jrwrigh commented Sep 9, 2024

See HONEE thread for background.

The idea is that downstream users of libCEED can/should inherit the compilation flags of upstream as they should respond similarly to the same optimization flags.

To do that, we could add a cflags_extra key to ceed.pc to store then, similar to how PETSc does it. And in that we'd just store the OPT variable from the build process.

@jedbrown
Copy link
Member

I'm fine with providing this key, though it may be tricky to record the right one. For example, when PETSc --download-libceed, it sets CFLAGS directly, not via the OPT convenience (whose sole purpose is to make it easy to give optimization flags for C, C++, and Fortran in one shot (only works if they have compatible vendors). https://gitlab.com/petsc/petsc/-/blob/main/config/BuildSystem/config/packages/libceed.py?ref_type=heads#L34

@jrwrigh
Copy link
Collaborator Author

jrwrigh commented Sep 11, 2024

Good point. I'm fine with it being CFLAGS instead of OPT. The thought behind OPT is that it just trims down on the intake of flags. CFLAGS seems like the better one for robustness sake.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants