tools: Fixes for intrinsic-gen on windows

Fix slash-related issues.

Change-Id: I618649578746450df7cb2dcd372c5a778eb719ba
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/56776
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
This commit is contained in:
Ben Clayton
2021-07-05 16:43:17 +00:00
committed by Tint LUCI CQ
parent f83e406b37
commit 892aaf377f
4 changed files with 47 additions and 27 deletions

View File

@@ -106,7 +106,7 @@ func run() error {
writeFile := func(relpath, body string) error {
// Write the common file header
sb := strings.Builder{}
sb.WriteString(fmt.Sprintf(header, relTmplPath, defProjectRelPath))
sb.WriteString(fmt.Sprintf(header, filepath.ToSlash(relTmplPath), filepath.ToSlash(defProjectRelPath)))
sb.WriteString(body)
content := sb.String()
abspath := filepath.Join(filepath.Dir(tmplPath), relpath)