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

https://github.com/bazelbuild/bazel/issues/4057 has reappeared with Bazel 7 #20957

Open
phst opened this issue Jan 19, 2024 · 0 comments
Labels
P3 We're not considering working on this, but happy to review a PR. (No assignee) team-Rules-CPP Issues for C++ rules type: bug

Comments

@phst
Copy link
Contributor

phst commented Jan 19, 2024

Description of the bug:

Building a cc_library without symbols now prints a warning (due to the switch to the Unix CC toolchain in Bazel 7 on macOS).

Which category does this issue belong to?

C++/Objective-C Rules

What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

Same as #4057: create a trivial workspace with an empty empty.c and a BUILD file like:

cc_library(
    name = "empty",
    srcs = ["empty.c"],
    linkstatic = 1,
)

Then, bazel build //:empty will print a warning like

INFO: From Linking libempty.a:
warning: /Library/Developer/CommandLineTools/usr/bin/libtool: archive library: bazel-out/darwin_arm64-fastbuild/bin/libempty.a the table of contents is empty (no object file members in the library define global symbols)

This doesn't happen in Bazel 6 (which uses the Xcode toolchain by default, where this issue has been fixed by #4057 and/or #5981).

Which operating system are you running Bazel on?

macOS 14.2.1 (23C71)

What is the output of bazel info release?

release 7.0.1

If bazel info release returns development version or (@non-git), tell us how you built Bazel.

N/A

What's the output of git remote get-url origin; git rev-parse master; git rev-parse HEAD ?

N/A

Is this a regression? If yes, please try to identify the Bazel commit where the bug was introduced.

Technically a regression (no warning in Bazel 6), though this probably was always present in the Unix toolchain.

Have you found anything relevant by searching the web?

Same as #4057 and #5981, just for the Unix toolchain instead of the Xcode one.

Any other information, logs, or outputs that you want to share?

No response

@sgowroji sgowroji added the team-Rules-CPP Issues for C++ rules label Jan 19, 2024
@comius comius added P3 We're not considering working on this, but happy to review a PR. (No assignee) and removed untriaged labels Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 We're not considering working on this, but happy to review a PR. (No assignee) team-Rules-CPP Issues for C++ rules type: bug
Projects
None yet
Development

No branches or pull requests

5 participants