diff options
Diffstat (limited to 'cc/util.go')
-rw-r--r-- | cc/util.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/cc/util.go b/cc/util.go index d6089aba8..3ede8ff6d 100644 --- a/cc/util.go +++ b/cc/util.go @@ -19,7 +19,6 @@ import ( "strings" "android/soong/android" - "android/soong/snapshot" ) // Efficiently converts a list of include directories to a single string @@ -101,6 +100,12 @@ func makeSymlinkCmd(linkDirOnDevice string, linkName string, target string) stri "ln -sf " + target + " " + filepath.Join(dir, linkName) } +func WriteStringToFileRule(ctx android.SingletonContext, content, out string) android.OutputPath { + outPath := android.PathForOutput(ctx, out) + android.WriteFileRule(ctx, outPath, content) + return outPath +} + // Dump a map to a list file as: // // {key1} {value1} @@ -116,5 +121,5 @@ func installMapListFileRule(ctx android.SingletonContext, m map[string]string, p txtBuilder.WriteString(" ") txtBuilder.WriteString(m[k]) } - return snapshot.WriteStringToFileRule(ctx, txtBuilder.String(), path) + return WriteStringToFileRule(ctx, txtBuilder.String(), path) } |