Inflation

Results 66 comments of Inflation

The Windows one is that you are linking with a different MSVC runtime library. By default, it will use `MultiThreadedDLL` (CMake) or `/MD` (link.exe) variant, which should be consistent with...

The macOS one is unfortunately a limitation of Rust. You need to manually set `RUSTFLAGS=-C default-linker-libraries` env somehow. The best way is probably a line in the doc for now.

> Excuse my ignorance here :-) isn't defining that variable something that the build script should do? I do think Zola is producing a static build (haven't confirmed it though)...

In theory, yes. However, these customizations should left untouched so people can easily overwrite anything they need.

> While investigating this issue, I ran into https://github.com/rust-lang/cmake-rs - is there any reason not to use that crate? Already using in `jpegxl-src`.

> I do not quite understand why it is being explicitly set here for Windows builds then - is the behaviour of `cmake-rs` incorrect? Rust itself will always dynamic link...

After some investigation, it seems that the underlying `cc` crate should set those variables automatically, but that's not the case here. I'm going to discuss more with them.

#53 should fix the Windows build issue for now. I still haven't found a better solution for macOS. The problem is that `libjxl` needs something from `compiler_rt` but `rustc` passes...

`___cpu_models` as shown in the error log. It's for CPU feature detection, which is why it's only happened on x86 (and why I didn't catch that)