Permalink
Browse files

Revert 1510-1512. The new test fails on all bots.

git-svn-id: http://gyp.googlecode.com/svn/trunk@1513 78cadc50-ecff-11dd-a971-7dbc132099af
  • Loading branch information...
1 parent 9b14461 commit b3e6e5f9ac0c05993c7a38a7ddd68df8a80e6c47 thakis@chromium.org committed Oct 3, 2012
@@ -125,10 +125,7 @@ def ensure_directory_exists(path):
LINK_COMMANDS_LINUX = """\
quiet_cmd_alink = AR($(TOOLSET)) $@
-cmd_alink = rm -f $@ && $(AR.$(TOOLSET)) crs $@ $(filter %.o,$^)
-
-quiet_cmd_alink_thin = AR($(TOOLSET)) $@
-cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) crsT $@ $(filter %.o,$^)
+cmd_alink = rm -f $@ && $(AR.$(TOOLSET)) crsT $@ $(filter %.o,$^)
# Due to circular dependencies between libraries :(, we wrap the
# special "figure out circular dependencies" flags around the entire
@@ -179,10 +176,7 @@ def ensure_directory_exists(path):
LINK_COMMANDS_ANDROID = """\
quiet_cmd_alink = AR($(TOOLSET)) $@
-cmd_alink = rm -f $@ && $(AR.$(TOOLSET)) crs $@ $(filter %.o,$^)
-
-quiet_cmd_alink_thin = AR($(TOOLSET)) $@
-cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) crsT $@ $(filter %.o,$^)
+cmd_alink = rm -f $@ && $(AR.$(TOOLSET)) crsT $@ $(filter %.o,$^)
# Due to circular dependencies between libraries :(, we wrap the
# special "figure out circular dependencies" flags around the entire
@@ -723,12 +717,9 @@ def Write(self, qualified_target, base_path, output_filename, spec, configs,
else:
self.output = self.output_binary = self.ComputeOutput(spec)
- self.is_standalone_static_library = bool(
- spec.get('standalone_static_library', 0))
self._INSTALLABLE_TARGETS = ('executable', 'loadable_module',
'shared_library')
- if (self.is_standalone_static_library or
- self.type in self._INSTALLABLE_TARGETS):
+ if self.type in self._INSTALLABLE_TARGETS:
self.alias = os.path.basename(self.output)
install_path = self._InstallableTargetInstallPath()
else:
@@ -1541,12 +1532,8 @@ def WriteTarget(self, spec, configs, deps, link_deps, bundle_deps,
for link_dep in link_deps:
assert ' ' not in link_dep, (
"Spaces in alink input filenames not supported (%s)" % link_dep)
- if self.is_standalone_static_library:
- self.WriteDoCmd([self.output_binary], link_deps, 'alink', part_of_all,
- postbuilds=postbuilds)
- else:
- self.WriteDoCmd([self.output_binary], link_deps, 'alink_thin',
- part_of_all, postbuilds=postbuilds)
+ self.WriteDoCmd([self.output_binary], link_deps, 'alink', part_of_all,
+ postbuilds=postbuilds)
elif self.type == 'shared_library':
self.WriteLn('%s: LD_INPUTS := %s' % (
QuoteSpaces(self.output_binary),
@@ -1586,12 +1573,9 @@ def WriteTarget(self, spec, configs, deps, link_deps, bundle_deps,
# 1) They need to install to the build dir or "product" dir.
# 2) They get shortcuts for building (e.g. "make chrome").
# 3) They are part of "make all".
- if (self.type in self._INSTALLABLE_TARGETS or
- self.is_standalone_static_library):
+ if self.type in self._INSTALLABLE_TARGETS:
if self.type == 'shared_library':
file_desc = 'shared library'
- elif self.type == 'static_library':
- file_desc = 'static library'
else:
file_desc = 'executable'
install_path = self._InstallableTargetInstallPath()
@@ -366,8 +366,6 @@ def WriteSpec(self, spec, config_name, generator_flags,
self.toolset = spec['toolset']
config = spec['configurations'][config_name]
self.target = Target(spec['type'])
- self.is_standalone_static_library = bool(
- spec.get('standalone_static_library', 0))
self.is_mac_bundle = gyp.xcode_emulation.IsMacBundle(self.flavor, spec)
self.xcode_settings = self.msvs_settings = None
@@ -954,12 +952,8 @@ def WriteTarget(self, spec, config_name, config, link_deps, compile_deps):
if self.xcode_settings:
variables.append(('libtool_flags',
self.xcode_settings.GetLibtoolflags(config_name)))
- if self.is_standalone_static_library or self.flavor in ['mac', 'win']:
- self.ninja.build(self.target.binary, 'alink', link_deps,
- order_only=compile_deps, variables=variables)
- else:
- self.ninja.build(self.target.binary, 'alink_thin', link_deps,
- order_only=compile_deps, variables=variables)
+ self.ninja.build(self.target.binary, 'alink', link_deps,
+ order_only=compile_deps, variables=variables)
else:
self.WriteLink(spec, config_name, config, link_deps)
return self.target.binary
@@ -1143,7 +1137,7 @@ def ComputeOutput(self, spec, type=None):
elif self.flavor == 'win' and self.toolset == 'target':
type_in_output_root += ['shared_library']
- if type in type_in_output_root or self.is_standalone_static_library:
+ if type in type_in_output_root:
return filename
elif type == 'shared_library':
libdir = 'lib'
@@ -1500,10 +1494,6 @@ def GenerateOutputForConfig(target_list, target_dicts, data, params,
master_ninja.rule(
'alink',
description='AR $out',
- command='rm -f $out && $ar rcs $out $in')
- master_ninja.rule(
- 'alink_thin',
- description='AR $out',
command='rm -f $out && $ar rcsT $out $in')
# This allows targets that only need to depend on $lib's API to declare an
View
@@ -83,7 +83,6 @@ def IsPathSection(section):
'rules',
'run_as',
'sources',
- 'standalone_static_library',
'suppress_wildcard',
'target_name',
'toolset',
@@ -107,7 +106,6 @@ def IsPathSection(section):
'libraries',
'link_settings',
'sources',
- 'standalone_static_library',
'target_name',
'type',
]
@@ -2282,11 +2280,6 @@ def ValidateTargetType(target, target_dict):
raise GypError("Target %s has an invalid target type '%s'. "
"Must be one of %s." %
(target, target_type, '/'.join(VALID_TARGET_TYPES)))
- if (target_dict.get('standalone_static_library', 0) and
- not target_type == 'static_library'):
- raise GypError('Target %s has type %s but standalone_static_library flag is'
- ' only valid for static_library type.' % (target,
- target_type))
def ValidateSourcesInTarget(target, target_dict, build_file):
@@ -20,7 +20,6 @@
'libraries',
'link_settings',
'sources',
- 'standalone_static_library',
'target_name',
'type',
]
@@ -1,17 +0,0 @@
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'configurations',
- 'type': 'none',
- 'configurations': {
- 'Debug': {
- 'standalone_static_library': 1,
- },
- }
- },
- ],
-}
@@ -1,35 +0,0 @@
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies build of a static_library with the standalone_static_library flag set.
-"""
-
-import os
-import subprocess
-import sys
-import TestGyp
-
-test = TestGyp.TestGyp()
-
-test.run_gyp('mylib.gyp')
-test.build('mylib.gyp', target='prog')
-
-# Verify that the static library is copied to PRODUCT_DIR.
-built_lib = test.built_file_basename('mylib', type=test.STATIC_LIB)
-path = test.built_file_path(built_lib)
-test.must_exist(path)
-
-# Verify that the program runs properly.
-expect = 'hello from mylib.c\n'
-test.run_built_executable('prog', stdout=expect)
-
-# Verify that libmylib.a contains symbols. "ar -x" fails on a 'thin' archive.
-if test.format in ('make', 'ninja') and sys.platform.startswith('linux'):
- retcode = subprocess.call(['ar', '-x', path])
- assert retcode == 0
-
-test.pass_test()
@@ -1,7 +0,0 @@
-#include <stdio.h>
-
-void print(void)
-{
- printf("hello from mylib.c\n");
- return;
-}
@@ -1,26 +0,0 @@
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'mylib',
- 'type': 'static_library',
- 'standalone_static_library': 1,
- 'sources': [
- 'mylib.c',
- ],
- },
- {
- 'target_name': 'prog',
- 'type': 'executable',
- 'sources': [
- 'prog.c',
- ],
- 'dependencies': [
- 'mylib',
- ],
- },
- ],
-}
@@ -1,7 +0,0 @@
-extern void print(void);
-
-int main(int argc, char *argv[])
-{
- print();
- return 0;
-}

0 comments on commit b3e6e5f

Please sign in to comment.