It allows all environment variables that detected by read_and_watch_env and read_and_watch_env_os to be general or target-specific, which allows some unavoidable cross-compiling scene.
When compiling jemalloc-sys under Cargo projects, TARGET is set. Variables can be set as target-specific in the form of <TARGET_TRIPLE>_MYENV. For example, AARCH64_APPLE_IOS_JEMALLOC_OVERRIDE will set JEMALLOC_OVERRIDE when cargo is targeting aarch64-apple-ios, which is not affecting other targets.
When AARCH64_APPLE_IOS_JEMALLOC_OVERRIDE and JEMALLOC_OVERRIDE are both set, the build.rs will prefer prefixed one instead of the non-prefixed one. The unprefixed one would only be used when target-specific one is not set.
This fixes #90.
It allows all environment variables that detected by
read_and_watch_env
andread_and_watch_env_os
to be general or target-specific, which allows some unavoidable cross-compiling scene.When compiling jemalloc-sys under Cargo projects,
TARGET
is set. Variables can be set as target-specific in the form of<TARGET_TRIPLE>_MYENV
. For example,AARCH64_APPLE_IOS_JEMALLOC_OVERRIDE
will setJEMALLOC_OVERRIDE
when cargo is targeting aarch64-apple-ios, which is not affecting other targets.When
AARCH64_APPLE_IOS_JEMALLOC_OVERRIDE
andJEMALLOC_OVERRIDE
are both set, the build.rs will prefer prefixed one instead of the non-prefixed one. The unprefixed one would only be used when target-specific one is not set.