瀏覽代碼

Add `-no-pie` flag to linker on Linux

gingerBill 4 年之前
父節點
當前提交
3751322521
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      src/main.cpp

+ 5 - 0
src/main.cpp

@@ -409,6 +409,11 @@ i32 linker_stage(lbGenerator *gen) {
 			#endif
 		}
 
+		if (build_context.metrics.os == TargetOs_linux) {
+			link_settings = gb_string_appendc(link_settings, "-no-pie ");
+		}
+
+
 		if (build_context.out_filepath.len > 0) {
 			//NOTE(thebirk): We have a custom -out arguments, so we should use the extension from that
 			isize pos = string_extension_position(build_context.out_filepath);