Skip to content

Commit c18c8ee

Browse files
wataashrizsotto
authored andcommitted
citnames: add xgcc and xg++
When building gcc and g++, the compiler core is first built as xgcc/xg++, and these are then used to compile other components (e.g. libgcc or libstdc++). Since xgcc/xg++ were not recognized by bear, many files were missing from compile_commands.json when building gcc. # building gcc (master branch) on x86_64 Linux ../configure --disable-bootstrap --disable-multilib --enable-languages=c,c++ bear -- make jq 'length' compile_commands.json # before this change: 1067 # after this change: 2745 Fixes: #563
1 parent 02ec886 commit c18c8ee

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

source/citnames/source/semantic/ToolGcc.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,9 @@ namespace cs::semantic {
205205
// - with prefixes like: arm-none-eabi-
206206
// - with postfixes like: -7.0 or 6.4.0
207207
// - (excluding cc1)
208-
R"(^(cxx|CC|(([^-]*-)*(cc(?!1(?![\d\.]))|[mg]cc|[cmg]\+\+|[g]?fortran)(-?\d+(\.\d+){0,2})?))$)"
208+
// - xgcc
209+
// - xg++
210+
R"(^(cxx|CC|(([^-]*-)*(cc(?!1(?![\d\.]))|[mg]cc|[cmg]\+\+|[g]?fortran)(-?\d+(\.\d+){0,2})?)|xgcc|xg\+\+)$)"
209211
);
210212

211213
std::cmatch m;

0 commit comments

Comments
 (0)