diff options
Diffstat (limited to 'cc')
-rw-r--r-- | cc/cc_test.go | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/cc/cc_test.go b/cc/cc_test.go index 52234a8d4..c9eb42116 100644 --- a/cc/cc_test.go +++ b/cc/cc_test.go @@ -2264,6 +2264,24 @@ func TestStaticDepsOrderWithStubs(t *testing.T) { } } +func TestErrorsIfAModuleDependsOnDisabled(t *testing.T) { + testCcError(t, `module "libA" .* depends on disabled module "libB"`, ` + cc_library { + name: "libA", + srcs: ["foo.c"], + shared_libs: ["libB"], + stl: "none", + } + + cc_library { + name: "libB", + srcs: ["foo.c"], + enabled: false, + stl: "none", + } + `) +} + // Simple smoke test for the cc_fuzz target that ensures the rule compiles // correctly. func TestFuzzTarget(t *testing.T) { |