Set version based on port version, remove usage of -O3 Index: build/gen.py --- build/gen.py.orig +++ build/gen.py @@ -216,25 +216,16 @@ def main(argv): def GenerateLastCommitPosition(host, header): - ROOT_TAG = 'initial-commit' - describe_output = subprocess.check_output( - ['git', 'describe', 'HEAD', '--abbrev=12', '--match', ROOT_TAG], - shell=host.is_windows(), cwd=REPO_ROOT) - mo = re.match(ROOT_TAG + '-(\d+)-g([0-9a-f]+)', describe_output.decode()) - if not mo: - raise ValueError( - 'Unexpected output from git describe when generating version header') - contents = '''// Generated by build/gen.py. #ifndef OUT_LAST_COMMIT_POSITION_H_ #define OUT_LAST_COMMIT_POSITION_H_ #define LAST_COMMIT_POSITION_NUM %s -#define LAST_COMMIT_POSITION "%s (%s)" +#define LAST_COMMIT_POSITION "%s" #endif // OUT_LAST_COMMIT_POSITION_H_ -''' % (mo.group(1), mo.group(1), mo.group(2)) +''' % (os.environ['GN_VERSION'],os.environ['GN_VERSION']) # Only write/touch this file if the commit position has changed. old_contents = '' @@ -395,10 +386,8 @@ def WriteGNNinja(path, platform, host, options, args_l cflags.extend(['-O0', '-g']) else: cflags.append('-DNDEBUG') - cflags.append('-O3') if options.no_strip: cflags.append('-g') - ldflags.append('-O3') # Use -fdata-sections and -ffunction-sections to place each function # or data item into its own section so --gc-sections can eliminate any # unused functions and data items.