diff options
author | humper <humper@google.com> | 2014-09-18 10:58:33 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-09-18 10:58:33 -0700 |
commit | 95b7144adffc376e62c50c6d5010a3880dec61fa (patch) | |
tree | 5a5c5584786a223bef6650d4781d0f17c6929f32 /experimental | |
parent | d71b75757335393d9643a5b7a0f2769b6ba52fb6 (diff) |
fixes to linux build for webtry
BUG=skia:
R=jcgregorio@google.com
Author: humper@google.com
Review URL: https://codereview.chromium.org/578013003
Diffstat (limited to 'experimental')
-rw-r--r-- | experimental/webtry/templates/template.gyp | 9 | ||||
-rw-r--r-- | experimental/webtry/webtry.go | 14 |
2 files changed, 10 insertions, 13 deletions
diff --git a/experimental/webtry/templates/template.gyp b/experimental/webtry/templates/template.gyp index d0e7ecd990..d0486dced4 100644 --- a/experimental/webtry/templates/template.gyp +++ b/experimental/webtry/templates/template.gyp @@ -5,6 +5,9 @@ 'Debug': { }, 'Release': { } }, + 'cflags!': [ + '-Werror' + ], 'target_name': '{{.Hash}}', 'type': 'executable', 'dependencies': [ @@ -26,12 +29,6 @@ 'src/{{.Hash}}.cpp', '../skia/experimental/webtry/main.cpp' ], - 'ldflags': [ - '-lskia', '-stdlib=libc++', '-std=c++11' - ], - 'cflags': [ - '-Werror', '-W', '-Wall', '-Wextra', '-Wno-unused-parameter', '-g', '-O0' - ] } ] } diff --git a/experimental/webtry/webtry.go b/experimental/webtry/webtry.go index 0143feec80..fd512de9d8 100644 --- a/experimental/webtry/webtry.go +++ b/experimental/webtry/webtry.go @@ -36,8 +36,8 @@ import ( ) const ( - RUN_GYP = `../../experimental/webtry/gyp_for_webtry %s` - RUN_NINJA = `ninja -C ../../../inout/Release %s` + RUN_GYP = `../../experimental/webtry/gyp_for_webtry %s -Dskia_gpu=0` + RUN_NINJA = `ninja -C ../../../inout/Release %s` DEFAULT_SAMPLE = `void draw(SkCanvas* canvas) { SkPaint p; @@ -344,7 +344,7 @@ type userCode struct { Titlebar Titlebar } -// writeTemplate creates a given output file and writes the template +// writeTemplate creates a given output file and writes the template // result there. func writeTemplate(filename string, t *template.Template, context interface{}) error { f, err := os.Create(filename) @@ -352,12 +352,12 @@ func writeTemplate(filename string, t *template.Template, context interface{}) e return err } defer f.Close() - return t.Execute( f, context ) + return t.Execute(f, context) } // expandToFile expands the template and writes the result to the file. 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. @@ -374,8 +374,8 @@ func expandCode(code string, source int) (string, error) { } // expandGyp produces the GYP file needed to build the code -func expandGyp(hash string) (error) { - return writeTemplate(fmt.Sprintf("../../../cache/%s.gyp", hash), gypTemplate, struct {Hash string}{hash} ) +func expandGyp(hash string) error { + return writeTemplate(fmt.Sprintf("../../../cache/%s.gyp", hash), gypTemplate, struct{ Hash string }{hash}) } // response is serialized to JSON as a response to POSTs. |