From 4b5d9ea7b803e314bafe80b0d42e75e5f82caca9 Mon Sep 17 00:00:00 2001 From: Menci Date: Wed, 24 Apr 2019 11:00:05 +0800 Subject: [PATCH] Add -lm option for C languages. --- src/languages/c-noilinux.ts | 2 +- src/languages/c.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/languages/c-noilinux.ts b/src/languages/c-noilinux.ts index 1f50b0d..d20c31c 100644 --- a/src/languages/c-noilinux.ts +++ b/src/languages/c-noilinux.ts @@ -10,7 +10,7 @@ export const lang = { // write a shell script or some other stuff, // and put it to your sandbox. executable: "/usr/bin/compile-c-noilinux", - parameters: ["compile-c-noilinux", sourcePath, "-o", `${outputDirectory}/a.out`, "-O2", "-DONLINE_JUDGE"], + parameters: ["compile-c-noilinux", sourcePath, "-o", `${outputDirectory}/a.out`, "-O2", "-DONLINE_JUDGE", "-lm"], time: 5000, memory: 1024 * 1024 * 1024 * 2, process: 10, diff --git a/src/languages/c.ts b/src/languages/c.ts index 5b943b3..0f75d9c 100644 --- a/src/languages/c.ts +++ b/src/languages/c.ts @@ -10,7 +10,7 @@ export const lang = { // write a shell script or some other stuff, // and put it to your sandbox. executable: "/usr/bin/clang-7", - parameters: ["clang-7", sourcePath, "-o", `${outputDirectory}/a.out`, "-O2", "-fdiagnostics-color=always", "-DONLINE_JUDGE", "-mx32"], + parameters: ["clang-7", sourcePath, "-o", `${outputDirectory}/a.out`, "-O2", "-fdiagnostics-color=always", "-DONLINE_JUDGE", "-mx32", "-lm"], time: 5000, memory: 1024 * 1024 * 1024 * 2, process: 10,