Browse Source

Revert further simplifiction

0dminnimda 10 months ago
parent
commit
24ec0f0ebf
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/linker.cpp

+ 1 - 1
src/linker.cpp

@@ -607,7 +607,7 @@ gb_internal i32 linker_stage(LinkerData *gen) {
 
 			}
 
-			if (build_context.build_mode == BuildMode_Executable) {
+			if (build_context.build_mode == BuildMode_Executable && build_context.reloc_mode == RelocMode_PIC) {
 				// Do not disable PIE, let the linker choose. (most likely you want it enabled)
 			} else if (build_context.build_mode != BuildMode_DynamicLibrary) {
 				if (build_context.metrics.os != TargetOs_openbsd