Skip to content
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

Filter out -lstdc++ for targets with no C++ code #1686

Merged
merged 1 commit into from
Aug 24, 2018

Conversation

jayconrod
Copy link
Contributor

This avoids an unnecessary run-time dependency on libstdc++.so, which
may not be present in container environments.

go build only adds this dependency if C++ code is included in the
build. We now filter out this dependency from the cc toolchain flags
unless we have C++/ObjC source or we have a dependency on a cc_library
or objc_library.

Fixes #1681
Related bazelbuild/bazel#2954

This avoids an unnecessary run-time dependency on libstdc++.so, which
may not be present in container environments.

go build only adds this dependency if C++ code is included in the
build. We now filter out this dependency from the cc toolchain flags
unless we have C++/ObjC source or we have a dependency on a cc_library
or objc_library.

Fixes bazel-contrib#1681
Related bazelbuild/bazel#2954
@jayconrod jayconrod merged commit 89ecbd7 into bazel-contrib:master Aug 24, 2018
@jayconrod jayconrod deleted the filter-cpp branch August 24, 2018 18:58
jayconrod added a commit that referenced this pull request Sep 5, 2018
This avoids an unnecessary run-time dependency on libstdc++.so, which
may not be present in container environments.

go build only adds this dependency if C++ code is included in the
build. We now filter out this dependency from the cc toolchain flags
unless we have C++/ObjC source or we have a dependency on a cc_library
or objc_library.

Fixes #1681
Related bazelbuild/bazel#2954
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants