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

Teach cc_configure about BAZEL_LINKLIBS env variable #8660

Closed
wants to merge 3 commits into from

Commits on Jun 18, 2019

  1. Teach cc_configure about BAZEL_LINKLIBS env variable

    Using this variable is will be possible to specify system libraries that should
    be added after default linker flags, after libraries to link, and after user
    link flags (i.e. --linkopt and `linkopts` rule attribute).
    
    Flag separator is `:`, similarly to BAZEL_LINKOPTS. Escaping is done by `%`.
    
    Default value is empty string.
    
    With this it's possible to force Bazel to statically link libstdc++ by using:
    
        BAZEL_LINKOPTS=-static-libstdc++ BAZEL_LINKLIBS=-l%:libstdc++.a bazel build //foo
    
    RELNOTES: Bazel's C++ autoconfiguration now understands BAZEL_LINKLIBS
    GOOGLE:
    hlopko committed Jun 18, 2019
    Configuration menu
    Copy the full SHA
    b4666e5 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d1d34f1 View commit details
    Browse the repository at this point in the history
  3. Guard against empty link_libs

    hlopko committed Jun 18, 2019
    Configuration menu
    Copy the full SHA
    357b124 View commit details
    Browse the repository at this point in the history