diff options
| -rw-r--r-- | apex/apex.go | 10 | ||||
| -rw-r--r-- | apex/apex_test.go | 1 | ||||
| -rw-r--r-- | cc/cc.go | 4 | ||||
| -rw-r--r-- | cc/config/riscv64_device.go | 8 | ||||
| -rw-r--r-- | cc/prebuilt_test.go | 5 |
5 files changed, 15 insertions, 13 deletions
diff --git a/apex/apex.go b/apex/apex.go index 557b9b74c..c6d8234e2 100644 --- a/apex/apex.go +++ b/apex/apex.go @@ -842,10 +842,12 @@ func (a *apexBundle) DepsMutator(ctx android.BottomUpMutatorContext) { } addDependenciesForNativeModules(ctx, deps, target, imageVariation) - ctx.AddFarVariationDependencies([]blueprint.Variation{ - {Mutator: "os", Variation: target.OsVariation()}, - {Mutator: "arch", Variation: target.ArchVariation()}, - }, shBinaryTag, a.properties.Sh_binaries...) + if isPrimaryAbi { + ctx.AddFarVariationDependencies([]blueprint.Variation{ + {Mutator: "os", Variation: target.OsVariation()}, + {Mutator: "arch", Variation: target.ArchVariation()}, + }, shBinaryTag, a.properties.Sh_binaries...) + } } // Common-arch dependencies come next diff --git a/apex/apex_test.go b/apex/apex_test.go index 02dc6e60b..85d1d712a 100644 --- a/apex/apex_test.go +++ b/apex/apex_test.go @@ -5046,6 +5046,7 @@ func TestApexWithShBinary(t *testing.T) { key: "myapex.key", sh_binaries: ["myscript"], updatable: false, + compile_multilib: "both", } apex_key { @@ -3361,7 +3361,7 @@ func (c *Module) depsToPaths(ctx android.ModuleContext) PathDeps { c.sabi.Properties.ReexportedIncludes, depExporterInfo.IncludeDirs.Strings()...) } - makeLibName := MakeLibName(ctx, c, ccDep, depName) + libDepTag.makeSuffix + makeLibName := MakeLibName(ctx, c, ccDep, ccDep.BaseModuleName()) + libDepTag.makeSuffix switch { case libDepTag.header(): c.Properties.AndroidMkHeaderLibs = append( @@ -3402,7 +3402,7 @@ func (c *Module) depsToPaths(ctx android.ModuleContext) PathDeps { switch depTag { case runtimeDepTag: c.Properties.AndroidMkRuntimeLibs = append( - c.Properties.AndroidMkRuntimeLibs, MakeLibName(ctx, c, ccDep, depName)+libDepTag.makeSuffix) + c.Properties.AndroidMkRuntimeLibs, MakeLibName(ctx, c, ccDep, ccDep.BaseModuleName())+libDepTag.makeSuffix) // Record BaseLibName for snapshots. c.Properties.SnapshotRuntimeLibs = append(c.Properties.SnapshotRuntimeLibs, BaseLibName(depName)) case objDepTag: diff --git a/cc/config/riscv64_device.go b/cc/config/riscv64_device.go index deb922bd2..6a84fee9f 100644 --- a/cc/config/riscv64_device.go +++ b/cc/config/riscv64_device.go @@ -26,9 +26,7 @@ var ( // Help catch common 32/64-bit errors. "-Werror=implicit-function-declaration", "-march=rv64gcv_zba_zbb_zbs", - // Equivalent to "-munaligned-access", but our clang doesn't have that yet. - "-Xclang -target-feature -Xclang +unaligned-scalar-mem", - "-Xclang -target-feature -Xclang +unaligned-vector-mem", + "-munaligned-access", // Until https://gitlab.com/qemu-project/qemu/-/issues/1976 is fixed... "-mno-implicit-float", // (https://github.com/google/android-riscv64/issues/124) @@ -40,9 +38,7 @@ var ( riscv64Ldflags = []string{ "-Wl,--hash-style=gnu", "-march=rv64gcv_zba_zbb_zbs", - // Equivalent to "-munaligned-access", but our clang doesn't have that yet. - "-Xclang -target-feature -Xclang +unaligned-scalar-mem", - "-Xclang -target-feature -Xclang +unaligned-vector-mem", + "-munaligned-access", // We should change the default for this in clang, but for now... // (https://github.com/google/android-riscv64/issues/124) "-Wl,-mllvm -Wl,-jump-is-expensive=false", diff --git a/cc/prebuilt_test.go b/cc/prebuilt_test.go index 95fb7edfb..f6b5ed56c 100644 --- a/cc/prebuilt_test.go +++ b/cc/prebuilt_test.go @@ -595,6 +595,9 @@ func TestMultiplePrebuilts(t *testing.T) { libfoo := ctx.ModuleForTests("libfoo", "android_arm64_armv8-a_shared").Module() expectedDependency := ctx.ModuleForTests(tc.expectedDependencyName, "android_arm64_armv8-a_shared").Module() android.AssertBoolEquals(t, fmt.Sprintf("expected dependency from %s to %s\n", libfoo.Name(), tc.expectedDependencyName), true, hasDep(ctx, libfoo, expectedDependency)) + // check that LOCAL_SHARED_LIBRARIES contains libbar and not libbar.v<N> + entries := android.AndroidMkEntriesForTest(t, ctx, libfoo)[0] + android.AssertStringListContains(t, "Version should not be present in LOCAL_SHARED_LIBRARIES", entries.EntryMap["LOCAL_SHARED_LIBRARIES"], "libbar") // check installation rules // the selected soong module should be exported to make @@ -603,7 +606,7 @@ func TestMultiplePrebuilts(t *testing.T) { // check LOCAL_MODULE of the selected module name // the prebuilt should have the same LOCAL_MODULE when exported to make - entries := android.AndroidMkEntriesForTest(t, ctx, libbar)[0] + entries = android.AndroidMkEntriesForTest(t, ctx, libbar)[0] android.AssertStringEquals(t, "unexpected LOCAL_MODULE", "libbar", entries.EntryMap["LOCAL_MODULE"][0]) } } |