Gabe Black has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/48967 )

Change subject: scons: Further simplify the_gpu_isa.hh.
......................................................................

scons: Further simplify the_gpu_isa.hh.

Turn the "namespace" function into a simple variable. Also, since the
only thing defined in the file is a macro, we can drop the compiler
guards and use that macro as its own compiler guard.

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



diff --git a/src/SConscript b/src/SConscript
index c25e3ef..32087c2 100644
--- a/src/SConscript
+++ b/src/SConscript
@@ -778,19 +778,15 @@
             MakeAction(makeTheISA, Transform("CFG ISA", 0)))

 def makeTheGPUISA(source, target, env):
-    target_gpu_isa = env['TARGET_GPU_ISA']
+    gpu_isa = env['TARGET_GPU_ISA']

-    def namespace(isa):
-        return isa[0].upper() + isa[1:].lower() + 'ISA'
+    namespace = gpu_isa[0].upper() + gpu_isa[1:].lower() + 'ISA'

     code = code_formatter()
     code('''\
-#ifndef __CONFIG_THE_GPU_ISA_HH__
-#define __CONFIG_THE_GPU_ISA_HH__
-
-#define TheGpuISA ${{namespace(target_gpu_isa)}}
-
-#endif // __CONFIG_THE_GPU_ISA_HH__''')
+#ifndef TheGpuISA
+#define TheGpuISA ${namespace}
+#endif // TheGpuISA''')

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


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/48967
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: I1e8559fc7add61105b2990f76226714ba282581d
Gerrit-Change-Number: 48967
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <[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