Add regression test for sysroot flags on assembly actions
@nradakovic 已经在做这个了。
开始于 2026年9月15日。
评估
这个 Issue 还没有评估数据。
描述
Context
Issue #141 fixed missing --sysroot for assemble/preprocess-assemble actions (fix: sysroot_link_flags feature). The fix shipped without regression coverage because a naive test is unsound.
Why a naive test doesn't work
A .S fixture including a sysroot header (e.g. <features.h>) passes even without --sysroot: the host's /usr/include provides the same glibc (2.39) headers as the autosd10 sysroot, so header resolution alone cannot distinguish sysroot from host fallback — the exact failure mode of #141.
Proposed approach
Assert the resolved command line instead of build success:
- A guardrail-style analysis test (pattern:
tests/guardrails/legacy_feature_guard.bzl)
that resolves the active toolchain and verifies--sysroot=<sysroot>is
present in the flags forassembleandpreprocess-assembleactions, and
that-Wl,--sysrootis NOT (linker-only flag). - Alternative: an
aquery-based check on a.Starget'sCppCompileaction.
Acceptance criteria
- Test fails when
assembly_actionsis removed from thesysroot_link_flagsfeature. - Test fails if
-Wl,--sysrootleaks into assembly actions. - Runs on Linux x86_64 and aarch64 configs; no target hardware needed.
- 主要语言
- Starlark
- 星标
- 2
- 派生
- 11
- 平均合并
- 1 天 14 小时
- 30 天内合并 PR
- 10
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
eclipse-score/bazel_cpp_toolchains 的其他 Issue
-
improvements p3
eclipse-score/bazel_cpp_toolchains#140 · 已指派 1 人 ·
-
action config documentation feature improvements p3 template
eclipse-score/bazel_cpp_toolchains#138 · 1 条评论 · 已指派 1 人 ·
-
eclipse-score/bazel_cpp_toolchains#129 · 已指派 1 人 ·
-
blocked bug p2 toolchain pkg
eclipse-score/bazel_cpp_toolchains#68 · 27 条评论 · 已指派 1 人 ·
-
bug feature p3 template wip
eclipse-score/bazel_cpp_toolchains#53 · 已指派 1 人 ·