Skip to content

Commit

Permalink
Bump gcc to 12.2.0, return to upstream sandboxes
Browse files Browse the repository at this point in the history
  • Loading branch information
otargowski committed Sep 20, 2023
1 parent 02aa449 commit e7dc3e7
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 19 deletions.
6 changes: 3 additions & 3 deletions nix/container.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
enable = true;

ensureFiles = {
"/sandboxes/compiler-gcc.10_2_1.tar.gz" = pkgs.fetchurl {
url = "https://downloads.sio2project.mimuw.edu.pl/sandboxes/compiler-gcc.10_2_1.tar.gz";
hash = "sha256-+QO7/ZqLWRvFCF9KdVqrZ6ZsBB96bkRgYVUUezvAf8A=";
"/sandboxes/compiler-gcc.12_2_0.tar.gz" = pkgs.fetchurl {
url = "https://downloads.sio2project.mimuw.edu.pl/sandboxes/compiler-gcc.12_2_0.tar.gz";
hash = "sha256-APPGBb4ek3WGFAwA7N6UxQwMppWzrVB1yDIpr1waeC4=";
};
"/sandboxes/proot-sandbox_amd64.tar.gz" = pkgs.fetchurl {
url = "https://downloads.sio2project.mimuw.edu.pl/sandboxes/proot-sandbox_amd64.tar.gz";
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
'foo = sio.compilers.template:run',

# Sandboxed compilers:
'gcc10_2_1_c99 = sio.compilers.gcc:run_c_gcc10_2_1_c99',
'g++10_2_1_cpp17 = sio.compilers.gcc:run_cpp_gcc10_2_1_cpp17',
'gcc12_2_0_c99 = sio.compilers.gcc:run_c_gcc12_2_0_c99',
'g++12_2_0_cpp20 = sio.compilers.gcc:run_cpp_gcc12_2_0_cpp20',
'fpc2_6_2 = sio.compilers.fpc:run_pas_fpc2_6_2',
'java1_8 = sio.compilers.java:run_java1_8',

Expand Down
26 changes: 13 additions & 13 deletions sio/compilers/gcc.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ class CCompiler(CStyleCompiler):
lang = 'c'

@classmethod
def gcc_10_2_1_c99(cls):
obj = cls('gcc.10_2_1')
def gcc_12_2_0_c99(cls):
obj = cls('gcc.12_2_0')
obj.options = ['-std=gnu99', '-static', '-O3', '-s', '-lm']
return obj

Expand All @@ -16,29 +16,29 @@ class CPPCompiler(CStyleCompiler):
lang = 'cpp'

@classmethod
def gcc_10_2_1_cpp17(cls):
obj = cls('gcc.10_2_1')
def gcc_12_2_0_cpp20(cls):
obj = cls('gcc.12_2_0')
obj.compiler = 'g++'
obj.options = ['-std=c++17', '-static', '-O3', '-s', '-lm']
obj.options = ['-std=c++20', '-static', '-O3', '-s', '-lm']
return obj

def run_gcc10_2_1_c99(environ):
return CCompiler.gcc_10_2_1_c99().compile(environ)
def run_gcc12_2_0_c99(environ):
return CCompiler.gcc_12_2_0_c99().compile(environ)


def run_gcc_default(environ):
return CCompiler.gcc_10_2_1_c99().compile(environ)
return CCompiler.gcc_12_2_0_c99().compile(environ)


def run_gplusplus10_2_1_cpp17(environ):
return CPPCompiler.gcc_10_2_1_cpp17().compile(environ)
def run_gplusplus12_2_0_cpp20(environ):
return CPPCompiler.gcc_12_2_0_cpp20().compile(environ)


def run_gplusplus_default(environ):
return CPPCompiler.gcc_10_2_1_cpp17().compile(environ)
return CPPCompiler.gcc_12_2_0_cpp20().compile(environ)


run_c_default = run_gcc_default
run_c_gcc10_2_1_c99 = run_gcc10_2_1_c99
run_c_gcc12_2_0_c99 = run_gcc12_2_0_c99
run_cpp_default = run_gplusplus_default
run_cpp_gcc10_2_1_cpp17 = run_gplusplus10_2_1_cpp17
run_cpp_gcc12_2_0_cpp20 = run_gplusplus12_2_0_cpp20
2 changes: 1 addition & 1 deletion sio/workers/executors.py
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ class Sio2JailExecutor(SandboxExecutor):
REAL_TIME_LIMIT_ADDEND = 1000 # (in ms)

def __init__(self, use_perf=True):
super(Sio2JailExecutor, self).__init__('talent_sio2jail_exec-sandbox-1.4.3')
super(Sio2JailExecutor, self).__init__('sio2jail_exec-sandbox-1.4.4')
self.use_perf = use_perf

def _execute(self, command, **kwargs):
Expand Down

0 comments on commit e7dc3e7

Please sign in to comment.