From f24a7f5a8cde9ebc1d9e6ec6605cb1b3078003c4 Mon Sep 17 00:00:00 2001 From: slhmy Date: Sun, 29 Sep 2024 19:22:46 +0800 Subject: [PATCH] Add -O2 -static to CPP_COMPILE_COMMAND_TEMPLATE --- judge-core/src/compiler.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/judge-core/src/compiler.rs b/judge-core/src/compiler.rs index 6a7f4cb..b00bde0 100644 --- a/judge-core/src/compiler.rs +++ b/judge-core/src/compiler.rs @@ -10,7 +10,7 @@ const TEMPLATE_ARG_SRC_PATH: &str = "{src_path}"; const TEMPLATE_ARG_TARGET_PATH: &str = "{target_path}"; const RUST_COMPILE_COMMAND_TEMPLATE: &str = "rustc {src_path} -o {target_path}"; -const CPP_COMPILE_COMMAND_TEMPLATE: &str = "g++ {src_path} -o {target_path}"; +const CPP_COMPILE_COMMAND_TEMPLATE: &str = "g++ {src_path} -o {target_path} -O2 -static"; const PYTHON_COMPILE_COMMAND_TEMPLATE: &str = "cp {src_path} {target_path}"; #[derive(Clone)]