Gabe Black has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/51829 )

 (

1 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one. )Change subject: arch: Only build GPU switching headers if building the GPU.
......................................................................

arch: Only build GPU switching headers if building the GPU.

Otherwise, SCons may discover an include which is guarded with BUILD_GPU
(like GPUCoalescer in mem/ruby/profiler/Profiler.cc), but not understand
that BUILD_GPU is not true. It will then follow the includes and find
generated headers which it will then generate, specifically X86 headers
for X86TLB and X86Pagetable param structs.

If not using x86, for instance if building the NULL isa, it may not be
possible to generate those headers because those objects are not visible
to SCons.

Change-Id: I955d0ef6ffb146eeb99bb052d29abe835cac5d9a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51829
Reviewed-by: Matthew Poremba <[email protected]>
Maintainer: Matt Sinclair <[email protected]>
Tested-by: kokoro <[email protected]>
---
M src/arch/SConscript
1 file changed, 33 insertions(+), 9 deletions(-)

Approvals:
  Matthew Poremba: Looks good to me, approved
  Matt Sinclair: Looks good to me, approved
  kokoro: Regressions pass




diff --git a/src/arch/SConscript b/src/arch/SConscript
index 4922bda..c0e0bc5 100644
--- a/src/arch/SConscript
+++ b/src/arch/SConscript
@@ -69,15 +69,16 @@

 amdgpu_isa = ['gcn3', 'vega']

-env.SwitchingHeaders(
-    Split('''
-        gpu_decoder.hh
-        gpu_isa.hh
-        gpu_registers.hh
-        gpu_types.hh
-        '''),
-    '{}'.format('amdgpu/' if env['TARGET_GPU_ISA'] in amdgpu_isa else '')+
-    env.subst('${TARGET_GPU_ISA}'))
+if env['BUILD_GPU']:
+    env.SwitchingHeaders(
+        Split('''
+            gpu_decoder.hh
+            gpu_isa.hh
+            gpu_registers.hh
+            gpu_types.hh
+            '''),
+ '{}'.format('amdgpu/' if env['TARGET_GPU_ISA'] in amdgpu_isa else '')+
+        env.subst('${TARGET_GPU_ISA}'))

 #################################################################
 #

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/51829
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: I955d0ef6ffb146eeb99bb052d29abe835cac5d9a
Gerrit-Change-Number: 51829
Gerrit-PatchSet: 3
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-Reviewer: Bobby R. Bruce <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Matt Sinclair <[email protected]>
Gerrit-Reviewer: Matthew Poremba <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
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