Re: [PATCH 09/15] sched/headers: Introduce kernel/sched/build_policy.c and build multiple .c files there

From: suhui_kernel
Date: Tue Aug 23 2022 - 03:48:55 EST


Hi Ingo, Since commit f96eca432015ddc1b621632488ebc345bca06791 merged, the
scripts/clang-tools/gen_compile_commands.py can't work very well.
In this patch the build_policy.c and build_utility.c include kernel/sched/xxx.c(
such as rt.c idle.c...), so it compile the build_utility.o build_policy.o directly,
and it won't generate kernel/sched/xxx.c(such as rt.o idle.o), so the gen_compile_commands.py
can't work.
It will report "[8/23/2022, 3:24:06 PM] "rt.c" not found in "${workspaceFolder}/compile_commands.json".
'includePath' from c_cpp_properties.json in folder 'linux' will be used for this file instead.".
And i test the kdump & crash tools, it can find the functions by line in kernel/sched/xxx.c(
such as rt.c idle.c), it works well.
I can't solve this report error, so i want to get help.
Maybe we change the gen_compile_commands.py code can solve this problem or
can we revert this change?(3.9% build wall time decrease really matter? it will
destory all tool's parse result which depends on the compiled file result).