{"action":"closed","issue":{"url":"https://api.github.com/repos/google/bazel/issues/363","labels_url":"https://api.github.com/repos/google/bazel/issues/363/labels{/name}","comments_url":"https://api.github.com/repos/google/bazel/issues/363/comments","events_url":"https://api.github.com/repos/google/bazel/issues/363/events","html_url":"https://github.com/google/bazel/issues/363","id":99556675,"number":363,"title":"How to inherit 'defines' from other targets?","user":{"login":"brooksbp","id":130974,"avatar_url":"https://avatars.githubusercontent.com/u/130974?v=3","gravatar_id":"","url":"https://api.github.com/users/brooksbp","html_url":"https://github.com/brooksbp","followers_url":"https://api.github.com/users/brooksbp/followers","following_url":"https://api.github.com/users/brooksbp/following{/other_user}","gists_url":"https://api.github.com/users/brooksbp/gists{/gist_id}","starred_url":"https://api.github.com/users/brooksbp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brooksbp/subscriptions","organizations_url":"https://api.github.com/users/brooksbp/orgs","repos_url":"https://api.github.com/users/brooksbp/repos","events_url":"https://api.github.com/users/brooksbp/events{/privacy}","received_events_url":"https://api.github.com/users/brooksbp/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"hanwen","id":31547,"avatar_url":"https://avatars.githubusercontent.com/u/31547?v=3","gravatar_id":"","url":"https://api.github.com/users/hanwen","html_url":"https://github.com/hanwen","followers_url":"https://api.github.com/users/hanwen/followers","following_url":"https://api.github.com/users/hanwen/following{/other_user}","gists_url":"https://api.github.com/users/hanwen/gists{/gist_id}","starred_url":"https://api.github.com/users/hanwen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hanwen/subscriptions","organizations_url":"https://api.github.com/users/hanwen/orgs","repos_url":"https://api.github.com/users/hanwen/repos","events_url":"https://api.github.com/users/hanwen/events{/privacy}","received_events_url":"https://api.github.com/users/hanwen/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2015-08-07T01:24:26Z","updated_at":"2015-08-07T09:38:11Z","closed_at":"2015-08-07T09:38:11Z","body":"I'd like to do the following:\r\n\r\n```\r\ncc_library(\r\n  name = \"libA\",\r\n  srcs = [\"libA.cc\"],\r\n  defines = [\"MY_DEFINE\"],\r\n)\r\n\r\ncc_binary(\r\n  name = \"binX\",\r\n  srcs = [\"binX.cc\"],\r\n  deps = [\":libA\"],  # This will inherit libA's defines such that binX is compiled with -DMY_DEFINE\r\n)\r\n```\r\n\r\nIs this possible?"}}