bkryza / clang-uml

Customizable automatic UML diagram generator for C++ based on Clang.
Apache License 2.0
610 stars 44 forks source link

Add support to remove compile flags in config files based on regex #303

Closed bkryza closed 3 months ago

bkryza commented 3 months ago

Currently, the option remove_compile_flags only accepts string values, which means that all flags which need to be removed must be provided explicitly, e.g:

remove_compile_flags:
  - -mpreferred-stack-boundary=3
  - -mindirect-branch=thunk-extern
  - -mindirect-branch-register
  - -fconserve-stack
  - -falign-jumps=1
  - -mrecord-mcount
  - -fsanitize=bounds-strict

It would be nice to allow regex so that for instance it would be possible to define them as:

remove_compile_flags:
  - r: '-m.*'
  - -fno-allow-store-data-races
  - -fconserve-stack
  - -falign-jumps=1
  - r: '-fsanitize=.*'