Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2a2d509a authored by Ivan Lozano's avatar Ivan Lozano
Browse files

cc: Remove unneeded ubsan library linkage on host

The sanitizer runtime logic was rewritten in aosp/2438959 to simplify
static sanitizer library selection. However, enabling ubsan diagnostics
for host tests would result in incorrectly adding an unnecessary
libclang_rt.asan.so dependency.

This check should have been removed as well -- the library dep
determination for c.sanitize.Properties.UbsanRuntimeDep is now handled
higher up in the logic.

(Some formatting fixes are included as well)

Bug: 323237381
Test: UBSanitized Host test with diagnostics runs correctly.
Change-Id: I97bd01344b7b676fccb9f250c0f801b8bc212a1a
parent 08f670ab
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1559,7 +1559,7 @@ func sanitizerRuntimeMutator(mctx android.BottomUpMutatorContext) {
			addStaticDeps(config.BuiltinsRuntimeLibrary(toolchain), true)
		}

		if runtimeSharedLibrary != "" && (toolchain.Bionic() || toolchain.Musl() || c.sanitize.Properties.UbsanRuntimeDep) {
		if runtimeSharedLibrary != "" && (toolchain.Bionic() || toolchain.Musl()) {
			// UBSan is supported on non-bionic linux host builds as well

			// Adding dependency to the runtime library. We are using *FarVariation*