Hi, Thanks for the suggestion. I pushed a follow-up commit to mob:
3b1fe97a win32: define arm64 Interlocked helpers in winnt.h This moves the Windows/ARM64 TinyCC Interlocked workaround from the compile-lock call site into the bundled WinAPI headers. tcc.h now uses the normal Interlocked API again, while winnt.h provides the TCC ARM64 fallback definitions to avoid unresolved imports. This made the change broader than the previous targeted fix: lib/bt-exe.c also had to be updated to avoid defining a second InterlockedExchange fallback now provided by winnt.h. I also added a tests2 case covering the Windows/ARM64 Interlocked definitions. Regards, Mounir IDRASSI From: grischka <[email protected]> To: <[email protected]> Cc: "Mounir IDRASSI"<[email protected]> Date: Thu, 21 May 2026 23:28:23 +0900 Subject: Re: [Tinycc-devel] win32: avoid Interlocked imports for tcc arm64 > Hi, I'd suggest to fix that generically in the header file (winnt.h) rather > than in some source code. > > --gr > > On May 21, 2026 12:24:57 AM UTC, Mounir IDRASSI via Tinycc-devel > <[email protected]> wrote: > >Hello, > > > >I pushed the following commit to mob: > > > > 904e95cb win32: avoid Interlocked imports for tcc arm64 > > > >This is a follow-up to the Windows compile-lock initialization change, > >after > >receiving a report of a failure on the GitHub mirror CI: > > > > https://github.com/TinyCC/tinycc/actions/runs/25925479935/job/76205486021 > > > >The failure was: > > > > tcc: error: could not resolve symbol 'InterlockedCompareExchange' > > tcc: error: could not resolve symbol 'InterlockedExchange' > > > >Windows/arm64 exposes Interlocked* operations as compiler intrinsics rather > >than kernel32 exports. When tcc -run self-compiles tcc.c, calls to > >InterlockedCompareExchange or InterlockedExchange can therefore remain as > >unresolved imports in the in-memory linker. > > > >The fix routes the TinyCC Windows/arm64 path through the existing __atomic > >helpers while keeping Interlocked* for other Windows compilers. The > >existing > >compile-lock initialization state machine is otherwise unchanged. > > > >Regards, > > > >Mounir IDRASSI > > > > > > > >_______________________________________________ > >Tinycc-devel mailing list > >[email protected] > >https://lists.nongnu.org/mailman/listinfo/tinycc-devel > _______________________________________________ Tinycc-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/tinycc-devel
