Strip a single cc/cxx flag of path-specific tokens. Currently a no-op for flags we keep — most semantic flags (``-mcpu``, ``-O2``, ``-std=gnu++17``, ``-Wno-*``) are already path-free. Extracted as its own function so the right place to grow per-flag rewrites is obvious.
(flag: str)
| 210 | |
| 211 | |
| 212 | def _normalize_flag(flag: str) -> str: |
| 213 | """Strip a single cc/cxx flag of path-specific tokens. |
| 214 | |
| 215 | Currently a no-op for flags we keep — most semantic flags (``-mcpu``, |
| 216 | ``-O2``, ``-std=gnu++17``, ``-Wno-*``) are already path-free. Extracted |
| 217 | as its own function so the right place to grow per-flag rewrites is |
| 218 | obvious. |
| 219 | """ |
| 220 | return flag |
| 221 | |
| 222 | |
| 223 | @typechecked |