atetubou wrote: Thanks @ChuanqiXu9 for the feedback.
To clarify the non-determinism: Under `-fmodules`, PCM declarations are lazily deserialized. Due to filesystem enumeration order differences (ext4 hash order on Linux vs NTFS alphabetical on Windows) during module map scanning, the `hypotf` declaration from `<math.h>` happened to be eagerly deserialized prior to CodeGen in some environments, but remained deferred in others. This caused CodeGen to inconsistently emit either `@_hypotf` (with dllimport) or `@hypotf` (without dllimport), leading to link errors on Windows. I agree that relying on the AST lookup state in this PR was a workaround. To resolve this deterministically without depending on header inclusion or modules deserialization states, I opened a new one: https://github.com/llvm/llvm-project/pull/207135. The new PR directly resolves `__builtin_hypotf` to `_hypotf` (and sets `dllimport` under `/MD`) as a fallback in CodeGen, ensuring consistent and correct output across all platforms. https://github.com/llvm/llvm-project/pull/204792 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
