You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The realised [c-abi] environment reaches assembly units too
A .S unit's command line is assembled independently of a .c/.cpp unit's
(mcpp.build.flags::CompileFlags::as, not ::cc/::cxx), and only inherits the
-D/-U/-I subset of a package's C flags on purpose -- a -std= or -O token
meant for the C compiler is meaningless to GAS. The realised environment
broadcast landed only in privateBuild.cflags/cxxflags, so it never reached
that narrower channel: within one package a .c unit saw _WIN32 undefined
while a .S unit still saw it defined, because --target=/-fno-short-wchar
never reached the assembler's command line at all. Found by the openkal-musl
spike (okm_setjmp.S, and upstream libunwind's assembly.h, both select
register-save sets on that macro) -- a jmp_buf written by one save set and
sized by the other header is a silent mismatch, the exact failure class this
feature exists to remove.
Adds UsageRequirements::asmflags, a broadcast-only channel parallel to
cflags/cxxflags (no [build] asmflags manifest key backs it -- per-glob
`flags = [{ asmflags }]` remains the author-facing one), and routes the
realised environment tokens into it for GAS units only: NASM has no
--target= concept and accepts none of these flags, so it must never receive
them, and a unit test pins that split directly. Every token was checked
against clang's assembler-with-cpp front end first; none is rejected, so
nothing is filtered a second time.
e2e 741 gains a .S unit asserting it carries the same tokens main.cpp does.
0 commit comments