Hello Bazel community,
I am trying to compile a C++ library, which recommends supplying information about symbols specifically on macOS by using a linker response file.
The file is already generated, and lives in my repo in a directory directly under base (so the path is something like "a/linker-response-file.sym"). I just cannot figure out how to pass it to the linker as a path that it will understand, and it complains that the file does not exist. I have tried setting the linkopt like so:
cc_library(
name = "my-lib",
...,
linkopts = select(":macos": {["-Wl,-dead_strip, "-Wl,@a/linker-response-file.sym"], ...})
)
(Note: The @ there is meant to be a clang prefix for indicating a file path, and not Bazel-related.)
I have also attempted to create a filegroup with the response file as a single src, and then use "-Wl,@$(location :filegroup)", but to no avail.
I feel like I am missing something very basic here, and would be happy for guidance. Thank you!