Fix snapshot symlinks

LOCAL_MODULE_SYMLINKS was enough to install symlinks for snapshot
binaries. However, Soong now requires LOCAL_SOONG_INSTALLED_SYMLINKS,
which results in broken symlink support in snapshots.

This fixes symlink problems, and then amends the Soong snapshot test.

Bug: 220639435
Bug: 220907049
Test: manually add symlinks and try building
Test: Soong test
Change-Id: Ia75ddf3aa642558e396f1d80736310c3c8d02ad1
diff --git a/cc/binary.go b/cc/binary.go
index 6c7d581..0fe4490 100644
--- a/cc/binary.go
+++ b/cc/binary.go
@@ -441,6 +441,16 @@
 
 	// Need to determine symlinks early since some targets (ie APEX) need this
 	// information but will not call 'install'
+	binary.setSymlinkList(ctx)
+
+	return ret
+}
+
+func (binary *binaryDecorator) unstrippedOutputFilePath() android.Path {
+	return binary.unstrippedOutputFile
+}
+
+func (binary *binaryDecorator) setSymlinkList(ctx ModuleContext) {
 	for _, symlink := range binary.Properties.Symlinks {
 		binary.symlinks = append(binary.symlinks,
 			symlink+String(binary.Properties.Suffix)+ctx.toolchain().ExecutableSuffix())
@@ -457,12 +467,6 @@
 			binary.preferredArchSymlink = symlinkName
 		}
 	}
-
-	return ret
-}
-
-func (binary *binaryDecorator) unstrippedOutputFilePath() android.Path {
-	return binary.unstrippedOutputFile
 }
 
 func (binary *binaryDecorator) symlinkList() []string {