Skip to content
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

Use riscv64-unknown-linux-gnu for target on clang. #608

Merged
merged 1 commit into from
Jun 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 9 additions & 0 deletions cc-test/src/riscv64gc.S
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.globl asm
asm:
li a0, 7
ret

.globl _asm
_asm:
li a0, 7
ret
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this perhaps a stray file? (I'm not sure if this is used?)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when running cargo test on cc-test, .S file is used in https://github.com/alexcrichton/cc-rs/blob/b63f824ca395a3a063d97d7f7714fab9a0ab8116/cc-test/build.rs#L24-L31. This is for test.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah indeed!

4 changes: 4 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1484,6 +1484,10 @@ impl Build {
.into(),
);
}
} else if target.starts_with("riscv64gc-") {
cmd.args.push(
format!("--target={}", target.replace("riscv64gc", "riscv64")).into(),
);
} else {
cmd.args.push(format!("--target={}", target).into());
}
Expand Down