-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Open
bazelbuild/rules_cc
#631Labels
P2We'll consider working on this in future. (Assignee optional)We'll consider working on this in future. (Assignee optional)team-Rules-CPPIssues for C++ rulesIssues for C++ rulestype: bug
Description
Description of the bug:
The 'data' attribute of cc_import appears to have no effect. It's does not even throw an error when pointed to a nonexistent file.
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Create precompiled library:
echo "int getRandomNumber() { return 4; }" | gcc -x c - -fPIC -shared -o libxkcd.so
main.c
int getRandomNumber(void);
int main() {
return getRandomNumber() - 4;
}
BUILD.bazel
cc_import(
name = "xkcd_rand",
shared_library = "libxkcd.so",
data = ["some_nonsense_file.doc.exe.psd"],
)
cc_binary(
name = "exe",
srcs = ["main.c"],
deps = [":xkcd_rand"],
)
Which operating system are you running Bazel on?
Ubuntu 20.04
What is the output of bazel info release?
release 6.2.1
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2We'll consider working on this in future. (Assignee optional)We'll consider working on this in future. (Assignee optional)team-Rules-CPPIssues for C++ rulesIssues for C++ rulestype: bug