aboutsummaryrefslogtreecommitdiffstats
path: root/cc/cc.go
diff options
context:
space:
mode:
authorInseob Kim <inseob@google.com>2018-04-11 15:41:38 +0900
committerInseob Kim <inseob@google.com>2018-04-11 06:45:38 +0000
commitda2171ae9de4f858d6410b5b6307640ec768e32d (patch)
tree2591b1e97e87ee09268cd025e0c5bf114d58372e /cc/cc.go
parent34b22839f2fa03425384e1b930c2dff60e225e51 (diff)
downloadbuild_soong-da2171ae9de4f858d6410b5b6307640ec768e32d.tar.gz
build_soong-da2171ae9de4f858d6410b5b6307640ec768e32d.tar.bz2
build_soong-da2171ae9de4f858d6410b5b6307640ec768e32d.zip
Remove early-return statements of link-type check
Bug: 77834464 Test: m -j Change-Id: I75e431ee48e23130167d1fafbe80e88c8222d79b
Diffstat (limited to 'cc/cc.go')
-rw-r--r--cc/cc.go10
1 files changed, 2 insertions, 8 deletions
diff --git a/cc/cc.go b/cc/cc.go
index 9c868288..8c114290 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -1115,17 +1115,11 @@ func checkLinkType(ctx android.ModuleContext, from *Module, to *Module, tag depe
toStl := to.stl.Properties.SelectedStl
if fromStl == "" || toStl == "" {
// Libraries that don't use the STL are unrestricted.
- return
- }
-
- if fromStl == "ndk_system" || toStl == "ndk_system" {
+ } else if fromStl == "ndk_system" || toStl == "ndk_system" {
// We can be permissive with the system "STL" since it is only the C++
// ABI layer, but in the future we should make sure that everyone is
// using either libc++ or nothing.
- return
- }
-
- if getNdkStlFamily(ctx, from) != getNdkStlFamily(ctx, to) {
+ } else if getNdkStlFamily(ctx, from) != getNdkStlFamily(ctx, to) {
ctx.ModuleErrorf("uses %q and depends on %q which uses incompatible %q",
from.stl.Properties.SelectedStl, ctx.OtherModuleName(to),
to.stl.Properties.SelectedStl)