Automatically embed resources when cross-compiling

Don't assume that the file system is the same
This commit is contained in:
Simon Hausmann 2020-10-06 23:00:17 +02:00
parent 84b8c37faa
commit a472ca7c28

View file

@ -106,8 +106,8 @@ pub fn compile(path: impl AsRef<std::path::Path>) -> Result<(), CompileError> {
let mut compiler_config = CompilerConfiguration::default();
if let Some(target) = env::var("TARGET").ok() {
if target == "wasm32-unknown-unknown" {
if let (Some(target), Some(host)) = (env::var("TARGET").ok(), env::var("HOST").ok()) {
if target != host {
compiler_config.embed_resources = true;
}
};