This CL updates the cmake files to use go run directly.

Instead of using the tools/run script this CL updates CMake
to directly invoke go run. This should work around issues
with multiple writers of the gen binary and fixup windows issues.

Change-Id: Ie27f45a1d132e9ec100cad709bb92da8558b4fb3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/108045
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
This commit is contained in:
dan sinclair 2022-11-02 14:53:57 +00:00 committed by Dawn LUCI CQ
parent bdd5bbe0c5
commit a950d4539e
1 changed files with 2 additions and 1 deletions

View File

@ -509,8 +509,9 @@ function(tint_generate TARGET)
${PROJECT_SOURCE_DIR}/src/tint/intrinsics.def
${CMAKE_CURRENT_SOURCE_DIR}/${TARGET}.tmpl
)
set(GEN_CMD ${PROJECT_SOURCE_DIR}/tools/golang/bin/go run ./tools/src/cmd/gen)
add_custom_command(
COMMAND ./tools/run gen -o ${DAWN_BUILD_GEN_DIR} ${PROJECT_SOURCE_DIR}/src/tint/${TARGET}.tmpl
COMMAND ${GEN_CMD} -o ${DAWN_BUILD_GEN_DIR} ${PROJECT_SOURCE_DIR}/src/tint/${TARGET}.tmpl
DEPENDS ${IN}
OUTPUT ${DAWN_BUILD_GEN_DIR}/src/tint/${TARGET}
COMMENT "Tint: Generating files for ${TARGET}"