Skip to content

Commit 5e308ce

Browse files
committed
Revert further simplifiction
1 parent 8ad5e46 commit 5e308ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/linker.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ gb_internal i32 linker_stage(LinkerData *gen) {
607607

608608
}
609609

610-
if (build_context.build_mode == BuildMode_Executable) {
610+
if (build_context.build_mode == BuildMode_Executable && build_context.reloc_mode == RelocMode_PIC) {
611611
// Do not disable PIE, let the linker choose. (most likely you want it enabled)
612612
} else if (build_context.build_mode != BuildMode_DynamicLibrary) {
613613
if (build_context.metrics.os != TargetOs_openbsd

0 commit comments

Comments
 (0)