Skip to content

Commit bb4f1f3

Browse files
HikariNeekzndotsh
authored andcommitted
fix(run.py): make the check for Nim better and remove the C++ specific compiler hack.
1 parent 532790b commit bb4f1f3

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

tux/cogs/utility/run.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -227,11 +227,6 @@ async def _execute(self, compiler: str, code: str, options: str | None) -> str |
227227
str | None
228228
The execution output with header lines removed, or None if execution failed.
229229
"""
230-
# Handle C++ specific options
231-
if compiler in {"c++", "cpp"}:
232-
base_opts = options or ""
233-
options = f"{base_opts} -xc++ -lstdc++ -shared-libgcc".strip()
234-
235230
output = godbolt.getoutput(code, compiler, options)
236231
if not output:
237232
return None
@@ -273,7 +268,7 @@ async def _execute(self, compiler: str, code: str, options: str | None) -> str |
273268
output_parts: list[str] = []
274269

275270
# Handle compiler errors (skip for Nim due to verbose debug messages)
276-
if (compiler_error := result.get("compiler_error")) and compiler != "nim-2.2.4":
271+
if (compiler_error := result.get("compiler_error")) and compiler != self.compiler_map.get("nim"):
277272
output_parts.append(str(compiler_error))
278273

279274
# Handle program output

0 commit comments

Comments
 (0)