Repository navigation
What stops LLVM building for a ToyOS host, ordered by what blocks what: M2's clang and lld first, then M3's rustc - #644
Conversation
The scout for M3's rustc half of issues/build/toyos-builds-itself.md. Nothing but issues/ changes: the first blocker is outside this brief (the C library), and the exit is further blocked on M2's LLD and on the tooling. How each number was taken, at main 649ea51, with #637's C sysroot de0de8ee7862147a (libc++ in it, clang and LLVM at 849da7d62), APFS-cloned into scratch so nothing of another worktree's was written: - LLVM for a ToyOS host. CMake cross-configure of src/llvm-project/llvm (849da7d62, a private detached worktree of the fork clone) with that clone's clang for x86_64-unknown-toyos, CMAKE_SYSTEM_NAME=ToyOS and UNIX=ON as src/libcxx.rs names the system, the store LLVM's llvm-tblgen, targets AArch64;X86 as clang::LLVM_CONFIG, every host library off. Configure exit 1 at CheckAtomic.cmake:59 with 18 "unable to find library -lm"; with empty libm/libpthread/libdl/librt archives in the scratch sysroot, exit 0. - `ninja -k 0 llvm-libraries`, with only a scratch machine/endian.h: 20 objects failed, 12 of them in the 71 libraries rustc links (llvm-config --libnames of rustc_llvm's required components plus x86 and aarch64): 9 in LLVMSupport, Host.cpp in LLVMTargetParser, two MachO files in LLVMObjectYAML. Scratch headers and forced declarations were added for each missing name, in three layers, until `ninja -k 0` of those 71 targets exited 0. The issue lists every name a layer added. - The link. compiler/rustc_llvm/llvm-wrapper from the pinned fork, compiled for the target with the same defines rustc_llvm's build script gives, archived and linked --whole-archive with the 71 archives, libc++.a and the Rust sysroot's archives (libtoyos_c.a among them) by ld.lld -shared -z defs: 17 duplicate _Unwind_* (libc++.a's libunwind against std's `unwinding`), 2 R_X86_64_TPOFF32 "cannot be used with -shared" against libc++abi's eh_globals; with --allow-multiple-definition, 36 undefined symbols, 29 of them C functions (the other 7: std's allocator shim, LLVMRustStringWriteImpl, main). With --noinhibit-exec -z undefs it wrote a 55,071,992-byte object, 41,131,639 bytes of text. - The linker. A host build of toyos-ld (cargo build -p toyos-ld --release) as -C linker for a std hello.rs compiled for x86_64-unknown-toyos: exit 1, "an executable with thread-local storage: toyos-ld is frozen"; through rust-lld, exit 0. What is read from code and not run is said so in the track: bootstrap's Generic fallback for CMAKE_SYSTEM_NAME, its clang-tblgen panic with an external host LLVM, rustc_llvm's stdc++/C-library/triple-replacement arms, and the two LLVM sites with no ToyOS arm. libc's mmap dropping fd and offset is read from userland/libc/src/posix_io.rs. Filed: the track and five issues it points at. toyos-builds-itself.md gains one pointer paragraph at its end, clear of the lines #637 rewrites. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016t9wjdQkB8SH7bmfUoiy6L
|
Round 1 at BLOCKER
NOTE
REMOVE
SEND BACK |
The track loses M3's C++ runtime clause here, and the runtime cannot yet link into a Rust std binary: two unwinders and local-exec thread-locals. That record reaches main with this branch, byte for byte as #644 wrote it at e328753; every citation it makes resolves here. n2's doc drops "one commit, with its own lock": `--rev` and `--locked` say it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016t9wjdQkB8SH7bmfUoiy6L
…s a build or a test can fail Round 2 of the scout, answering the review of e328753. The track goes. Its exit was M3's rustc exit word for word, which the Cranelift rustc meets the day a linker runs in the guest, so it could not fail on its own title. toyos-builds-itself.md now orders what stops LLVM building for a ToyOS host, configure, compile, link, run, test, then the linker, and says which of it blocks M2's clang and lld before M3's rustc; toyos-has-no-c-compiler-inside-it.md cites the same issues. Both edits sit clear of the lines #637 and #568 rewrite. The track's "what the build must also do" becomes llvm-and-rustcs-build-have-no-arm-for-a-toyos-host.md, whose exit is bootstrap building rustc_llvm for x86_64-unknown-toyos and the guest's `rustc -vV` printing `LLVM version:`: the Cranelift backend's print_version prints `Cranelift version:` (rust/compiler/rustc_codegen_cranelift/src/lib.rs), so today's hosted rustc fails it. The bit.h and Path.inc fixes are said to be upstream-shaped LLVM arms, and clang-tblgen and the cross target's paths to be fixed in ToyOS's build or carried as the LLD precedent is. The POSIX-surface issue gives stage 3 of the child-process track wait, wait4 and the signal-set calls, and the header-drift issue SIGUSR1 and the names libc defines and declares nowhere (dirent.h, ftruncate, fchmod). Its exit now asks each name to do what POSIX says or refuse as POSIX reports an error, ENOSYS for setsid, getsid, execv and execve, with a guest C case per function and a host test that compiles and links one probe per name against the C sysroot. alarm leaves it for libc-has-no-alarm.md: POSIX gives alarm no refusal, and its SIGALRM reaches a handler only through stage 3's imitated signals. aligned_alloc leaves it for a-rust-std-program-defines-no-aligned-alloc.md: link-shared3.log has libc++.a's stdlib_new_delete.cpp and fallback_malloc.cpp reference it, and in a std program the C allocator is std's (rust/library/std/src/sys/pal/toyos/mod.rs), not libc's. Filed: fcntl's and fchmod's answer-0 stubs; pread and pwrite's seek-read-seek, which LLVM reads every file slice through once a header declares pread; and readdir answering DT_REG for a directory, which LLVM trusts once dirent.h defines DTTOIF. mmap's exit is the refusal: a file mapping, shared or private, answers ENODEV. The kernel maps no file, and LLVM falls back to read (MemoryBuffer) and to a buffer in memory (FileOutputBuffer) when a map fails. The shared case is in that exit: FileOutputBuffer maps lld's output MAP_SHARED and writable, which libc maps private, so lld inside ToyOS would write zeros and report success. Read from llvm/lib/Support/FileOutputBuffer.cpp at 849da7d62, not run. The configure's exit-1 arm now has a log. Rerun at 849da7d62 (git archive of llvm/, cmake/, third-party/ into scratch) against APFS clones of #637's C sysroot de0de8ee7862147a's c/, with the sysroot's own clang and the store LLVM 1425e623e612b348's llvm-tblgen, no scratch headers: - as laid out: CONFIGURE_EXIT=1 at CheckAtomic.cmake:59; CMakeConfigureLog.yaml holds `unable to find library -lm` 18 times and -lpthread, -lc, -ldl, -lrt and -latomic once each; - with empty libm.a, libpthread.a, libdl.a and librt.a: CONFIGURE_EXIT=0; eleven probes flip from failed to passed between the two logs, and the libm exit names exactly those. pread is not found in either. The rust-lld control and the byte sizes had no log and go with the track. The worktree issue says #629's the-hosted-rustc-is-not-built.md covers it and whichever lands second folds it. The C++ runtime issue loses the line citations into libunwind and unwinding, and says #637's follow-up closes it; #637 now carries a copy, and main's copy replaces this one once #637 lands. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016t9wjdQkB8SH7bmfUoiy6L
|
Round 2 at Round-1 BLOCKERs
BLOCKER
NOTE
REMOVE
SEND BACK |
#637 carries issues/build/a-rust-std-binary-cannot-link-the-cxx-runtime.md; main's copy is kept and this branch's is dropped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016t9wjdQkB8SH7bmfUoiy6L
…reads its effect back
The LLVM and rustc build issue is two. Bootstrap reads CLANG_TABLEGEN only
when it builds clang (src/bootstrap/src/core/build_steps/llvm.rs,
builder.config.llvm_clang), so clang-tblgen, the Generic CMake fallback,
bit.h and is_local_impl stand between M2 and clang and lld for a ToyOS host:
bootstrap-cannot-build-llvm-clang-and-lld-for-a-toyos-host.md, whose exit is
bootstrap installing a clang and an ld.lld for x86_64-unknown-toyos.
rustc_llvm's C++ runtime, C library and cross paths are M3's alone:
rustc-llvm-cannot-build-for-a-toyos-host.md keeps the rustc -vV exit. The
track lists each under its milestone.
Neither LLVM nor Rust changes for a ToyOS tool. The platform arms stay arms;
clang-tblgen and the cross paths name what ToyOS's own build must do
instead. Bootstrap finds clang-tblgen only in the CMake build directory of a
host LLVM it built itself, and rustc_llvm swaps the host triple in the host
llvm-config's paths, both of which hold for a bootstrap build directory and
neither for the store's. Bootstrap's ToyOS arm is refused by LLVM's
configure ("Unable to determine platform", HandleLLVMOptions.cmake at
849da7d62) until CMake sets UNIX, which only a platform module does
(Platform/UnixPaths.cmake), so the issue cites the CMake-platform one.
aligned_alloc's exit asks for the address to be a multiple of the requested
alignment, at 64 and 4096, and for free and realloc to release each block at
the layout it was allocated with. dlmalloc 0.2.14 checks a freed size and
ignores the alignment, so no case sees the second half; std's realloc
releases at alignment 16 as its free does.
The libc cases each read their effect back: F_GETFL on an O_RDWR | O_APPEND
descriptor, F_DUPFD at least its argument, chmod beside fchmod (LLVM's
setPermissions calls both); the old mask of a second pthread_sigmask or
sigprocmask, getrlimit after setrlimit, readlink of symlink, the file
through link's name. sigprocmask, an answer-0 stub LLVM calls from
Unix/Signals.inc, joins the POSIX issue, and SIGUSR1 returns to its signal.h
line, since the header-drift exit checks prototypes only. alarm(0) answers
1 to 5 after alarm(5) and 0 after that, since LLVM's Wait disarms with it
before restoring the old SIGALRM action. The pread race runs over a file
whose every 8-byte word holds its offset, today's pread and pwrite its
negative control, and a pwrite arm joins it. readdir never answers DT_REG
for a directory.
Removed: the LLD-precedent clause, the paragraph naming an open PR and a
file main does not have, and toyos-has-no-c-compiler-inside-it.md's copy of
the track's list, which returns to main's.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016t9wjdQkB8SH7bmfUoiy6L
|
Round 3 at Round-2 BLOCKERs
NOTE
REMOVE
LAND |
#644's final review tightened what this must satisfy. - aligned_alloc in a Rust std program is std's C allocator's now (the rust pin moves to 9151571cae9, one commit on aca5f527fcb): each block carries its size and alignment in front of it, as libc's own allocator does, and free and realloc release it at that layout. libc's std-runtime aligned_alloc, which answered std's malloc for an alignment to 16 and EINVAL above, goes with memreq::std_aligns and its test. tests/toyos-rust-tests/src/bin/c_aligned_alloc.rs allocates at 64 and 4096, reallocs the 4096 block to 1 MiB and checks its first bytes carried, and frees each; dlmalloc asserts a released block's size, so a block released at another layout ends the program. - fcntl's F_DUPFD answers a working duplicate at or above its argument, the first the kernel hands dup, the lower ones taken on the way closed again; a negative argument is EINVAL. F_DUPFD_CLOEXEC stays refused: close-on-exec is stage 3's. 206_libc_refusals fstats the duplicate for the file's byte. - src/libc.rs's test module is at the end of the file, where clippy's items_after_test_module has it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016t9wjdQkB8SH7bmfUoiy6L
…nto wt/toyos-libcllvm No conflict. #644's issues cite issues/build/libc-headers-are-written-by-hand-and-drift-from-its-definitions.md, which this branch closed (its exit is toyos-libc-copies/src/prototypes.rs): the five citations drop that path, and the track's points at the gate. The issues this branch meets are closed, and the rest brought up to date, in the commit after this one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016t9wjdQkB8SH7bmfUoiy6L
…back #644 landed the issues this branch's work answers. Each is met here and deleted, or brought up to date: - the-c-sysroot-has-no-libm-so-llvms-configure-fails: configure exits 0 against this C sysroot with the eleven probes it names passing (measured, PR body). Its exit also names -lc: libc.a joins the empty libraries, and 206_libc_refusals links with -lc -lm -lpthread -ldl -lrt (tests/common/compile.rs's LINK_FLAGS), so a sysroot missing one builds no corpus. - libc-mmap-ignores-the-file-it-is-asked-to-map: a file, private or shared, at offset 0 or a later page, is ENODEV, each asserted by 206. - libc-readdir-calls-every-entry-a-regular-file: 207 lists a file and a directory. - libc-fcntl-and-fchmod-answer-0-and-do-nothing: every fcntl command does what POSIX says or answers -1 with errno, F_DUPFD's duplicate is fstat'd, and chmod and fchmod refuse with the mode read back through stat and fstat. What fcntl still refuses is libc-refuses-what-toyos-cannot-yet-answer's. - a-rust-std-program-defines-no-aligned-alloc: std's aligned_alloc, the previous commit. - toyos-libc-lacks-the-posix-surface-llvm-compiles-against: every name it lists is declared and defined, refused with errno, or (wait, wait4, the signal-set calls, alarm) stage 3's. madvise is new: Linux's four hints taken, its MADV_DONTNEED discard refused ENOSYS, anything else or an address off a page EINVAL, its rule memreq's and host-tested. 207 prints the macros and sizes LLVM reads, so the corpus is a compile and link probe of every name. - libc-pread-and-pwrite-move-the-offset-another-thread-shares is renamed libc-has-no-pread-or-pwrite: they are gone, and its exit stands. - toyos-builds-itself.md's M2 and M3 lists name what is left; libc-has-no- alarm.md and the bootstrap issue cite what stands instead of the closed POSIX issue, the bootstrap issue with the LLVM measurement. The sysroot recipe moves (10): a C sysroot now holds libc.a. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016t9wjdQkB8SH7bmfUoiy6L
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016t9wjdQkB8SH7bmfUoiy6L
…toyos-noredlist #588 landed first, and its `usb_stick_left` arms `usb-transport-break`, `usb-reset-moves`, `usb-reset-moves-after` and `usb-reset-moves-configured` again, its T14 row (`usbbreak`) arms `usb-transport-break`, and its metal record carries the `usbbreak` rows. Those stay, with `msc::transport_break`, `msc::reset_moves`, `RECOVERING` and `Quiet::Staged`. Everything else this branch deleted with `usb_transport_break` (90ecefe, b5c59cb, 402107b, 9ebf080) stays deleted: no test on either side arms it. Conflicts, every hunk: - `kernel/src/actuator.rs`, two hunks. First: main's eight USB rows. Kept `usb_transport_break`, `usb_reset_moves`, `usb_reset_moves_after` and `usb_reset_moves_configured`, with `usb_reset_moves`' doc losing its citation of the deleted `usb_transport_break`; dropped `usb_transport_offline`, `usb_reset_break`, `usb_transport_break_owed` and `usb_transport_break_flushed`, armed only by the deleted `usb_transport_break`, `log_flush_retry` and `partition_claim_departure`. Second: dropped `watch_window` (`blocking_read_window`, deleted in dc62efc), kept #634's `handler_post`. - `kernel/src/drivers/xhci/wait/msc.rs`, fourteen hunks, misaligned by #588's rewrite of the file. Resolved as main's file with this branch's deletions applied to it: `Asks` and `bot`'s `asks` argument at its five call sites; `transport_break`'s owed and flushed half (`WROTE`, `FLUSHED`, `AFTER_A_FLUSH`, `wrote`, `flushed`, their calls in `MscDevice::wrote` and the flush, and `arm`'s argument), so `arm` reads `usb-transport-break` alone; `return_silent` and its hook in `served`; `reset_break` and the wrapper around `climb`, whose body `climb_until_in_step` carries again; `short_read` and its hold and release around the data phase; `staged` and its checks in `bot`, the bad signature, the withheld CBW, the gone port and the unanswered wait; the bind's `slow_return` stall and INQUIRY staging, and `slow_return` itself; `read_serial`'s short ask. `reset_moves`, its three holds and `RECOVERING` are main's as they stand. - `kernel/src/watch.rs`, one hunk: dropped the `window` module (`watch-window`), kept #634's `handler_post` module. - `toyos-sched/src/watch.rs`, one hunk: the same, `window` dropped and `handler_post` kept. - `src/lib.rs`, one hunk: kept #652's `pub mod n2`, dropped `pub mod redlist`. - `tests/common/power.rs`, one hunk: main's only change there renamed `transport_break_chain`'s doc to `usb_stick_left`; its one caller is the deleted `usb_transport_break`, so it stays deleted. - `tests/common/usb.rs`, one hunk holding main's whole `usb_transport_break` region. Kept #588's `Held`, `usb_stick_left`, `a_stick_that_left_under_its_rung`, `transport_break_on_metal`, `transport_break_recovered` (which `tests/checks/usb.rs` judges) and `broke_on`; the rest is `usb_transport_break`'s and stays deleted: `a_read_whose_first_wait_spent_its_budget_goes_out_again`, `serial_short_is_not_read`, `cpu_of`, `line_with`, `Moved`, `a_stick_its_reset_moved_carries_on`, `abandoned_write_is_taken_offline`, `no_command_was_refused`, `port_gone_is_left_to_the_teardown`, `control_requests`, `command_blocks`, `every_reset_is_followed_by_a_test_unit_ready`, `is_a_rungs_configuration`, `every_port_reset_is_followed_by_a_test_unit_ready`, `every_reset_is_followed_by_both_clears` and `transport_gives_up`. - `tests/toyos.rs`, five hunks. `MACHINE_TESTS`: kept `usb_stick_left` and #634's `handler_post_without_a_pass`; dropped `usb_transport_break`, `xhci_full_speed_device` (5e42235), `blocking_read_window` and `user_copy_races_munmap` (7ea6be1). `METAL`: kept #588's `usb_stick_left` row. Dispatch: kept `usb_stick_left` and `handler_post_without_a_pass`; dropped `usb_transport_break`, `xhci_full_speed_device` and `smp_failed_ap_leaves_no_hole` (aedcf17). Outside the conflicts: - `kernel/src/drivers/xhci/wait/mod.rs`: `Quiet::Staged` and its line come back, which `transport_break::take` answers with; the auto-merge had taken 9ebf080's deletion. The `reset_break` and `return_silent` hooks stay deleted. - `src/metal.rs`: `FLASHABLE`'s `usb-transport-break` row comes back (b5c59cb took it), since `usb_stick_left`'s T14 arm flashes it. - `issues/kernel/a-held-disk-waits-for-a-pass-no-cpu-takes-when-every-cpu-is-in-a-call-on-it.md`: records `4f2bea143`, this merge's second parent, as the tree holding #588's version of `usb_transport_break`, in place of the instruction to record it. - `issues/boot-media/logd-ends-the-boots-log-on-one-refused-create-and-nothing-durable-says-so.md`: drops its citation of `power::transport_break_chain`, deleted in 90ecefe. The `rust` gitlink is main's. On this tree: `cargo run -- --build-only` exit 0; the kernel's `cargo check` for x86-64 and AArch64, bare, with `boot-actuators` and with `boot-actuators,test-actuators`, exit 0 each; `cargo test --test toyos-build --no-run` exit 0, no warning. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016t9wjdQkB8SH7bmfUoiy6L
The self-hosting scout's findings: what stops LLVM building for a ToyOS host, ordered by what blocks what and filed under the milestone each blocks, each with an exit a build or a test can fail. Issues only. No fork is touched, and no code.
The order
issues/build/toyos-builds-itself.mdcloses with the two lists.M2, LLVM, clang and lld built for a ToyOS host:
bootstrap-cannot-build-llvm-clang-and-lld-for-a-toyos-host.md'sclang-tblgenand CMake system, andthe-c-sysroot-has-no-libm-so-llvms-configure-fails.md.toyos-libc-lacks-the-posix-surface-llvm-compiles-against.md, the names it leaves to the header-drift issue, and the bootstrap issue'sbit.handis_local_impl.libc-has-no-alarm.md.mmap,fcntl/chmod/fchmod,pread/pwriteandreaddir.M3, a rustc that carries that LLVM, after all of M2's:
rustc-llvm-cannot-build-for-a-toyos-host.md.a-rust-std-binary-cannot-link-the-cxx-runtime.md(on main, from A C++ runtime for ToyOS: libc++, libc++abi and libunwind in every C sysroot #637) anda-rust-std-program-defines-no-aligned-alloc.md.a-worktree-cannot-build-a-hosted-rustc-of-its-own.md.the-hosted-rustc-names-a-linker-toyos-does-not-have.md. toyos-ld is not that linker: it refuses every executable with thread-local storage (ld/toyosld.log).Decisions
rustc_llvmare two issues. Bootstrap readsCLANG_TABLEGENonly when it builds clang (src/bootstrap/src/core/build_steps/llvm.rs,builder.config.llvm_clang), soclang-tblgen, the CMake system,bit.handis_local_implblock M2, whose exit is bootstrap, withclang = true, installing a clang and anld.lldforx86_64-unknown-toyos.rustc_llvmblocks M3 alone and keeps the exit the guest'srustc -vVprintingLLVM version:; today's hosted rustc fails it, because Cranelift'sprint_versionprintsCranelift version:.bit.h,is_local_impl, bootstrap's CMake system andrustc_llvm's C++ runtime and C library are ToyOS platform arms at existing dispatch sites.clang-tblgenandrustc_llvm's cross paths are none: each names what ToyOS's own build must do. Bootstrap findsclang-tblgenonly in the CMake build directory of a host LLVM it built itself, andrustc_llvmfinds a cross target's LLVM by swapping the host triple in the host LLVM's paths. Both hold for a bootstrap build directory that holds both LLVMs, and neither holds for the store's, which every compiler build names as the host'sllvm-config.CMAKE_SYSTEM_NAME=ToyOSwithoutUNIXwithUnable to determine platform(HandleLLVMOptions.cmakeat849da7d62). CMake setsUNIXonly from a platform module (Platform/UnixPaths.cmake), so the bootstrap issue citesthe-cxx-runtime-names-toyos-to-cmake-as-unix.md.aligned_alloc's exit asks for the alignment and the layout. The address must be a multiple of the requested alignment, asserted at 64 and 4096.freeandreallocmust release each block at the layout it was allocated with, which no case can see: std's dlmalloc 0.2.14 checks a freed block's size (validate_size) and ignores its alignment.reallocis in the exit besidefreebecause it releases the old block at alignment 16 today, asfreedoes.fcntl's case assertsF_GETFLon anO_RDWR | O_APPENDdescriptor andF_DUPFDanswering at least its argument, andchmod(setPermissionsinUnix/Path.inccalls it besidefchmod) joinsfchmod. The POSIX case reads back the old mask a secondpthread_sigmaskorsigprocmaskanswers,getrlimitaftersetrlimit,readlinkofsymlink, and the file throughlink's name;sigprocmask, which answers 0 and does nothing and which LLVM calls (Unix/Signals.inc), is on the issue.SIGUSR1is on itssignal.hline: the header-drift issue's exit checks prototypes only.alarm(0)answers 1 to 5 afteralarm(5), and 0 again after that, because LLVM'sWaitdisarms withalarm(0)before restoring the oldSIGALRMaction.pread's race case runs over a file whose every 8-byte word holds its own offset, with today'spreadandpwriteas its negative control.readdir's case asserts a directory never answersDT_REG.mmap's exit is the refusal,ENODEVfor a file mapping, shared or private, at offset 0 or a later page. The kernel maps no file, and LLVM falls back when a map fails: toreadinMemoryBuffer, to a buffer in memory inFileOutputBuffer.FileOutputBuffermaps lld's output shared and writable, which libc maps private today, so lld in the guest would write zeros and report success. That is read fromFileOutputBuffer.cpp, not run.Evidence
Logs under the job's scratchpad,
orch/rustcllvm/. They back the 20 failed objects, 12 of them in rustc's 71 libraries (build-libs.log,NINJA_EXIT=1), down to none (build-libs3.log,NINJA_EXIT=0). They back the 17 duplicates (link-shared2.log,LINK_EXIT=1), the twoTPOFF32errors and the 36 undefined symbols (link-shared3.log,LINK_EXIT=1), and the toyos-ld refusal (ld/toyosld.log).The configure ran on
git archiveofllvm/,cmake/andthird-party/at849da7d62into scratch, so the fork clone was untouched. The C sysroot was an APFS clone of #637'sde0de8ee7862147ac/, built with that sysroot's clang and withllvm-tblgenfrom store LLVM1425e623e612b348. No scratch headers were used.CONFIGURE_EXIT=1atCheckAtomic.cmake:59(r2/configure-red.log). The log holdsunable to find library -lm18 times, and-lpthread,-lc,-ldl,-lrtand-latomiconce each.libm.a,libpthread.a,libdl.aandlibrt.a:CONFIGURE_EXIT=0(r2/configure-green.log). Eleven probes flip from failed to passed (r2/probes-red.txtagainstr2/probes-green.txt).The bootstrap and
rustc_llvmfindings are read, not run:llvm.rsandrustc_llvm/build.rsat the fork pinaca5f527f, andHandleLLVMOptions.cmake,bit.h,Unix/Path.inc,Unix/Program.inc,Unix/Process.inc,Unix/Signals.incandCrashRecoveryContext.cppfetched fromToyOSOrg/llvm-projectat849da7d62.Gates, at this branch's head
cargo run -- --ci hostat94139d9e4: EXIT=0, "56 step(s), all green" (r3/ci-host2.log).No guest run is needed: the branch changes
issues/only.Unsure
de0de8ee7862147a, built from its branch, and none was repeated on a sysroot built from main.ENODEVis the errno POSIX gives for a file mmap cannot map. Refusing, rather than copying the file into private memory as thememmap2fork does for read-only mappings, is a choice between two exits that both hold.alarm(0)answers show what libc records, not that no timer is left armed; no case here can show that without waiting on a signal that should never come.src/llvm.rs's store to change how it builds or lays out an LLVM. Neither is designed here.🤖 Generated with Claude Code
https://claude.ai/code/session_016t9wjdQkB8SH7bmfUoiy6L