diff options
Diffstat (limited to 'android/defs.go')
-rw-r--r-- | android/defs.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/android/defs.go b/android/defs.go index 9ae360e36..6e5bb053f 100644 --- a/android/defs.go +++ b/android/defs.go @@ -174,10 +174,15 @@ func buildWriteFileRule(ctx BuilderContext, outputFile WritablePath, content str // WriteFileRule creates a ninja rule to write contents to a file. The contents will be escaped // so that the file contains exactly the contents passed to the function, plus a trailing newline. func WriteFileRule(ctx BuilderContext, outputFile WritablePath, content string) { + WriteFileRuleVerbatim(ctx, outputFile, content+"\n") +} + +// WriteFileRuleVerbatim creates a ninja rule to write contents to a file. The contents will be +// escaped so that the file contains exactly the contents passed to the function. +func WriteFileRuleVerbatim(ctx BuilderContext, outputFile WritablePath, content string) { // This is MAX_ARG_STRLEN subtracted with some safety to account for shell escapes const SHARD_SIZE = 131072 - 10000 - content += "\n" if len(content) > SHARD_SIZE { var chunks WritablePaths for i, c := range ShardString(content, SHARD_SIZE) { |