mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-22 03:08:41 +00:00
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:
parent
1d72c5e914
commit
de24c3c08b
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user