Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
thecodingwizard committed Jul 9, 2024
1 parent bb1eeee commit 234f18d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ RUN g++ -std=c++11 -O2 -fsanitize=address -o /precompiled-headers/bits/stdc++.h.
RUN g++ -std=c++17 -O2 -fsanitize=address -o /precompiled-headers/bits/stdc++.h.gch/05 /usr/include/c++/11/x86_64-amazon-linux/bits/stdc++.h
RUN g++ -std=c++23 -O2 -fsanitize=address -o /precompiled-headers/bits/stdc++.h.gch/06 /usr/include/c++/11/x86_64-amazon-linux/bits/stdc++.h

# ^ this takes 0.3s to compile. However, the initial compilation can take a lot longer than 5 seconds, presumably because lambda disk read speeds are very slow.
# I think maybe we try to compile this after execution or something.

RUN dnf install -y java-21-amazon-corretto-devel
RUN dnf install -y time

Expand Down
5 changes: 4 additions & 1 deletion src/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,15 @@ pub fn compile(compile_request: CompileRequest) -> Result<CompileResponse> {
"g++ -I/precompiled-headers -o {} {} program.cpp",
output_file_path, compile_request.compiler_options
);
let command = format!(
"cp /precompiled-headers/bits/stdc++.h.gch/01 /tmp/01",
);
let compile_output = run_command(
&command,
tmp_dir.path(),
CommandOptions {
stdin: String::new(),
timeout_ms: 5000,
timeout_ms: 35000,
},
)?;

Expand Down

0 comments on commit 234f18d

Please sign in to comment.