Re: [RFC PATCH v7 23/37] perf tools: Introduce llvm config options

From: pi3orama
Date: Fri Jun 12 2015 - 22:54:26 EST




发自我的 iPhone

> 在 2015年6月13日,上午10:31,Alexei Starovoitov <ast@xxxxxxxxxxxx> 写道:
>
>> On 6/11/15 10:35 PM, Wang Nan wrote:
>> # Path to clang. If omit, search it from $PATH.
>> clang-path = "/path/to/clang"
>
> I think this bit and search_program() from the next patch is
> overly flexible. It's always delicate to search file paths.
> Unless this is really needed, I would drop this bit.

I think searching clang before execution is still equired. If not, we are unable to know the exact reason why the shell script failed. If there's no clang at all, we can simply return an error instead of trying to detect kbuild and kernel header. Which is slower than clang compiling itself.

What about creating another shell script simply run 'clang --version' to check availability of clang? Then search_program can be dropped.

Thank you.

> popen() in the next patch executes clang via shell,
> so explicit PATH search in unnecessary.
>
> The rest of the patches look good to me.
> Thanks again.
>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/