summaryrefslogtreecommitdiff
path: root/chromium/tools/gyp/pylib/gyp/generator/ninja.py
diff options
context:
space:
mode:
authorAndras Becsi <andras.becsi@digia.com>2014-05-22 18:24:25 +0200
committerAndras Becsi <andras.becsi@digia.com>2014-06-04 16:32:40 +0200
commit4ce69f7403811819800e7c5ae1318b2647e778d1 (patch)
tree2ec3a98b5abef002670a0916354eb7e0abfe2aa2 /chromium/tools/gyp/pylib/gyp/generator/ninja.py
parenta6dd70e0328d155d5df8d6df48afbab690b08fb6 (diff)
downloadqtwebengine-chromium-4ce69f7403811819800e7c5ae1318b2647e778d1.tar.gz
Update Chromium snapshot to stable version 33.0.1750.170
This is meant as a baseline commit hence it does not include the patches we need to apply for QtWebEngine. All patches should be rebased on top of this commit so we can get rid of the external patches directory. In future these baseline commits always have to include the exact Chromium version returned by version_resolver.py's currentVersion() in their first line, so that we can retrieve the patches on top to apply on the upstream repository. This also includes a ninja update. Change-Id: I60abeadb785a3b7d149c58b65ddb5a823fed3083 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Diffstat (limited to 'chromium/tools/gyp/pylib/gyp/generator/ninja.py')
-rw-r--r--chromium/tools/gyp/pylib/gyp/generator/ninja.py50
1 files changed, 1 insertions, 49 deletions
diff --git a/chromium/tools/gyp/pylib/gyp/generator/ninja.py b/chromium/tools/gyp/pylib/gyp/generator/ninja.py
index 909c8d820b7..a40c7fe2464 100644
--- a/chromium/tools/gyp/pylib/gyp/generator/ninja.py
+++ b/chromium/tools/gyp/pylib/gyp/generator/ninja.py
@@ -1101,49 +1101,6 @@ class NinjaWriter:
else:
command = command + '_notoc'
- if config.get('let_qmake_do_the_linking', 0):
- def toAbsPaths(paths):
- return [os.path.relpath(path, self.toplevel_build) if os.path.isabs(path) else path
- for path in paths]
- def qmakeLiteral(s):
- return s.replace('"', '\\"')
-
- # Generate this file for all solink targets, this assumes that
- # a .pro file will pick up this pri file and do the rest of the work.
- pri_file = open(os.path.join(self.toplevel_build, self.name + "_linking.pri"), 'w')
-
- if self.flavor == 'win':
- # qmake will take care of the manifest
- ldflags = filter(lambda x: not x.lower().startswith('/manifest'), ldflags)
-
- # Replace "$!PRODUCT_DIR" with "$$PWD" in link flags (which might contain some -L directives).
- prefixed_lflags = [self.ExpandSpecial(f, '$$PWD') for f in ldflags]
- prefixed_library_dirs = ['-L' + self.ExpandSpecial(f, '$$PWD') for f in config.get('library_dirs', [])]
- prefixed_libraries = gyp.common.uniquer([self.ExpandSpecial(f, '$$PWD') for f in spec.get('libraries', [])])
- if self.flavor == 'mac':
- prefixed_libraries = self.xcode_settings.AdjustLibraries(prefixed_libraries)
- elif self.flavor == 'win':
- prefixed_libraries = self.msvs_settings.AdjustLibraries(prefixed_libraries)
-
- # Make sure that we have relative paths to our out/(Release|Debug), where we generate our .pri file, and then prepend $$PWD to them.
- prefixed_object_and_archives = ['$$PWD/' + o for o in toAbsPaths(link_deps)]
-
- pri_file.write("QMAKE_LFLAGS += %s\n" % qmakeLiteral(' '.join(prefixed_lflags)))
- # Follow the logic of the solink rule.
- if self.flavor != 'mac' and self.flavor != 'win':
- pri_file.write("LIBS_PRIVATE += -Wl,--whole-archive %s -Wl,--no-whole-archive\n" % qmakeLiteral(' '.join(prefixed_object_and_archives)))
- else:
- pri_file.write("LIBS_PRIVATE += %s\n" % qmakeLiteral(' '.join(prefixed_object_and_archives)))
- # External libs have to come after objects/archives, the linker resolve them in order.
- pri_file.write("LIBS_PRIVATE += %s\n" % qmakeLiteral(' '.join(prefixed_library_dirs + prefixed_libraries)))
- # Make sure that if ninja modifies one of the inputs, qmake/make will link again.
- pri_file.write("POST_TARGETDEPS += %s\n" % qmakeLiteral(' '.join(prefixed_object_and_archives)))
- pri_file.close()
-
- # In this mode we prevent letting ninja link at all.
- command = 'phony'
- command_suffix = ''
-
if len(solibs):
extra_bindings.append(('solibs', gyp.common.EncodePOSIXShellList(solibs)))
@@ -1516,13 +1473,8 @@ def CalculateVariables(default_variables, params):
default_variables.setdefault('SHARED_LIB_SUFFIX', '.so')
default_variables.setdefault('SHARED_LIB_DIR',
os.path.join('$!PRODUCT_DIR', 'lib'))
- # Take into account the fact that toplevel_dir might not be equal to depth
- toplevel_offset = ''
- if 'options' in params:
- options = params['options']
- toplevel_offset = os.path.relpath(options.depth, options.toplevel_dir)
default_variables.setdefault('LIB_DIR',
- os.path.join('$!PRODUCT_DIR', 'obj', toplevel_offset))
+ os.path.join('$!PRODUCT_DIR', 'obj'))
def ComputeOutputDir(params):
"""Returns the path from the toplevel_dir to the build output directory."""