-
Notifications
You must be signed in to change notification settings - Fork 56
Cross build luajit to aarch64-linux from x86 host #160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
why the |
Thanks for reviewing. |
build/luajit.zig
Outdated
@@ -210,6 +243,11 @@ pub fn configure(b: *Build, target: Build.ResolvedTarget, optimize: std.builtin. | |||
return lib; | |||
} | |||
|
|||
fn getPath(lazy_path: Build.LazyPath, src_builder: *Build, asking_step: ?*Step) []const u8 { | |||
const p = lazy_path.getPath3(src_builder, asking_step); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are users of the Zig build system supposed to call this function? I'm pretty sure they are not, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes you are right, the function was added originally and then not used, I forgot to remove it.
build/luajit.zig
Outdated
@@ -96,12 +123,18 @@ pub fn configure(b: *Build, target: Build.ResolvedTarget, optimize: std.builtin. | |||
buildvm.step.dependOn(&dynasm_run.step); | |||
buildvm.step.dependOn(&genversion_run.step); | |||
|
|||
const buildvm_c_flags = switch (target.result.cpu.arch) { | |||
.aarch64, .aarch64_be => &[_][]const u8{ "-DLUAJIT_TARGET=LUAJIT_ARCH_arm64", "-DLJ_ARCH_HASFPU=1", "-DLJ_ABI_SOFTFP=0" }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this appropriate for every instance of an aarch64 target? also i think preferred zig style would be to give buildvm_c_flags
type []const []const u8
and instead use &.{ // ... }
instantiation here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I don't get what "every instance" mean here
Thanks for the zig style variable insturction, I'll update it.
.editorconfig
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think this is a great file to have in your own copy of this repo, but i don't think it makes sense to add it to our source control.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, then I'll remove this file from PR
2. Add cross build for lua51 and luajit 3. Add editorconfig
2. Use zig-style variable for buildvm_c_flags
Ths PR includes
The aim is to build neovim with luajit support for raspberry pi aarch64 from x86 host