forked from mozilla/gecko-dev
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1551639 - Always update buildid but avoid rebuilding libxul. r=na…
…lexander Differential Revision: https://phabricator.services.mozilla.com/D33772 --HG-- extra : moz-landing-system : lando
- Loading branch information
Showing
4 changed files
with
55 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- | ||
# vim: set filetype=python: | ||
# This Source Code Form is subject to the terms of the Mozilla Public | ||
# License, v. 2.0. If a copy of the MPL was not distibuted with this | ||
# file, You can obtain one at http://mozilla.og/MPL/2.0/. | ||
|
||
|
||
from mozbuild.preprocessor import Preprocessor | ||
from io import StringIO | ||
import buildconfig | ||
import os | ||
|
||
|
||
def main(output, input_file): | ||
with open(input_file) as fh: | ||
if buildconfig.substs['EXPAND_LIBS_LIST_STYLE'] == 'linkerscript': | ||
def cleanup(line): | ||
assert line.startswith('INPUT("') | ||
assert line.endswith('")') | ||
return line[len('INPUT("'):-len('")')] | ||
|
||
objs = [cleanup(l.strip()) for l in fh.readlines()] | ||
else: | ||
objs = [l.strip() for l in fh.readlines()] | ||
|
||
pp = Preprocessor() | ||
pp.out = StringIO() | ||
pp.do_include(os.path.join(buildconfig.topobjdir, 'buildid.h')) | ||
buildid = pp.context['MOZ_BUILDID'] | ||
output.write( | ||
'extern const char gToolkitBuildID[] = "%s";' % buildid | ||
) | ||
return set(o for o in objs | ||
if os.path.splitext(os.path.basename(o))[0] != 'buildid') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters