From 8928c22726f9f94f6999a6cb358ffb8a176751e6 Mon Sep 17 00:00:00 2001 From: iximeow Date: Sun, 2 Jul 2023 22:41:17 -0700 Subject: try to support cross-arch runners....???? --- src/lua/mod.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/lua') diff --git a/src/lua/mod.rs b/src/lua/mod.rs index c76afa6..46e8047 100644 --- a/src/lua/mod.rs +++ b/src/lua/mod.rs @@ -273,12 +273,25 @@ impl BuildEnv { lua_exports::file_size(&name) })?; + let native_rust_triple = match std::env::consts::ARCH { + "x86_64" => "x86_64-unknown-linux-gnu", + "aarch64" => "aarch64-unknown-linux-gnu", + other => { panic!("dunno native rust triple for arch {}", other); } + }; + let native_rust_triple = lua_ctx.create_string(native_rust_triple).unwrap(); + let build_env_vars = lua_ctx.create_table_from( + vec![ + ("native_rust_triple", native_rust_triple) + ] + ).unwrap(); + let build_environment = lua_ctx.create_table_from( vec![ ("has", path_has_cmd), ("size", size_of_file), ] ).unwrap(); + build_environment.set("vars", build_env_vars).unwrap(); let build_functions = lua_ctx.create_table_from( vec![ -- cgit v1.1