【发布时间】:2019-04-27 03:11:23
【问题描述】:
我们计划使用 Bazel 对不同的 Arch 目标进行交叉编译,但我们遇到了一些关于工具链的问题:
根据docs,我们将工具链配置为:
toolchain_include_directories_feature = feature(
name = "toolchain_include_directories",
enabled = True,
flag_sets = [
flag_set(
actions = [
"ACTION_NAMES.assemble",
"ACTION_NAMES.preprocess_assemble",
"ACTION_NAMES.linkstamp_compile",
"ACTION_NAMES.c_compile",
"ACTION_NAMES.cpp_compile",
"ACTION_NAMES.cpp_header_parsing",
"ACTION_NAMES.cpp_module_compile",
"ACTION_NAMES.cpp_module_codegen",
"ACTION_NAMES.lto_backend",
"ACTION_NAMES.clif_match",
],
flag_groups = [
flag_group(
flags = [
"-isystem",
"/opt/buildtools/sdk/usr/include",
],
),
],
),
],
)
我们得到错误:
ERROR: /home/project/aa/BUILD:1:1: undeclared inclusion(s) in rule '//aa:mylib':
this rule is missing dependency declarations for the following files included by 'aa/source/export.c':
'/opt/buildtools/sdk/usr/include/stdc-predef.h'
任何想法,谢谢。
添加:环境信息
LSB Version: n/a
Distributor ID: SUSE
Description: SUSE Linux Enterprise Server 12 SP4
Release: 12.4
Codename: n/a
4.12.14-94.41-default #1 SMP Wed Oct 31 12:25:04 UTC 2018 (3090901) x86_64 x86_64 x86_64 GNU/Linux
Bazel version: 0.24.1
【问题讨论】:
标签: arm cross-compiling bazel toolchain