• Wang Nan's avatar
    tools build: Add feature detection for clang · c7fb4f62
    Wang Nan authored
    Check if basic clang compiling environment is ready.
    
    Doesn't like 'llvm-config --libs' which can returns llvm libraries in right
    order and duplicates some libraries if necessary, there's no correspondence for
    clang libraries (-lclangxxx). to avoid extra complexity and to avoid new clang
    breaking libraries ordering, use --start-group and --end-group.
    
    In this test case, manually identify required clang libs and hope it to be
    stable. Putting all clang libraries here is possible (use make's wildcard), but
    then feature checking becomes very slow.
    Signed-off-by: default avatarWang Nan <wangnan0@huawei.com>
    Cc: Alexei Starovoitov <ast@fb.com>
    Cc: He Kuang <hekuang@huawei.com>
    Cc: Jiri Olsa <jolsa@kernel.org>
    Cc: Joe Stringer <joe@ovn.org>
    Cc: Zefan Li <lizefan@huawei.com>
    Cc: pi3orama@163.com
    Link: http://lkml.kernel.org/r/20161126070354.141764-9-wangnan0@huawei.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    c7fb4f62
test-clang.cpp 588 Bytes