Skip to content

Update flag forking approach to use split config.hpp and config_generated.hpp files#60

Merged
ednolan merged 1 commit intomainfrom
enolan_flagfork1
May 2, 2026
Merged

Update flag forking approach to use split config.hpp and config_generated.hpp files#60
ednolan merged 1 commit intomainfrom
enolan_flagfork1

Conversation

@ednolan
Copy link
Copy Markdown
Member

@ednolan ednolan commented May 2, 2026

This commit reflects the new flag forking approach discussed in the most recent Beman weekly sync:

  • For any configuration option where a compiler flag could cause differences in behavior that lead to ODR issues when linking two artifacts generated with different flags, maintainers generate a compiler definition like BEMAN_EXEMPLAR_FOOBAR into a config_generated.hpp header from a config_generated.hpp.in template.
  • Separately, a config.hpp file contains defaults for each definition. These defaults are only enabled if __has_include shows that the config_generated.hpp file is not present.

@ednolan ednolan requested a review from steve-downey as a code owner May 2, 2026 02:34
…ated.hpp files

This commit reflects the new flag forking approach discussed in the
most recent Beman weekly sync:

- For any configuration option where a compiler flag could cause
  differences in behavior that lead to ODR issues when linking two
  artifacts generated with different flags, maintainers generate a
  compiler definition like BEMAN_EXEMPLAR_FOOBAR into a
  config_generated.hpp header from a config_generated.hpp.in template.
- Separately, a config.hpp file contains defaults for each
  definition. These defaults are only enabled if __has_include shows
  that the config_generated.hpp file is not present.
@ednolan ednolan force-pushed the enolan_flagfork1 branch from 013cf6f to 0dc88ad Compare May 2, 2026 02:40
@ednolan ednolan merged commit 473a940 into main May 2, 2026
66 checks passed
@ednolan ednolan deleted the enolan_flagfork1 branch May 2, 2026 03:21
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

Successfully merging this pull request may close these issues.

1 participant