build: switch to libc++ by default#8859
Conversation
Signed-off-by: Lizan Zhou <lizan@tetrate.io>
|
What about this one? |
Signed-off-by: Lizan Zhou <lizan@tetrate.io>
Signed-off-by: Lizan Zhou <lizan@tetrate.io>
|
cc @yevgenypats seems fuzzit docker image doesn't have libc++ installed, while libc++ is the default C++ standard library used in oss-fuzz. Is it possible to add libc++ there? |
Signed-off-by: Lizan Zhou <lizan@tetrate.io>
Signed-off-by: Lizan Zhou <lizan@tetrate.io>
Signed-off-by: Lizan Zhou <lizan@tetrate.io>
|
@mattklein123 this ready for review except fuzzit |
| } | ||
|
|
||
| function setup_clang_libcxx_toolchain() { | ||
| function setup_clang_toolchain() { |
There was a problem hiding this comment.
Q: Is there any way to make this the default in the core .bazelrc options such that someone could disable it and go back to libstdcxx if they want? This would provide consistency across all builds in general, not just CI builds. I'm not sure if there is a good way to do this though?
/wait-any
There was a problem hiding this comment.
Good point, I will revise the script.
Signed-off-by: Lizan Zhou <lizan@tetrate.io>
Signed-off-by: Lizan Zhou <lizan@tetrate.io>
|
@lizan fuzzit can use any docker you specify. Is there an image that you would like the fuzzers to run on? |
|
@yevgenypats then just use |
|
@yevgenypats actually that's already the container that we're running fuzzit, so I guess you can just run without container too? |
|
ok let me try that |
|
it should be added in both |
| ``` | ||
| export CC=clang | ||
| export CXX=clang++ | ||
| bazel build --config=libc++ //source/exe:envoy-static |
There was a problem hiding this comment.
I think what I was wondering before is whether it's possible to just have --config-libc++ be the default?
The issue that I have found in the past is that I don't think there is a way to have a default config and then actual have a local config disable it and replace it with something else?
/wait-any
There was a problem hiding this comment.
I will recommend having --config=libc++ in user.bazelrc file to make it default. It is possible to override but not easy, partially because toolchains are also defaulted to libstdc++.
There was a problem hiding this comment.
OK, should we document that somewhere?
Signed-off-by: Lizan Zhou <lizan@tetrate.io>
Signed-off-by: Lizan Zhou <lizan@tetrate.io>
mattklein123
left a comment
There was a problem hiding this comment.
Nice, some small comments.
/wait
docs/root/intro/version_history.rst
Outdated
|
|
||
| 1.13.0 (pending) | ||
| ================ | ||
| * build: official released binary is now built against libc++. |
ci/README.md
Outdated
|
|
||
| As of November 2019 after [#8859](https://github.com/envoyproxy/envoy/pull/8859) the official released binary is | ||
| [linked against libc++ on Linux](https://github.com/envoyproxy/envoy/blob/master/bazel/README.md#linking-against-libc-on-linux). | ||
| To override the C++ standard library in your build, set environment variable `ENVOY_STDLIB` to `libstdc++` or `libc++`. |
There was a problem hiding this comment.
Sorry for being dense but if we have bazelrc configs, why do we also need env variables?
There was a problem hiding this comment.
ah this is for ci/do_ci.sh to inject bazelrc configs, let me make this clear.
|
/azp run envoy-linux |
Signed-off-by: Lizan Zhou <lizan@tetrate.io>
build: switch to libc++ by default (envoyproxy#8859)
Signed-off-by: Lizan Zhou lizan@tetrate.io
Description:
Risk Level: Med
Testing: CI
Docs Changes: N/A
Release Notes: Added
Fixes #4251