Daniel Carvalho has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/39077 )

Change subject: scons: Add an "All" compound debug flag
......................................................................

scons: Add an "All" compound debug flag

Add an "All" compound debug flag, which encapsulates all
debug flags.

Since this is the broadest compound flag, allowing users
to include it would imply in extremely generic includes.
Moreover, it is highly unlikely that any correct C++ code
would ever use all debug flags. Therefore, a header file
for this flag is not generated to force users to directly
include only the debug flags they need.

Change-Id: If40f2f708be1495fa2b2380266164d5d44d7cffa
Signed-off-by: Daniel R. Carvalho <[email protected]>
---
M src/SConscript
1 file changed, 12 insertions(+), 0 deletions(-)



diff --git a/src/SConscript b/src/SConscript
index 2533810..910df32 100644
--- a/src/SConscript
+++ b/src/SConscript
@@ -1176,14 +1176,26 @@

     code.write(str(target[0]))

+# Generate the files for the debug and debug-format flags
+simple_flags = []
 for name,flag in sorted(debug_flags.items()):
     n, compound, desc, fmt = flag
     assert n == name

+    if not compound and not fmt:
+        simple_flags.append(n)
+
     hh_file = 'debug/%s.hh' % name
     env.Command(hh_file, Value(flag),
                 MakeAction(makeDebugFlagHH, Transform("TRACING", 0)))

+# Create a compound debug flag that encapsulates all flags: "All". This flag +# should not be used within C++ code - it is a compound meta flag; therefore,
+# its header file is purposefully not generated
+CompoundFlag("All", simple_flags,
+    "Controls all debug flags. It should not be used within C++ code.")
+del simple_flags
+
 env.Command('debug/flags.cc', Value(debug_flags),
             MakeAction(makeDebugFlagCC, Transform("TRACING", 0)))
 Source('debug/flags.cc')

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/39077
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: If40f2f708be1495fa2b2380266164d5d44d7cffa
Gerrit-Change-Number: 39077
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Carvalho <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to