1
Clangのカスタム(cc_
)ツールチェーンを書きました。何度か何度もやった後、私は今それが主に働いている。しかし、それは失敗します:Clangツールチェインがシステムlibcファイルで失敗する
undeclared inclusion(s) in rule '//foo:foo'
this rule is missing dependency declarations for the following files included by 'foo/foobar.cpp':
'/usr/include/features.h'
'/usr/include/stdc-predef.h'
'/usr/include/x86_64-linux-gnu/sys/cdefs.h'
'/usr/include/x86_64-linux-gnu/bits/wordsize.h'
'/usr/include/x86_64-linux-gnu/gnu/stubs.h'
'/usr/include/x86_64-linux-gnu/gnu/stubs-64.h'
'/usr/include/stdint.h'
'/usr/include/x86_64-linux-gnu/bits/wchar.h'
'/usr/include/stdio.h'
'/usr/include/x86_64-linux-gnu/bits/types.h'
'/usr/include/x86_64-linux-gnu/bits/typesizes.h'
'/usr/include/libio.h'
'/usr/include/_G_config.h'
'/usr/include/wchar.h'
'/usr/include/x86_64-linux-gnu/bits/stdio_lim.h'
'/usr/include/x86_64-linux-gnu/bits/sys_errlist.h'
'/usr/include/math.h'
'/usr/include/x86_64-linux-gnu/bits/math-vector.h'
'/usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h'
'/usr/include/x86_64-linux-gnu/bits/huge_val.h'
'/usr/include/x86_64-linux-gnu/bits/huge_valf.h'
'/usr/include/x86_64-linux-gnu/bits/huge_vall.h'
'/usr/include/x86_64-linux-gnu/bits/inf.h'
'/usr/include/x86_64-linux-gnu/bits/nan.h'
'/usr/include/x86_64-linux-gnu/bits/mathdef.h'
'/usr/include/x86_64-linux-gnu/bits/mathcalls.h'
'/usr/include/assert.h'
'/usr/include/string.h'
'/usr/include/xlocale.h'
どのようにこれらのファイルを処理するはずですか?これらをツールチェーン用にハードコードするだけですか?または、システムからの依存関係を無視するスイッチがありますか(/usr
)?または、むしろmusl,newlibまたはバイオニックのようなハーメチックなlibcを使用してください。
EDIT:実際のツールチェーンの参照の詳細については
:crosstoolプロトのcxx_builtin_include_directory
フィールドにコンパイラのパスが含まれますが、組み込みを配置する必要がありhttps://github.com/abergmeier/bazel_toolchains
のような出力を探しているようなものを実行することにより、gccの互換コンパイラのパスを含める - あなたが展開する可能性があなたはそれを正確に何を意味しますか? –