OLD | NEW |
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 """ | 5 """ |
6 This module contains classes that help to emulate xcodebuild behavior on top of | 6 This module contains classes that help to emulate xcodebuild behavior on top of |
7 other build systems, such as make and ninja. | 7 other build systems, such as make and ninja. |
8 """ | 8 """ |
9 | 9 |
10 import gyp.common | 10 import gyp.common |
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
529 archs = ['i386'] | 529 archs = ['i386'] |
530 ldflags.append('-arch ' + archs[0]) | 530 ldflags.append('-arch ' + archs[0]) |
531 | 531 |
532 # Xcode adds the product directory by default. | 532 # Xcode adds the product directory by default. |
533 ldflags.append('-L' + product_dir) | 533 ldflags.append('-L' + product_dir) |
534 | 534 |
535 install_name = self.GetInstallName() | 535 install_name = self.GetInstallName() |
536 if install_name: | 536 if install_name: |
537 ldflags.append('-install_name ' + install_name.replace(' ', r'\ ')) | 537 ldflags.append('-install_name ' + install_name.replace(' ', r'\ ')) |
538 | 538 |
| 539 for rpath in self._Settings().get('LD_RUNPATH_SEARCH_PATHS', []): |
| 540 ldflags.append('-Wl,-rpath,' + rpath) |
| 541 |
539 self.configname = None | 542 self.configname = None |
540 return ldflags | 543 return ldflags |
541 | 544 |
542 def GetPerTargetSettings(self): | 545 def GetPerTargetSettings(self): |
543 """Gets a list of all the per-target settings. This will only fetch keys | 546 """Gets a list of all the per-target settings. This will only fetch keys |
544 whose values are the same across all configurations.""" | 547 whose values are the same across all configurations.""" |
545 first_pass = True | 548 first_pass = True |
546 result = {} | 549 result = {} |
547 for configname in sorted(self.xcode_settings.keys()): | 550 for configname in sorted(self.xcode_settings.keys()): |
548 if first_pass: | 551 if first_pass: |
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1038 def GetSpecPostbuildCommands(spec, quiet=False): | 1041 def GetSpecPostbuildCommands(spec, quiet=False): |
1039 """Returns the list of postbuilds explicitly defined on |spec|, in a form | 1042 """Returns the list of postbuilds explicitly defined on |spec|, in a form |
1040 executable by a shell.""" | 1043 executable by a shell.""" |
1041 postbuilds = [] | 1044 postbuilds = [] |
1042 for postbuild in spec.get('postbuilds', []): | 1045 for postbuild in spec.get('postbuilds', []): |
1043 if not quiet: | 1046 if not quiet: |
1044 postbuilds.append('echo POSTBUILD\\(%s\\) %s' % ( | 1047 postbuilds.append('echo POSTBUILD\\(%s\\) %s' % ( |
1045 spec['target_name'], postbuild['postbuild_name'])) | 1048 spec['target_name'], postbuild['postbuild_name'])) |
1046 postbuilds.append(gyp.common.EncodePOSIXShellList(postbuild['action'])) | 1049 postbuilds.append(gyp.common.EncodePOSIXShellList(postbuild['action'])) |
1047 return postbuilds | 1050 return postbuilds |
OLD | NEW |