gem5-dev@gem5.org

The gem5 Developer List

View all threads

[S] Change in gem5/gem5[develop]: scons: Remove old support for building with a batch processor.

GB
Gabe Black (Gerrit)
Fri, Apr 15, 2022 12:10 PM

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

Change subject: scons: Remove old support for building with a batch
processor.
......................................................................

scons: Remove old support for building with a batch processor.

Other systems like distcc and ccache exist for this purpose. The SCons
CacheDir mechanism relies on multiple developers having read/write
access to a central caching directory, and for them to use each other's
build output. I expect there is only a relatively narrow window where
that would be useful, where there are multiple developers working on a
very similar version of gem5, and where security considerations would
still allow them to build in mostly unvalidated intermediate build
products supplied by other developers.

Change-Id: I45dc31b68c68906401fb1cd9e9ed658f2ba1dd6c

M SConstruct
M src/Kconfig
2 files changed, 18 insertions(+), 27 deletions(-)

diff --git a/SConstruct b/SConstruct
index 87a8b3e..6900d2f 100755
--- a/SConstruct
+++ b/SConstruct
@@ -828,20 +828,6 @@

  kconfig.update_env(env, kconfig_file.abspath, config_file.abspath)
  • Do this after we save setting back, or else we'll tack on an

  • extra 'qdo' every time we run scons.

  • if env['CONF']['BATCH']:
  •    env['CC']     = env['CONF']['BATCH_CMD'] + ' ' + env['CC']
    
  •    env['CXX']    = env['CONF']['BATCH_CMD'] + ' ' + env['CXX']
    
  •    env['AS']     = env['CONF']['BATCH_CMD'] + ' ' + env['AS']
    
  •    env['AR']     = env['CONF']['BATCH_CMD'] + ' ' + env['AR']
    
  •    env['RANLIB'] = env['CONF']['BATCH_CMD'] + ' ' + env['RANLIB']
    
  • Cache build files in the supplied directory.

  • if env['CONF']['M5_BUILD_CACHE']:
  •    print('Using build cache located at',  
    

env['CONF']['M5_BUILD_CACHE'])

  •    CacheDir(env['CONF']['M5_BUILD_CACHE'])
    
  env.Append(CCFLAGS='$CCFLAGS_EXTRA')
  env.Append(LINKFLAGS='$LINKFLAGS_EXTRA')

diff --git a/src/Kconfig b/src/Kconfig
index fff5ea3..67089ea 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -25,19 +25,6 @@

mainmenu "$(MAIN_MENU_TEXT)"

-config BATCH

  • bool "Use batch pool for build and test"
  • default n

-config BATCH_CMD

  • string "Batch pool submission command name"
  • default "qdo"
  • depends on BATCH

-config M5_BUILD_CACHE

  • string "Cache built objects in this directory"
  • default ""
  • config USE_EFENCE
    bool "Link with Electric Fence malloc debugger"
    default n

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/58891
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: I45dc31b68c68906401fb1cd9e9ed658f2ba1dd6c
Gerrit-Change-Number: 58891
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <gabe.black(a)gmail.com>
Gerrit-MessageType: newchange

Gabe Black has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/58891 ) Change subject: scons: Remove old support for building with a batch processor. ...................................................................... scons: Remove old support for building with a batch processor. Other systems like distcc and ccache exist for this purpose. The SCons CacheDir mechanism relies on multiple developers having read/write access to a central caching directory, and for them to use each other's build output. I expect there is only a relatively narrow window where that would be useful, where there are multiple developers working on a very similar version of gem5, and where security considerations would still allow them to build in mostly unvalidated intermediate build products supplied by other developers. Change-Id: I45dc31b68c68906401fb1cd9e9ed658f2ba1dd6c --- M SConstruct M src/Kconfig 2 files changed, 18 insertions(+), 27 deletions(-) diff --git a/SConstruct b/SConstruct index 87a8b3e..6900d2f 100755 --- a/SConstruct +++ b/SConstruct @@ -828,20 +828,6 @@ kconfig.update_env(env, kconfig_file.abspath, config_file.abspath) - # Do this after we save setting back, or else we'll tack on an - # extra 'qdo' every time we run scons. - if env['CONF']['BATCH']: - env['CC'] = env['CONF']['BATCH_CMD'] + ' ' + env['CC'] - env['CXX'] = env['CONF']['BATCH_CMD'] + ' ' + env['CXX'] - env['AS'] = env['CONF']['BATCH_CMD'] + ' ' + env['AS'] - env['AR'] = env['CONF']['BATCH_CMD'] + ' ' + env['AR'] - env['RANLIB'] = env['CONF']['BATCH_CMD'] + ' ' + env['RANLIB'] - - # Cache build files in the supplied directory. - if env['CONF']['M5_BUILD_CACHE']: - print('Using build cache located at', env['CONF']['M5_BUILD_CACHE']) - CacheDir(env['CONF']['M5_BUILD_CACHE']) - env.Append(CCFLAGS='$CCFLAGS_EXTRA') env.Append(LINKFLAGS='$LINKFLAGS_EXTRA') diff --git a/src/Kconfig b/src/Kconfig index fff5ea3..67089ea 100644 --- a/src/Kconfig +++ b/src/Kconfig @@ -25,19 +25,6 @@ mainmenu "$(MAIN_MENU_TEXT)" -config BATCH - bool "Use batch pool for build and test" - default n - -config BATCH_CMD - string "Batch pool submission command name" - default "qdo" - depends on BATCH - -config M5_BUILD_CACHE - string "Cache built objects in this directory" - default "" - config USE_EFENCE bool "Link with Electric Fence malloc debugger" default n -- To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/58891 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: I45dc31b68c68906401fb1cd9e9ed658f2ba1dd6c Gerrit-Change-Number: 58891 Gerrit-PatchSet: 1 Gerrit-Owner: Gabe Black <gabe.black(a)gmail.com> Gerrit-MessageType: newchange