Skip to content

Instantly share code, notes, and snippets.

@ringods
Created January 30, 2012 15:53
Show Gist options
  • Save ringods/1705100 to your computer and use it in GitHub Desktop.
Save ringods/1705100 to your computer and use it in GitHub Desktop.
env.Clone doesn't clone the builders and the emitters
# Configure base_env
base_env = Environment()
#...
# The snippet below enforces having different object instances of the builders
# to workaround the shallow copy of env.Clone()
other_env = base_env.Clone()
del other_env['BUILDERS']['StaticObject']
del other_env['BUILDERS']['SharedObject']
other_env.Tool('gcc')
other_env.Tool('g++')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment