Skip to content

Commit 2062df6

Browse files
committed
probe: the refusal names its row; x86_64-macos stated in the manifest
1 parent b1bd395 commit 2062df6

2 files changed

Lines changed: 14 additions & 11 deletions

File tree

‎.github/workflows/probe-kabi-macos.yml‎

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,19 +39,22 @@ jobs:
3939
4040
- name: "x86_64-macos: Rosetta, build, run"
4141
continue-on-error: true
42+
shell: bash
4243
run: |
43-
set -x
44+
set +e -x
4445
arch -x86_64 /usr/bin/true && echo "READING rosetta=yes" || echo "READING rosetta=no"
4546
mkdir -p /tmp/xm/src && cd /tmp/xm
46-
printf '[package]\nname = "xm"\nversion = "0.1.0"\n\n[targets.xm]\nkind = "bin"\nmain = "src/main.cpp"\n' > mcpp.toml
47+
printf '[package]\nname = "xm"\nversion = "0.1.0"\n\n[targets.xm]\nkind = "bin"\nmain = "src/main.cpp"\n\n[target.x86_64-macos]\ntoolchain = "llvm@%s"\n' "$MCPP_LLVM_VER" > mcpp.toml
48+
cat mcpp.toml
4749
printf 'import std;\nint main() { std::println("xm {}", sizeof(void*)); return 5; }\n' > src/main.cpp
48-
"$FRESH" build --target x86_64-macos --toolchain "llvm@${MCPP_LLVM_VER}" 2>&1 | tail -25
49-
f=$(find target -type f -name xm -perm -u+x | head -1)
50-
file "$f"
51-
"$f"; echo "READING direct rc=$?"
52-
"$FRESH" run --target x86_64-macos --toolchain "llvm@${MCPP_LLVM_VER}" 2>&1 | tail -8; echo "READING run rc=${PIPESTATUS[0]}"
50+
"$FRESH" build --target x86_64-macos 2>&1 | tail -25
51+
ls target
52+
for f in $(find target -type f -name xm -perm -u+x); do file "$f"; otool -L "$f" | head -5; "$f"; echo "READING direct $f rc=$?"; done
53+
"$FRESH" run --target x86_64-macos 2>&1 | tail -8; echo "READING run rc=${PIPESTATUS[0]}"
54+
"$FRESH" why toolchain --target x86_64-macos --format json 2>&1 | head -c 2500; echo
5355
printf '#include <stdio.h>\nint main(void) { printf("c %%d\\n", (int)sizeof(long)); return 6; }\n' > src/main.c
54-
printf '[package]\nname = "xm"\nversion = "0.1.0"\n\n[targets.xm]\nkind = "bin"\nmain = "src/main.c"\n' > mcpp.toml
56+
sed -i '' 's#src/main.cpp#src/main.c#' mcpp.toml
5557
rm -f src/main.cpp
56-
"$FRESH" run --target x86_64-macos --toolchain "llvm@${MCPP_LLVM_VER}" 2>&1 | tail -8; echo "READING c run rc=${PIPESTATUS[0]}"
57-
"$FRESH" test --target x86_64-macos --toolchain "llvm@${MCPP_LLVM_VER}" 2>&1 | tail -5 || true
58+
"$FRESH" run --target x86_64-macos 2>&1 | tail -8; echo "READING c run rc=${PIPESTATUS[0]}"
59+
mkdir -p tests && printf 'int main() { return 0; }\n' > tests/t.cpp
60+
"$FRESH" test --target x86_64-macos 2>&1 | tail -6; echo "READING test rc=${PIPESTATUS[0]}"

‎src/build/prepare/base.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -947,7 +947,7 @@ std::expected<void, std::string> step9_kernel_headers(PrepareState& state) {
947947
if (!measured) {
948948
refusal::record(refusal::Code::TargetBase);
949949
return std::unexpected(std::format(
950-
"{} has no kernel headers to compile against: the base carries none, and the toolchain "
950+
"[target.{}] has no kernel headers to compile against: the base carries none, and the toolchain "
951951
"{} declares none that serve {}.\n"
952952
" State them for the target:\n"
953953
"\n"

0 commit comments

Comments
 (0)