aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac
diff options
context:
space:
mode:
authorGravatar Michael Staib <mstaib@google.com>2016-07-20 21:33:57 +0000
committerGravatar John Cater <jcater@google.com>2016-07-21 20:34:56 +0000
commit5bbc7a4f1747138205fc67a45a3af547b027f984 (patch)
treeabbf1573ddfbb51b39b6361e6fca59ccca6fba50 /src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac
parent8fa303b1ac0a4bffcc535d85c07c86b3c8657d32 (diff)
Stop input and output of cc_library from clobbering each other.
Before this change: Any given cc_library can only contribute one library with a given name to targets which depend on it. If an input library has the same name as the cc_library which it is an input to, the decision of which to use is based on the link mode. e.g., cc_library( name = "foo", srcs = ["foo.c", "libfoo.so"], ) will only contribute libfoo.a (a static library containing foo.o) in static mode, while it will only contribute libfoo.so (the precompiled shared library) in dynamic mode. This change alters cc_library's behavior in this case: * If libfoo.a would be empty (i.e., there are no linkable sources), then this is allowed. The libfoo.so from srcs is simply passed through. (Previously, the empty libfoo.a would be forwarded.) * Otherwise, this is an error. In the case where there are multiple libraries in the srcs with the same library identifier (lib[name].[a|so|lo]), cc_library will still choose one based on the link mode. This behavior has not changed. Similarly, cc_library will still choose one of its own outputs based on the link mode. That behavior has not changed either. RELNOTES[INC]: It is now an error to include a precompiled library (.a, .lo, .so) in a cc_library which would generate a library with the same name (e.g., libfoo.so in cc_library foo) if that library also contains other linkable sources. -- MOS_MIGRATED_REVID=127989348
Diffstat (limited to 'src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac')
0 files changed, 0 insertions, 0 deletions