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
diff --git a/cc/sanitize.go b/cc/sanitize.go
index 2a1ee3c..f37b75d 100644
--- a/cc/sanitize.go
+++ b/cc/sanitize.go
@@ -82,7 +82,7 @@
 	hwasanGlobalOptions = []string{"heap_history_size=1023", "stack_history_size=512",
 		"export_memory_stats=0", "max_malloc_fill_size=131072", "malloc_fill_byte=0"}
 	memtagStackCommonFlags = []string{"-march=armv8-a+memtag"}
-	memtagStackLlvmFlags = []string{"-dom-tree-reachability-max-bbs-to-explore=128"}
+	memtagStackLlvmFlags   = []string{"-dom-tree-reachability-max-bbs-to-explore=128"}
 
 	hostOnlySanitizeFlags   = []string{"-fno-sanitize-recover=all"}
 	deviceOnlySanitizeFlags = []string{"-fsanitize-trap=all"}
@@ -858,7 +858,7 @@
 
 		flags.Local.CFlags = append(flags.Local.CFlags, cfiCflags...)
 		flags.Local.AsFlags = append(flags.Local.AsFlags, cfiAsflags...)
-		flags.CFlagsDeps = append(flags.CFlagsDeps, android.PathForSource(ctx, cfiBlocklistPath + "/" + cfiBlocklistFilename))
+		flags.CFlagsDeps = append(flags.CFlagsDeps, android.PathForSource(ctx, cfiBlocklistPath+"/"+cfiBlocklistFilename))
 		if Bool(s.Properties.Sanitize.Config.Cfi_assembly_support) {
 			flags.Local.CFlags = append(flags.Local.CFlags, cfiAssemblySupportFlag)
 		}
@@ -1559,7 +1559,7 @@
 			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*