Skip to content

Commit

Permalink
Revert native-image to suppress rebuild by default
Browse files Browse the repository at this point in the history
  • Loading branch information
gilles-duboscq committed Apr 30, 2018
1 parent 830fa5b commit 15cf1a0
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions substratevm/mx.substratevm/mx_substratevm.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,11 +404,18 @@ def _shouldRebuildNativeImage(self):
if not self._allow_bootstrapping():
return False, 'Skip bootstrapping'

if mx.get_env("SUPPRESS_NATIVE_IMAGE_REBUILD"):
supress = mx.get_env("SUPPRESS_NATIVE_IMAGE_REBUILD", 'false')
if supress.lower() in ('false', '0', 'no', ''):
supress = False
elif supress.lower() in ('true', '1', 'yes'):
supress = True
else:
mx.abort("Could not understand SUPPRESS_NATIVE_IMAGE_REBUILD=" + supress)
if supress:
# Only bootstrap if it doesn't already exist
symlink_path = native_image_symlink_path(self.subject.native_image_root)
if exists(symlink_path):
mx.log('Suppressed rebuilding native-image (delete ' + basename(symlink_path) + ' to allow rebuilding).')
mx.log('Suppressed rebuilding native-image (delete ' + symlink_path + ' to allow rebuilding).')
return False, 'Already bootstrapped'

return True, ''
Expand Down

0 comments on commit 15cf1a0

Please sign in to comment.