-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: switch to libc++ by default #8859
Conversation
Signed-off-by: Lizan Zhou <[email protected]>
What about this one?
|
Signed-off-by: Lizan Zhou <[email protected]>
Signed-off-by: Lizan Zhou <[email protected]>
Signed-off-by: Lizan Zhou <[email protected]>
Signed-off-by: Lizan Zhou <[email protected]>
Signed-off-by: Lizan Zhou <[email protected]>
Signed-off-by: Lizan Zhou <[email protected]>
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 <[email protected]>
Signed-off-by: Lizan Zhou <[email protected]>
Signed-off-by: Lizan Zhou <[email protected]>
@mattklein123 this ready for review except fuzzit |
@@ -30,7 +30,7 @@ function setup_clang_toolchain() { | |||
echo "clang toolchain configured" | |||
} | |||
|
|||
function setup_clang_libcxx_toolchain() { | |||
function setup_clang_toolchain() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, I will revise the script.
Signed-off-by: Lizan Zhou <[email protected]>
Signed-off-by: Lizan Zhou <[email protected]>
Signed-off-by: Lizan Zhou <[email protected]>
Signed-off-by: Lizan Zhou <[email protected]>
Signed-off-by: Lizan Zhou <[email protected]>
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, should we document that somewhere?
Signed-off-by: Lizan Zhou <[email protected]>
Signed-off-by: Lizan Zhou <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, some small comments.
/wait
docs/root/intro/version_history.rst
Outdated
@@ -3,6 +3,7 @@ Version history | |||
|
|||
1.13.0 (pending) | |||
================ | |||
* build: official released binary is now built against libc++. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alpha order
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for being dense but if we have bazelrc configs, why do we also need env variables?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah this is for ci/do_ci.sh
to inject bazelrc configs, let me make this clear.
Signed-off-by: Lizan Zhou <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
/azp run envoy-linux |
Signed-off-by: Lizan Zhou <[email protected]>
build: switch to libc++ by default (envoyproxy#8859)
Signed-off-by: Lizan Zhou [email protected]
Description:
Risk Level: Med
Testing: CI
Docs Changes: N/A
Release Notes: Added
Fixes #4251