Add regression test for sysroot flags on assembly actions

未关闭
#147 0 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

@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 for assemble and preprocess-assemble actions, and
    that -Wl,--sysroot is NOT (linker-only flag).
  • Alternative: an aquery-based check on a .S target's CppCompile action.

Acceptance criteria

  • Test fails when assembly_actions is removed from the sysroot_link_flags feature.
  • Test fails if -Wl,--sysroot leaks into assembly actions.
  • Runs on Linux x86_64 and aarch64 configs; no target hardware needed.
主要语言
Starlark
星标
2
派生
11
平均合并
1 天 14 小时
30 天内合并 PR
10

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

eclipse-score/bazel_cpp_toolchains 的其他 Issue

查看 eclipse-score/bazel_cpp_toolchains 的全部 Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。