Skip to content

Commit

Permalink
2025-01-09T21:17:17Z
Browse files Browse the repository at this point in the history
  • Loading branch information
wrmsr committed Jan 9, 2025
1 parent b25acc5 commit 4bd809d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion omdev/.manifests.json
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@
"module": ".tools.cc",
"attr": "_CLI_MODULE",
"file": "omdev/tools/cc.py",
"line": 72,
"line": 76,
"value": {
"$.cli.types.CliModule": {
"cmd_name": "cc",
Expand Down
6 changes: 5 additions & 1 deletion omdev/tools/cc.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def run(self) -> int:

tmp_dir = tempfile.mkdtemp()
try:
subprocess.check_call(
proc = subprocess.run(
[
check.non_empty_str(shutil.which('clang++')),
'-std=c++20',
Expand All @@ -46,8 +46,12 @@ def run(self) -> int:
src_file_name,
],
cwd=tmp_dir,
check=False,
)

if rc := proc.returncode:
return rc

exe_file = os.path.join(tmp_dir, src_file_name)
check.state(os.path.isfile(exe_file))

Expand Down
2 changes: 1 addition & 1 deletion omdev/tools/tests/hi.cc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//usr/bin/true; exec om cc run "$0" "$@"
#include <iostream>

int main(int argc, const char * const *argv) {
int main(int argc, const char *argv[]) {
std::cout << "Arguments (" << argc << "):" << std::endl;

for (int i = 0; i < argc; ++i) {
Expand Down

0 comments on commit 4bd809d

Please sign in to comment.