Skip to content

Commit

Permalink
Update "Extracting projects built with make" in examples.md (kythe#…
Browse files Browse the repository at this point in the history
…6126)

We need to wait for cxx_extractor's completion before returning from
cxx_wrapper. This ensures the kzip is fully written before returning.
Otherwise we cannot guarantee that all kzip files are ready when `make`
completes. This risks losing the last few kzip files when cxx_extractor
races with steps called after `make`.

Co-authored-by: lfolger <[email protected]>
  • Loading branch information
jingyuanliang and lfolger authored Aug 6, 2024
1 parent 99d335a commit e8b31b1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kythe/web/site/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,9 @@ bin: main.cc
# cxx_wrapper.sh
#!/bin/bash -e

$KYTHE_RELEASE_DIR/extractors/cxx_extractor "$@" &
$KYTHE_RELEASE_DIR/extractors/cxx_extractor "$@" & pid=$!
/usr/bin/c++ "$@"
wait "$pid"
```

Extraction is done by setting the `CXX` make variable as well as some environment variables that configure `cxx_extractor`.
Expand Down

0 comments on commit e8b31b1

Please sign in to comment.