-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
libc++ support for Clang + Linux #4524
Comments
Using a custom CROSSTOOL sounds like the right way to me, but //cc @mhlopko for more insight. |
@jmillikin-stripe if we have #4031 in the next release, it seems this won't allow us to drop the cc_configure.bzl fork still, since we need to be able to override this for OSS-Fuzz as described above. Thoughts? |
If we can use the C++ toolchain support to define a custom |
@htuch @jmillikin-stripe pls verify that 19c6428 is good enough, and let me know if not and I'll reopen. Thanks! |
@mhlopko The functionality looks good to me. Can you document somewhere what |
Let me come back to that next Monday, I'm planning a present for the world later this week. |
Still working on (fully documented :) present. |
Hi. Any update on the document? I'm thinking we'll need this for OSSFuzz-tensorflow integration |
@mihaimaruseac you can see what we did for Envoy + Bazel + oss-fuzz at https://github.com/google/oss-fuzz/blob/master/projects/envoy/build.sh. |
I'm following that, but I thought it might be easier/more readable with I got it to work just now, so it should be ok, thanks |
In the Envoy project, we would like to use a combination of our Bazel build and oss-fuzz (https://github.com/google/oss-fuzz), tracked at envoyproxy/envoy#508.
oss-fuzz requires that we are able to build with a Clang toolchain in a Linux Docker container, and link against libc++ rather than libstdc++, see google/oss-fuzz#1114.
I don't see direct support for this in
cc_configure.bzl
toolchain autoconfigure today, there's direct references tolibstdc++
inbazel/tools/cpp/unix_cc_configure.bzl
Line 49 in 12471a7
-stdlib=libc++
as a--linkopt
that would correctly configure for linking againstlibc++
.We'd find it helpful to hear from Bazel team on the ideal way of structuring this and hopefully suggestions for how we can work around this in the interim to avoid blocking our full oss-fuzz integration. I'm guessing we could do a manually crafted CROSSTOOL file (possibly generated on-the-fly prior to Bazel invocation), or continue with Envoy's fork of
cc_configure.bzl
and build in the support there. The situation is complicated by the fact that oss-fuzz may invoke our build with arbitrary CFLAGS/CXXFLAGS/CC that we need to map into the Bazel world. Thanks!@jmillikin-stripe @mattklein123 @kcc
The text was updated successfully, but these errors were encountered: