Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid leaking LFS flags to reverse dependencies (#1730)
Follow up of #1725. `defines` propagates to reverse dependencies, while `local_defines` don't. If we use `defines` then there's risk of ODR violation: Suppose a user have a cc_library foo that depends on bar and benchmark: cc_library(name = "foo", deps = [":bar", "@com_github_google_benchmark//:benchmark"]) And bar has a class that has LFS-dependant ABI: cc_library(name = "foo") class Bar { off_t member; }; Bar would be compiled without LFS, but linked to foo when assuming LFS is enabled. So we limit LFS to within the library only. benchmark does not have LFS dependant public ABIs so it should be fine.
- Loading branch information