Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(423)

Side by Side Diff: pylib/gyp/generator/make.py

Issue 10749020: Adds support for the library_dirs key, which appears in the documentation but was never actually im… (Closed) Base URL: http://gyp.googlecode.com/svn/trunk/
Patch Set: library_dirs Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | pylib/gyp/generator/msvs.py » ('j') | pylib/gyp/generator/xcode.py » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012 Google Inc. All rights reserved. 1 # Copyright (c) 2012 Google Inc. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 # Notes: 5 # Notes:
6 # 6 #
7 # This is all roughly based on the Makefile system used by the Linux 7 # This is all roughly based on the Makefile system used by the Linux
8 # kernel, but is a non-recursive make -- we put the entire dependency 8 # kernel, but is a non-recursive make -- we put the entire dependency
9 # graph in front of make and let it figure it out. 9 # graph in front of make and let it figure it out.
10 # 10 #
(...skipping 1401 matching lines...) Expand 10 before | Expand all | Expand 10 after
1412 target_postbuilds[configname] = target_postbuild 1412 target_postbuilds[configname] = target_postbuild
1413 else: 1413 else:
1414 ldflags = config.get('ldflags', []) 1414 ldflags = config.get('ldflags', [])
1415 # Compute an rpath for this output if needed. 1415 # Compute an rpath for this output if needed.
1416 if any(dep.endswith('.so') or '.so.' in dep for dep in deps): 1416 if any(dep.endswith('.so') or '.so.' in dep for dep in deps):
1417 # We want to get the literal string "$ORIGIN" into the link command, 1417 # We want to get the literal string "$ORIGIN" into the link command,
1418 # so we need lots of escaping. 1418 # so we need lots of escaping.
1419 ldflags.append(r'-Wl,-rpath=\$$ORIGIN/lib.%s/' % self.toolset) 1419 ldflags.append(r'-Wl,-rpath=\$$ORIGIN/lib.%s/' % self.toolset)
1420 ldflags.append(r'-Wl,-rpath-link=\$(builddir)/lib.%s/' % 1420 ldflags.append(r'-Wl,-rpath-link=\$(builddir)/lib.%s/' %
1421 self.toolset) 1421 self.toolset)
1422 library_dirs = config.get('library_dirs', [])
1423 ldflags += [('-L%s' % library_dir) for library_dir in library_dirs]
1422 self.WriteList(ldflags, 'LDFLAGS_%s' % configname) 1424 self.WriteList(ldflags, 'LDFLAGS_%s' % configname)
1423 if self.flavor == 'mac': 1425 if self.flavor == 'mac':
1424 self.WriteList(self.xcode_settings.GetLibtoolflags(configname), 1426 self.WriteList(self.xcode_settings.GetLibtoolflags(configname),
1425 'LIBTOOLFLAGS_%s' % configname) 1427 'LIBTOOLFLAGS_%s' % configname)
1426 libraries = spec.get('libraries') 1428 libraries = spec.get('libraries')
1427 if libraries: 1429 if libraries:
1428 # Remove duplicate entries 1430 # Remove duplicate entries
1429 libraries = gyp.common.uniquer(libraries) 1431 libraries = gyp.common.uniquer(libraries)
1430 if self.flavor == 'mac': 1432 if self.flavor == 'mac':
1431 libraries = self.xcode_settings.AdjustLibraries(libraries) 1433 libraries = self.xcode_settings.AdjustLibraries(libraries)
(...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after
2140 root_makefile.write("endif\n") 2142 root_makefile.write("endif\n")
2141 root_makefile.write('\n') 2143 root_makefile.write('\n')
2142 2144
2143 if (not generator_flags.get('standalone') 2145 if (not generator_flags.get('standalone')
2144 and generator_flags.get('auto_regeneration', True)): 2146 and generator_flags.get('auto_regeneration', True)):
2145 WriteAutoRegenerationRule(params, root_makefile, makefile_name, build_files) 2147 WriteAutoRegenerationRule(params, root_makefile, makefile_name, build_files)
2146 2148
2147 root_makefile.write(SHARED_FOOTER) 2149 root_makefile.write(SHARED_FOOTER)
2148 2150
2149 root_makefile.close() 2151 root_makefile.close()
OLDNEW
« no previous file with comments | « no previous file | pylib/gyp/generator/msvs.py » ('j') | pylib/gyp/generator/xcode.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698