mirror of https://github.com/ARMmbed/mbed-os.git
Create a setting for comparing against a fixed build
parent
7f2eee564c
commit
3eea82209e
|
@ -5,7 +5,7 @@ from __future__ import print_function, division, absolute_import
|
|||
|
||||
from abc import abstractmethod, ABCMeta
|
||||
from sys import stdout, exit, argv
|
||||
from os import sep
|
||||
from os import sep, rename
|
||||
from os.path import (basename, dirname, join, relpath, abspath, commonprefix,
|
||||
splitext)
|
||||
import re
|
||||
|
@ -20,6 +20,7 @@ from jinja2.environment import Environment
|
|||
|
||||
from .utils import (argparse_filestring_type, argparse_lowercase_hyphen_type,
|
||||
argparse_uppercase_type)
|
||||
from .settings import COMPARE_FIXED
|
||||
|
||||
|
||||
class _Parser(object):
|
||||
|
@ -801,6 +802,8 @@ class MemapParser(object):
|
|||
self.old_modules = parser().parse_mapfile(old_input)
|
||||
except IOError:
|
||||
self.old_modules = None
|
||||
if not COMPARE_FIXED:
|
||||
rename(mapfile, "%s.old" % mapfile)
|
||||
return True
|
||||
|
||||
except IOError as error:
|
||||
|
|
|
@ -58,6 +58,9 @@ MBED_ORG_USER = ""
|
|||
# Print compiler warnings and errors as link format
|
||||
PRINT_COMPILER_OUTPUT_AS_LINK = False
|
||||
|
||||
# Compare against a fixed build of the project for space consumption
|
||||
COMPARE_FIXED = False
|
||||
|
||||
# Print warnings/errors in color
|
||||
COLOR = False
|
||||
|
||||
|
@ -91,7 +94,7 @@ for _n in _ENV_PATHS:
|
|||
print("WARNING: MBED_%s set as environment variable but doesn't"
|
||||
" exist" % _n)
|
||||
|
||||
_ENV_VARS = ['PRINT_COMPILER_OUTPUT_AS_LINK', 'COLOR']
|
||||
_ENV_VARS = ['PRINT_COMPILER_OUTPUT_AS_LINK', 'COLOR', 'COMPARE_FIXED']
|
||||
for _n in _ENV_VARS:
|
||||
value = getenv('MBED_%s' % _n)
|
||||
if value:
|
||||
|
|
Loading…
Reference in New Issue