Skip to content

Commit

Permalink
fix: only use sdl2 sub when cross-compiling
Browse files Browse the repository at this point in the history
isNative() will return false if CPU isn't native e.g. Dcpu=baseline,
even when building a linux executable on a linux distro like ubuntu
  • Loading branch information
paoda committed Mar 6, 2024
1 parent f10c8d2 commit cd90212
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ pub fn link(sdk: *Sdk, exe: *Compile, linkage: Compile.Linkage) void {

const b = sdk.build;
const target = exe.root_module.resolved_target.?;
const is_native = target.query.isNative();
const is_native = target.query.isNativeOs();

// This is required on all platforms
exe.linkLibC();
Expand Down

0 comments on commit cd90212

Please sign in to comment.