Skip to content

Commit dd69686

Browse files
authored
Explicitly set Position independent code (#7)
Signed-off-by: James Sturtevant <jsturtevant@gmail.com>
1 parent d7b5e42 commit dd69686

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/toolchain.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ pub fn cflags(args: &Args) -> OsString {
8686
// https://github.com/hyperlight-dev/hyperlight/blob/main/src/hyperlight_guest_bin/build.rs#L80
8787
"--target=x86_64-unknown-linux-none",
8888
"-U__linux__",
89+
// Our rust target also has this set since it based off "x86_64-unknown-none"
90+
"-fPIC",
8991
// We don't support stack protectors at the moment, but Arch Linux clang
9092
// auto-enables them for -linux platforms, so explicitly disable them.
9193
"-fno-stack-protector",

0 commit comments

Comments
 (0)