summaryrefslogtreecommitdiff
path: root/src/lua
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2023-07-02 22:41:17 -0700
committeriximeow <me@iximeow.net>2023-07-02 22:41:17 -0700
commit8928c22726f9f94f6999a6cb358ffb8a176751e6 (patch)
tree320f93c35c101c440e689b10f247a6ae081f129c /src/lua
parent7206282e32d5922b15c06aae47e9a362245dff84 (diff)
try to support cross-arch runners....????
Diffstat (limited to 'src/lua')
-rw-r--r--src/lua/mod.rs13
1 files changed, 13 insertions, 0 deletions
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![