Skip to content

Skip using int_util.c on UEFI targets #505

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

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ mod c {
("__cmpdi2", "cmpdi2.c"),
("__ctzdi2", "ctzdi2.c"),
("__ctzsi2", "ctzsi2.c"),
("__int_util", "int_util.c"),
("__mulvdi3", "mulvdi3.c"),
("__mulvsi3", "mulvsi3.c"),
("__negdi2", "negdi2.c"),
Expand All @@ -216,6 +215,15 @@ mod c {
("__ucmpdi2", "ucmpdi2.c"),
]);

// UEFI is treated as a windows target when compiling with
// clang, and int_util.c includes stdlib.h for windows targets
// even though we are compiling with `-ffreestanding`. That
// header may not be present might be incompatible, so skip this
// file on UEFI targets.
if target_os != "uefi" {
sources.extend(&[("__int_util", "int_util.c")]);
}

if consider_float_intrinsics {
sources.extend(&[
("__divdc3", "divdc3.c"),
Expand Down