[gem5-dev] Change in gem5/gem5[develop]: scons: Remove an error check from the ProtoBuf declare-er.

2022-03-30 Thread Gabe Black (Gerrit) via gem5-dev
Gabe Black has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/58349 )


Change subject: scons: Remove an error check from the ProtoBuf declare-er.
..

scons: Remove an error check from the ProtoBuf declare-er.

ProtoBuf files can (and should) be declared to SCons unconditionally,
but then also use a "protobuf" tag. This lets SCons still include them
conditionally when it gathers sources to build certain binaries without
having additional python logic in SConscripts, or manually interpreting
config state.

Change-Id: I9426d647bc2d6c9d7eee7dadba77f75ed83bcaad
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/58349
Maintainer: Giacomo Travaglini 
Reviewed-by: Jason Lowe-Power 
Reviewed-by: Bobby Bruce 
Tested-by: kokoro 
---
M src/SConscript
1 file changed, 20 insertions(+), 5 deletions(-)

Approvals:
  Jason Lowe-Power: Looks good to me, approved
  Bobby Bruce: Looks good to me, approved
  Giacomo Travaglini: Looks good to me, approved
  kokoro: Regressions pass




diff --git a/src/SConscript b/src/SConscript
index c1b00f0..d55520b 100644
--- a/src/SConscript
+++ b/src/SConscript
@@ -259,11 +259,6 @@

 def ProtoBuf(source, tags=None, add_tags=None):
 '''Add a Protocol Buffer to build'''
-
-if not env['HAVE_PROTOC'] or not env['CONF']['HAVE_PROTOBUF']:
-error('Got protobuf to build, but lacks support!')
-
-'''Specify the source file, and any tags'''
 Source(source, tags, add_tags,  
append={'CXXFLAGS': '-Wno-array-bounds'})


 env['PROTOC_GRPC'] = distutils.spawn.find_executable('grpc_cpp_plugin')

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/58349
To unsubscribe, or for help writing mail filters, visit  
https://gem5-review.googlesource.com/settings


Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I9426d647bc2d6c9d7eee7dadba77f75ed83bcaad
Gerrit-Change-Number: 58349
Gerrit-PatchSet: 2
Gerrit-Owner: Gabe Black 
Gerrit-Reviewer: Bobby Bruce 
Gerrit-Reviewer: Gabe Black 
Gerrit-Reviewer: Giacomo Travaglini 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: kokoro 
Gerrit-MessageType: merged
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-dev] Change in gem5/gem5[develop]: scons: Remove an error check from the ProtoBuf declare-er.

2022-03-29 Thread Gabe Black (Gerrit) via gem5-dev
Gabe Black has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/58349 )



Change subject: scons: Remove an error check from the ProtoBuf declare-er.
..

scons: Remove an error check from the ProtoBuf declare-er.

ProtoBuf files can (and should) be declared to SCons unconditionally,
but then also use a "protobuf" tag. This lets SCons still include them
conditionally when it gathers sources to build certain binaries without
having additional python logic in SConscripts, or manually interpreting
config state.

Change-Id: I9426d647bc2d6c9d7eee7dadba77f75ed83bcaad
---
M src/SConscript
1 file changed, 15 insertions(+), 5 deletions(-)



diff --git a/src/SConscript b/src/SConscript
index c1b00f0..d55520b 100644
--- a/src/SConscript
+++ b/src/SConscript
@@ -259,11 +259,6 @@

 def ProtoBuf(source, tags=None, add_tags=None):
 '''Add a Protocol Buffer to build'''
-
-if not env['HAVE_PROTOC'] or not env['CONF']['HAVE_PROTOBUF']:
-error('Got protobuf to build, but lacks support!')
-
-'''Specify the source file, and any tags'''
 Source(source, tags, add_tags,  
append={'CXXFLAGS': '-Wno-array-bounds'})


 env['PROTOC_GRPC'] = distutils.spawn.find_executable('grpc_cpp_plugin')

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/58349
To unsubscribe, or for help writing mail filters, visit  
https://gem5-review.googlesource.com/settings


Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I9426d647bc2d6c9d7eee7dadba77f75ed83bcaad
Gerrit-Change-Number: 58349
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black 
Gerrit-MessageType: newchange
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s