From 685a5cd017b1416cfbbfe087252d818fb498a275 Mon Sep 17 00:00:00 2001 From: Roger Chang Date: Mon, 5 Jun 2023 14:32:18 +0800 Subject: [PATCH] scons: Fix grpc protobuf actions The change will fix the proto import issue and build issue with --no-duplicate-sources options, more details please reference: https://gem5-review.googlesource.com/c/public/gem5/+/64491. Change-Id: I259413f7739f89598dcd42c3f2e1e865cec3de43 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/71318 Reviewed-by: Jason Lowe-Power Tested-by: kokoro Maintainer: Jason Lowe-Power --- src/SConscript | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/SConscript b/src/SConscript index 13f08d2f5a..d26bf49cce 100644 --- a/src/SConscript +++ b/src/SConscript @@ -280,9 +280,9 @@ def protoc_grpc_emitter(target, source, env): root, ext = os.path.splitext(source[0].get_abspath()) return [root + '.grpc.pb.cc', root + '.grpc.pb.h'], source -protoc_grpc_action=MakeAction('${PROTOC} --grpc_out ${BUILDDIR} ' - '--plugin=protoc-gen-grpc=${PROTOC_GRPC} --proto_path ${BUILDDIR} ' - '${SOURCE.get_abspath()}', +protoc_grpc_action=MakeAction('${PROTOC} --grpc_out ${TARGET.dir.abspath} ' + '--plugin=protoc-gen-grpc=${PROTOC_GRPC} ' + '--proto_path ${SOURCE.dir.abspath} ${SOURCE.abspath}', Transform("PROTOC")) env.Append(BUILDERS={'GrpcProtoBufCC' : Builder(