Chromium Code Reviews| Index: third_party/cython/python_flags.py |
| diff --git a/third_party/cython/python_flags.py b/third_party/cython/python_flags.py |
| index 03c4ad752dfc2adaa901877b088bdfcd0659db26..55acc1c43e1a93a6dd4e92f146aad48fb2e1b2fb 100644 |
| --- a/third_party/cython/python_flags.py |
| +++ b/third_party/cython/python_flags.py |
| @@ -34,9 +34,14 @@ def main(): |
| result = [] |
| if opts.libraries: |
| libraries = b.get_libraries(ext) |
| - if sys.platform == 'darwin': |
| - libraries += [ '-lpython%s' % sys.version[:3] ] |
| - result = result + libraries |
| + if sys.platform in ['darwin', 'linux2']: |
| + # In case of darwin and linux prefix all libraries (if there is any) |
| + # so it can be used as a compiler argument. There are cases when we |
| + # don't get anything on these systems, so just to be save add a |
| + # default python lib. |
| + libraries = set(['-l%s' % library for library in libraries]) |
| + libraries.add('-lpython%s' % sys.version[:3]) |
|
qsr
2014/08/29 15:11:52
This last line should only happen on mac. On linux
|
| + result.extend(libraries) |
| if opts.includes: |
| result = result + b.include_dirs |
| if opts.library_dirs: |