fixes to linux build for webtry

BUG=skia:
R=jcgregorio@google.com

Author: humper@google.com

Review URL: https://codereview.chromium.org/578013003
This commit is contained in:
humper 2014-09-18 10:58:33 -07:00 committed by Commit bot
parent d71b757573
commit 95b7144adf
2 changed files with 10 additions and 13 deletions

View File

@ -5,6 +5,9 @@
'Debug': { }, 'Debug': { },
'Release': { } 'Release': { }
}, },
'cflags!': [
'-Werror'
],
'target_name': '{{.Hash}}', 'target_name': '{{.Hash}}',
'type': 'executable', 'type': 'executable',
'dependencies': [ 'dependencies': [
@ -26,12 +29,6 @@
'src/{{.Hash}}.cpp', 'src/{{.Hash}}.cpp',
'../skia/experimental/webtry/main.cpp' '../skia/experimental/webtry/main.cpp'
], ],
'ldflags': [
'-lskia', '-stdlib=libc++', '-std=c++11'
],
'cflags': [
'-Werror', '-W', '-Wall', '-Wextra', '-Wno-unused-parameter', '-g', '-O0'
]
} }
] ]
} }

View File

@ -36,7 +36,7 @@ import (
) )
const ( const (
RUN_GYP = `../../experimental/webtry/gyp_for_webtry %s` RUN_GYP = `../../experimental/webtry/gyp_for_webtry %s -Dskia_gpu=0`
RUN_NINJA = `ninja -C ../../../inout/Release %s` RUN_NINJA = `ninja -C ../../../inout/Release %s`
DEFAULT_SAMPLE = `void draw(SkCanvas* canvas) { DEFAULT_SAMPLE = `void draw(SkCanvas* canvas) {
@ -352,12 +352,12 @@ func writeTemplate(filename string, t *template.Template, context interface{}) e
return err return err
} }
defer f.Close() defer f.Close()
return t.Execute( f, context ) return t.Execute(f, context)
} }
// expandToFile expands the template and writes the result to the file. // expandToFile expands the template and writes the result to the file.
func expandToFile(filename string, code string, t *template.Template) error { func expandToFile(filename string, code string, t *template.Template) error {
return writeTemplate( filename, t, userCode{Code: code, Titlebar: Titlebar{GitHash: gitHash, GitInfo: gitInfo}} ) return writeTemplate(filename, t, userCode{Code: code, Titlebar: Titlebar{GitHash: gitHash, GitInfo: gitInfo}})
} }
// expandCode expands the template into a file and calculates the MD5 hash. // expandCode expands the template into a file and calculates the MD5 hash.
@ -374,8 +374,8 @@ func expandCode(code string, source int) (string, error) {
} }
// expandGyp produces the GYP file needed to build the code // expandGyp produces the GYP file needed to build the code
func expandGyp(hash string) (error) { func expandGyp(hash string) error {
return writeTemplate(fmt.Sprintf("../../../cache/%s.gyp", hash), gypTemplate, struct {Hash string}{hash} ) return writeTemplate(fmt.Sprintf("../../../cache/%s.gyp", hash), gypTemplate, struct{ Hash string }{hash})
} }
// response is serialized to JSON as a response to POSTs. // response is serialized to JSON as a response to POSTs.