diff --git a/bazel/README.md b/bazel/README.md index 5d16c0c7df0ec..9793506d03307 100644 --- a/bazel/README.md +++ b/bazel/README.md @@ -94,6 +94,9 @@ Note: this assumes that both: clang compiler and libc++ library are installed in and that `clang` and `clang++` are available in `$PATH`. On some systems, exports might need to be changed to versioned binaries, e.g. `CC=clang-7` and `CXX=clang++-7`. +You might also need to ensure libc++ is installed correctly on your system, e.g. on Ubuntu this +might look like `sudo apt-get install libc++abi-7-dev libc++-7-dev`. + ## Using a compiler toolchain in a non-standard location By setting the `CC` and `LD_LIBRARY_PATH` in the environment that Bazel executes from as diff --git a/bazel/cc_wrapper.py b/bazel/cc_wrapper.py index e945b33917b9c..78fa90fbb6e0f 100755 --- a/bazel/cc_wrapper.py +++ b/bazel/cc_wrapper.py @@ -56,7 +56,7 @@ def main(): for arg in sys.argv[1:]: if arg == "-lstdc++": if "-stdlib=libc++" in envoy_cxxflags: - arg.append("-lc++") + argv.append("-lc++") elif arg.startswith("-Wl,@"): # tempfile.mkstemp will write to the out-of-sandbox tempdir # unless the user has explicitly set environment variables