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 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
602 if len(archs) != 1: | 602 if len(archs) != 1: |
603 # TODO: Supporting fat binaries will be annoying. | 603 # TODO: Supporting fat binaries will be annoying. |
604 self._WarnUnimplemented('ARCHS') | 604 self._WarnUnimplemented('ARCHS') |
605 archs = ['i386'] | 605 archs = ['i386'] |
606 ldflags.append('-arch ' + archs[0]) | 606 ldflags.append('-arch ' + archs[0]) |
607 | 607 |
608 # Xcode adds the product directory by default. | 608 # Xcode adds the product directory by default. |
609 ldflags.append('-L' + product_dir) | 609 ldflags.append('-L' + product_dir) |
610 | 610 |
611 install_name = self.GetInstallName() | 611 install_name = self.GetInstallName() |
612 if install_name: | 612 if install_name and self.spec['type'] != 'loadable_module': |
Nico
2013/09/05 04:36:21
Surprisingly, Xcode still sets LD_DYLIB_INSTALL_NA
| |
613 ldflags.append('-install_name ' + install_name.replace(' ', r'\ ')) | 613 ldflags.append('-install_name ' + install_name.replace(' ', r'\ ')) |
614 | 614 |
615 for rpath in self._Settings().get('LD_RUNPATH_SEARCH_PATHS', []): | 615 for rpath in self._Settings().get('LD_RUNPATH_SEARCH_PATHS', []): |
616 ldflags.append('-Wl,-rpath,' + rpath) | 616 ldflags.append('-Wl,-rpath,' + rpath) |
617 | 617 |
618 config = self.spec['configurations'][self.configname] | 618 config = self.spec['configurations'][self.configname] |
619 framework_dirs = config.get('mac_framework_dirs', []) | 619 framework_dirs = config.get('mac_framework_dirs', []) |
620 for directory in framework_dirs: | 620 for directory in framework_dirs: |
621 ldflags.append('-F' + directory.replace('$(SDKROOT)', self._SdkPath())) | 621 ldflags.append('-F' + directory.replace('$(SDKROOT)', self._SdkPath())) |
622 | 622 |
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1124 def GetSpecPostbuildCommands(spec, quiet=False): | 1124 def GetSpecPostbuildCommands(spec, quiet=False): |
1125 """Returns the list of postbuilds explicitly defined on |spec|, in a form | 1125 """Returns the list of postbuilds explicitly defined on |spec|, in a form |
1126 executable by a shell.""" | 1126 executable by a shell.""" |
1127 postbuilds = [] | 1127 postbuilds = [] |
1128 for postbuild in spec.get('postbuilds', []): | 1128 for postbuild in spec.get('postbuilds', []): |
1129 if not quiet: | 1129 if not quiet: |
1130 postbuilds.append('echo POSTBUILD\\(%s\\) %s' % ( | 1130 postbuilds.append('echo POSTBUILD\\(%s\\) %s' % ( |
1131 spec['target_name'], postbuild['postbuild_name'])) | 1131 spec['target_name'], postbuild['postbuild_name'])) |
1132 postbuilds.append(gyp.common.EncodePOSIXShellList(postbuild['action'])) | 1132 postbuilds.append(gyp.common.EncodePOSIXShellList(postbuild['action'])) |
1133 return postbuilds | 1133 return postbuilds |
OLD | NEW |