Skip to content

v5: Update Flang flags#517

Draft
mathomp4 wants to merge 10 commits intodevelopfrom
feature/flang-flags
Draft

v5: Update Flang flags#517
mathomp4 wants to merge 10 commits intodevelopfrom
feature/flang-flags

Conversation

@mathomp4
Copy link
Member

@mathomp4 mathomp4 commented Feb 27, 2026

This PR updates the flags used for Flang now that we can build and run GEOS.

Release

For Release, we mainly do -O3 -g -march=foo -funroll-loops -fstack-arrays as this seemed to be the best performance (but barely).

Debug

For Debug we use: -O0 -g -ffp-contract=off

Save Temp Files

The -fno-integrated-as -save-temps=obj flag is how it appears we need to use -fsave-temps with flang at present. @tarunprabhu has a fix in llvm/llvm-project#119624 but it's not yet merged, so for now, we keep the double flag.

Update 1: We might not be able to use this. I'm having random issues with save-temps and Fortran codes with labels. ==> Reproducer found. it's a weird one.

Update 2: Yeah, it's a bug. I filed an issue here:

llvm/llvm-project#184802

and for now, I'll just turn off the save-temps flags.

no FMA

The -ffp-contract=off is the "no FMA" flag per @FlorianDeconinck . Makes sense to not do FMA on Debug. Makes the math map easier if we have to go assembly peeking.

@mathomp4 mathomp4 self-assigned this Feb 27, 2026
@mathomp4 mathomp4 added the Non 0-diff The changes in this pull request are non-zero-diff label Feb 27, 2026
@mathomp4 mathomp4 changed the title Update Flang flags v6: Update Flang flags Mar 5, 2026
@mathomp4 mathomp4 changed the title v6: Update Flang flags v5: Update Flang flags Mar 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Non 0-diff The changes in this pull request are non-zero-diff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant