[llvm] [MCJIT] Fix frem.ll test failure with LLVM_ENABLE_RPMALLOC on Windows (PR #200319)

Lang Hames via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 10 18:54:00 PDT 2026


https://github.com/lhames commented:

I want to avoid special casing this if we can.

I don't have a windows machine handy, but I assume that `printf` is exported from the main binary because it's linked from there, and that `fflush` is not?

What happens if you add something like this to `lli.cpp` instead?
```c++
/// Force C APIs that should be accessible to JIT'd code under lli
/// to be linked into the main binary.
static void __attribute__((used)) forceLinkLibCAPIs() {
  (void)&fflush;
  // Add future C API here.
}
```

https://github.com/llvm/llvm-project/pull/200319


More information about the llvm-commits mailing list