Skip to content

Commit 8aedbfd

Browse files
Stewart Addisonrvagg
Stewart Addison
authored andcommittedAug 9, 2018
gyp: backport GYP fix to fix AIX shared suffix
Required to support the shared library builds on AIX - this sets the shared library suffix within GYP to .a instead of .so on AIX My patch: https://codereview.chromium.org/2492233002/ was landed as as part of this one which fixed some other (not required, but included for completeness of the backport) changes: PR-URL: https://github.com/nodejs/node/pull9675 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Ref: https://codereview.chromium.org/2511733005/
1 parent 6cd84b8 commit 8aedbfd

File tree

3 files changed

+26
-17
lines changed

3 files changed

+26
-17
lines changed
 

‎gyp/AUTHORS

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
# Names should be added to this file like so:
22
# Name or Organization <email address>
33

4-
Google Inc.
5-
Bloomberg Finance L.P.
6-
Yandex LLC
4+
Google Inc. <*@google.com>
5+
Bloomberg Finance L.P. <*@bloomberg.net>
6+
IBM Inc. <*@*.ibm.com>
7+
Yandex LLC <*@yandex-team.ru>
78

89
Steven Knight <knight@baldmt.com>
910
Ryan Norton <rnorton10@gmail.com>

‎gyp/PRESUBMIT.py

+14-12
Original file line numberDiff line numberDiff line change
@@ -73,23 +73,15 @@
7373
]
7474

7575

76-
def CheckChangeOnUpload(input_api, output_api):
77-
report = []
78-
report.extend(input_api.canned_checks.PanProjectChecks(
79-
input_api, output_api))
80-
return report
81-
82-
83-
def CheckChangeOnCommit(input_api, output_api):
84-
report = []
85-
76+
def _LicenseHeader(input_api):
8677
# Accept any year number from 2009 to the current year.
8778
current_year = int(input_api.time.strftime('%Y'))
8879
allowed_years = (str(s) for s in reversed(xrange(2009, current_year + 1)))
80+
8981
years_re = '(' + '|'.join(allowed_years) + ')'
9082

9183
# The (c) is deprecated, but tolerate it until it's removed from all files.
92-
license = (
84+
return (
9385
r'.*? Copyright (\(c\) )?%(year)s Google Inc\. All rights reserved\.\n'
9486
r'.*? Use of this source code is governed by a BSD-style license that '
9587
r'can be\n'
@@ -98,8 +90,18 @@ def CheckChangeOnCommit(input_api, output_api):
9890
'year': years_re,
9991
}
10092

93+
def CheckChangeOnUpload(input_api, output_api):
94+
report = []
95+
report.extend(input_api.canned_checks.PanProjectChecks(
96+
input_api, output_api, license_header=_LicenseHeader(input_api)))
97+
return report
98+
99+
100+
def CheckChangeOnCommit(input_api, output_api):
101+
report = []
102+
101103
report.extend(input_api.canned_checks.PanProjectChecks(
102-
input_api, output_api, license_header=license))
104+
input_api, output_api, license_header=_LicenseHeader(input_api)))
103105
report.extend(input_api.canned_checks.CheckTreeIsOpen(
104106
input_api, output_api,
105107
'http://gyp-status.appspot.com/status',

‎gyp/pylib/gyp/generator/make.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,10 @@ def CalculateVariables(default_variables, params):
9090
if flavor == 'android':
9191
operating_system = 'linux' # Keep this legacy behavior for now.
9292
default_variables.setdefault('OS', operating_system)
93-
default_variables.setdefault('SHARED_LIB_SUFFIX', '.so')
93+
if flavor == 'aix':
94+
default_variables.setdefault('SHARED_LIB_SUFFIX', '.a')
95+
else:
96+
default_variables.setdefault('SHARED_LIB_SUFFIX', '.so')
9497
default_variables.setdefault('SHARED_LIB_DIR','$(builddir)/lib.$(TOOLSET)')
9598
default_variables.setdefault('LIB_DIR', '$(obj).$(TOOLSET)')
9699

@@ -1369,7 +1372,10 @@ def ComputeOutputBasename(self, spec):
13691372
if target[:3] == 'lib':
13701373
target = target[3:]
13711374
target_prefix = 'lib'
1372-
target_ext = '.so'
1375+
if self.flavor == 'aix':
1376+
target_ext = '.a'
1377+
else:
1378+
target_ext = '.so'
13731379
elif self.type == 'none':
13741380
target = '%s.stamp' % target
13751381
elif self.type != 'executable':

0 commit comments

Comments
 (0)
Please sign in to comment.