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
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:
main.c
BUILD.bazel
Which operating system are you running Bazel on?
Ubuntu 20.04
What is the output of
bazel info release?release 6.2.1