SchrodingerZhu / snmalloc-rs

rust bindings of snmalloc

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Adjust for CPU Target

SchrodingerZhu opened this issue · comments

rustc has its own CPU Target configuration.

Should we detect that, and use it as an argument to pass to the cmake?

Or just leave it as a feature flag?

@mjp41

INFORMATION

Sadly, It is not possible to detect target CPU from RUSTFLAG from the build script via environment variables:
https://doc.rust-lang.org/cargo/reference/environment-variables.html

So it is worthy to pass sth from those what I can detect (like CPU features) to CMake to aid optimization?

I understand that setting features automatically may lead to distribution problem for sure.