fix(uoj/1/app/libs): fix compile error when hack enabled

Previous g++-4.8 version will cause compile error when hack enabled.
This commit is contained in:
Billchenchina 2018-10-03 00:40:49 +08:00
parent 1d72c5e914
commit de24c3c08b
No known key found for this signature in database
GPG Key ID: 3A3B2AC4E2F8F1CC

View File

@ -97,9 +97,9 @@
$cmd_prefix = "$uojMainJudgerWorkPath/run/run_program >{$this->prepare_dir}/run_compiler_result.txt --in=/dev/null --out=stderr --err={$this->prepare_dir}/compiler_result.txt --tl=10 --ml=512 --ol=64 --type=compiler --work-path={$work_path}";
if (isset($config['need_include_header']) && $config['need_include_header']) {
exec("$cmd_prefix --add-readable-raw=$include_path/ /usr/bin/g++-4.8 -o $name {$config['src']} -I$include_path -lm -O2 -DONLINE_JUDGE");
exec("$cmd_prefix --add-readable-raw=$include_path/ /usr/bin/g++ -o $name {$config['src']} -I$include_path -lm -O2 -DONLINE_JUDGE");
} else {
exec("$cmd_prefix /usr/bin/g++-4.8 -o $name {$config['src']} -lm -O2 -DONLINE_JUDGE");
exec("$cmd_prefix /usr/bin/g++ -o $name {$config['src']} -lm -O2 -DONLINE_JUDGE");
}
$fp = fopen("{$this->prepare_dir}/run_compiler_result.txt", "r");