Commit 4afa3c8
authored
fix: add -arch flag to GCC flags to prevent argument loss on macOS ARM (#674)
* fix: add -arch flag to GCC flags to prevent argument loss
On macOS, cc/gcc are Apple Clang and pass -arch arm64, but Bear
classifies them as GCC. Since -arch was only defined in CLANG_FLAGS,
the GCC parser treated -arch as an unknown standalone flag and
misclassified the following argument (e.g. arm64) as a source file,
which was then silently dropped from compile_commands.json.
This caused clangd to report: Invalid arch name '-arch -Wall'
Add -arch and -arch_only to GCC_FLAGS so the parser correctly consumes
the flag-value pair regardless of which interpreter handles the command.
Fixes #673
* fix: lint issue1 parent cf6e92a commit 4afa3c8
1 file changed
+39
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
406 | 406 | | |
407 | 407 | | |
408 | 408 | | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
409 | 414 | | |
410 | 415 | | |
411 | 416 | | |
| |||
1484 | 1489 | | |
1485 | 1490 | | |
1486 | 1491 | | |
| 1492 | + | |
| 1493 | + | |
| 1494 | + | |
| 1495 | + | |
| 1496 | + | |
| 1497 | + | |
| 1498 | + | |
| 1499 | + | |
| 1500 | + | |
| 1501 | + | |
| 1502 | + | |
| 1503 | + | |
| 1504 | + | |
| 1505 | + | |
| 1506 | + | |
| 1507 | + | |
| 1508 | + | |
| 1509 | + | |
| 1510 | + | |
| 1511 | + | |
| 1512 | + | |
| 1513 | + | |
| 1514 | + | |
| 1515 | + | |
| 1516 | + | |
| 1517 | + | |
| 1518 | + | |
| 1519 | + | |
| 1520 | + | |
| 1521 | + | |
| 1522 | + | |
| 1523 | + | |
| 1524 | + | |
| 1525 | + | |
1487 | 1526 | | |
0 commit comments