Skip to content
Snippets Groups Projects
Commit 016498e8 authored by evan@chromium.org's avatar evan@chromium.org
Browse files

scons: excise more scons references from the code base

I got to undo some hacks, too!

TEST=compiles

Review URL: http://codereview.chromium.org/5535003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68119 0039d316-1c4b-4281-b951-d872f2087c98
parent 48737d27
No related merge requests found
Showing with 12 additions and 134 deletions
......@@ -76,7 +76,7 @@ bool PathProviderPosix(int key, FilePath* result) {
}
}
// On POSIX, unit tests execute two levels deep from the source root.
// For example: sconsbuild/{Debug|Release}/net_unittest
// For example: out/{Debug|Release}/net_unittest
if (PathService::Get(base::DIR_EXE, &path)) {
path = path.DirName().DirName();
if (file_util::PathExists(path.Append(kThisSourceFile))) {
......
......@@ -56,9 +56,9 @@ const char kSymbolCharacters[] =
#if !defined(USE_SYMBOLIZE)
// Demangles C++ symbols in the given text. Example:
//
// "sconsbuild/Debug/base_unittests(_ZN10StackTraceC1Ev+0x20) [0x817778c]"
// "out/Debug/base_unittests(_ZN10StackTraceC1Ev+0x20) [0x817778c]"
// =>
// "sconsbuild/Debug/base_unittests(StackTrace::StackTrace()+0x20) [0x817778c]"
// "out/Debug/base_unittests(StackTrace::StackTrace()+0x20) [0x817778c]"
void DemangleSymbols(std::string* text) {
#if defined(__GLIBCXX__)
......
......@@ -355,7 +355,7 @@
'type': 'executable',
'dependencies': [
'../testing/gtest.gyp:gtest',
'../testing/gtest.gyp:gtestmain',
'../testing/gtest.gyp:gtest_main',
'../testing/gmock.gyp:gmock',
'breakpad_client',
'breakpad_processor_support',
......
......@@ -541,9 +541,6 @@
}],
],
}],
# Linux gyp (into scons) doesn't like target_conditions?
# TODO(???): track down why 'target_conditions' doesn't work
# on Linux gyp into scons like it does on Mac gyp into xcodeproj.
['OS=="linux"', {
'cflags': [ '-ftest-coverage',
'-fprofile-arcs' ],
......@@ -894,73 +891,6 @@
'ldflags': [
'-pthread', '-Wl,-z,noexecstack',
],
'scons_variable_settings': {
'LIBPATH': ['$LIB_DIR'],
# Linking of large files uses lots of RAM, so serialize links
# using the handy flock command from util-linux.
'FLOCK_LINK': ['flock', '$TOP_BUILDDIR/linker.lock', '$LINK'],
'FLOCK_SHLINK': ['flock', '$TOP_BUILDDIR/linker.lock', '$SHLINK'],
'FLOCK_LDMODULE': ['flock', '$TOP_BUILDDIR/linker.lock', '$LDMODULE'],
# We have several cases where archives depend on each other in
# a cyclic fashion. Since the GNU linker does only a single
# pass over the archives we surround the libraries with
# --start-group and --end-group (aka -( and -) ). That causes
# ld to loop over the group until no more undefined symbols
# are found. In an ideal world we would only make groups from
# those libraries which we knew to be in cycles. However,
# that's tough with SCons, so we bodge it by making all the
# archives a group by redefining the linking command here.
#
# TODO: investigate whether we still have cycles that
# require --{start,end}-group. There has been a lot of
# refactoring since this was first coded, which might have
# eliminated the circular dependencies.
#
# Note: $_LIBDIRFLAGS comes before ${LINK,SHLINK,LDMODULE}FLAGS
# so that we prefer our own built libraries (e.g. -lpng) to
# system versions of libraries that pkg-config might turn up.
# TODO(sgk): investigate handling this not by re-ordering the
# flags this way, but by adding a hook to use the SCons
# ParseFlags() option on the output from pkg-config.
'LINKCOM': [['$FLOCK_LINK', '-o', '$TARGET',
'$_LIBDIRFLAGS', '$LINKFLAGS', '$SOURCES',
'-Wl,--start-group', '$_LIBFLAGS', '-Wl,--end-group']],
'SHLINKCOM': [['$FLOCK_SHLINK', '-o', '$TARGET',
'$_LIBDIRFLAGS', '$SHLINKFLAGS', '$SOURCES',
'-Wl,--start-group', '$_LIBFLAGS', '-Wl,--end-group']],
'LDMODULECOM': [['$FLOCK_LDMODULE', '-o', '$TARGET',
'$_LIBDIRFLAGS', '$LDMODULEFLAGS', '$SOURCES',
'-Wl,--start-group', '$_LIBFLAGS', '-Wl,--end-group']],
'IMPLICIT_COMMAND_DEPENDENCIES': 0,
# -rpath is only used when building with shared libraries.
'conditions': [
[ 'library=="shared_library"', {
'RPATH': '$LIB_DIR',
}],
],
},
'scons_import_variables': [
'AS',
'CC',
'CXX',
'LINK',
],
'scons_propagate_variables': [
'AS',
'CC',
'CCACHE_DIR',
'CXX',
'DISTCC_DIR',
'DISTCC_HOSTS',
'HOME',
'INCLUDE_SERVER_ARGS',
'INCLUDE_SERVER_PORT',
'LINK',
'CHROME_BUILD_TYPE',
'CHROMIUM_BUILD',
'OFFICIAL_BUILD',
],
'configurations': {
'Debug_Base': {
'variables': {
......@@ -1500,10 +1430,6 @@
},
}],
],
'scons_settings': {
'sconsbuild_dir': '<(DEPTH)/sconsbuild',
'tools': ['ar', 'as', 'gcc', 'g++', 'gnulink', 'chromium_builders'],
},
'xcode_settings': {
# DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT!
# This block adds *project-wide* configuration settings to each project
......
......@@ -93,7 +93,6 @@
# out of $(pkg-config --cflags nss) and GYP include paths
# come after cflags on the command line. So we have these
# bodges:
'-I../net/third_party/nss/ssl', # for scons
'-Inet/third_party/nss/ssl', # for make
'-IWebKit/chromium/net/third_party/nss/ssl', # for make in webkit
'<!@(<(pkg-config) --cflags nss)',
......
......@@ -94,7 +94,7 @@
'../../base/base.gyp:base',
'../../testing/gmock.gyp:gmock',
'../../testing/gtest.gyp:gtest',
'../../testing/gtest.gyp:gtestmain',
'../../testing/gtest.gyp:gtest_main',
'../../breakpad/breakpad.gyp:breakpad_handler',
],
},
......
......@@ -213,7 +213,7 @@
'dependencies': [
'../app/app.gyp:app_base',
'../testing/gmock.gyp:gmock',
'../testing/gmock.gyp:gmockmain',
'../testing/gmock.gyp:gmock_main',
'../testing/gtest.gyp:gtest',
'command_buffer_client',
'command_buffer_common',
......
......@@ -18,7 +18,7 @@
#error This file should only be included by X_messages.cc, which needs to define MESSAGES_INTERNAL_IMPL_FILE first.
#endif
// Trick scons and xcode into seeing the possible real dependencies since they
// Trick xcode into seeing the possible real dependencies since they
// don't understand #include MESSAGES_INTERNAL_FILE. See http://crbug.com/7828
#if 0
#include "ipc/ipc_sync_message_unittest.h"
......
......@@ -48,7 +48,7 @@
MESSAGES_INTERNAL_FILE first.
#endif
// Trick scons and xcode into seeing the possible real dependencies since they
// Trick xcode into seeing the possible real dependencies since they
// don't understand #include MESSAGES_INTERNAL_FILE. See http://crbug.com/7828
#if 0
#include "ipc/ipc_sync_message_unittest.h"
......
# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Tool module for adding, to a construction environment, Chromium-specific
wrappers around SCons builders. This gives us a central place for any
customization we need to make to the different things we build.
"""
import sys
from SCons.Script import *
class Null(object):
def __new__(cls, *args, **kwargs):
if '_inst' not in vars(cls):
cls._inst = super(type, cls).__new__(cls, *args, **kwargs)
return cls._inst
def __init__(self, *args, **kwargs): pass
def __call__(self, *args, **kwargs): return self
def __repr__(self): return "Null()"
def __nonzero__(self): return False
def __getattr__(self, name): return self
def __setattr__(self, name, val): return self
def __delattr__(self, name): return self
def __getitem__(self, name): return self
def generate(env):
# Add the grit tool to the base environment because we use this a lot.
sys.path.append(env.Dir('$SRC_DIR/tools/grit').abspath)
env.Tool('scons', toolpath=[env.Dir('$SRC_DIR/tools/grit/grit')])
# Add the repack python script tool that we use in multiple places.
sys.path.append(env.Dir('$SRC_DIR/tools/data_pack').abspath)
env.Tool('scons', toolpath=[env.Dir('$SRC_DIR/tools/data_pack/')])
def exists(env):
return True
......@@ -50,9 +50,7 @@
],
},
{
# Note that calling this "gmock_main" confuses the scons build,
# which uses "_main" on scons files to produce special behavior.
'target_name': 'gmockmain',
'target_name': 'gmock_main',
'type': '<(library)',
'dependencies': [
'gmock',
......
......@@ -108,9 +108,7 @@
},
},
{
# Note that calling this "gtest_main" confuses the scons build,
# which uses "_main" on scons files to produce special behavior.
'target_name': 'gtestmain',
'target_name': 'gtest_main',
'type': '<(library)',
'dependencies': [
'gtest',
......
......@@ -69,7 +69,7 @@ Linux:
the directory within the buildbot working directory in which the
solution, Debug, and Release directories are found.
It's usually "src/build", but on mac it's $DIR/../xcodebuild and on
Linux it's $DIR/../sconsbuild or $DIR/sconsbuild or $DIR/out.
Linux it's $DIR/out.
This is used by buildbot scripts to help us find the output directory.
Must be used with --target.
......
......@@ -39,7 +39,6 @@ NONESSENTIAL_DIRS = (
'third_party/hunspell_dictionaries',
'third_party/hunspell/tests',
'third_party/lighttpd',
'third_party/scons',
'third_party/sqlite/test',
'third_party/vc_80',
'third_party/xdg-utils/tests',
......
......@@ -147,7 +147,6 @@ class ChromeTests(object):
if not self._options.build_dir:
dirs = [
os.path.join(self._source_dir, "xcodebuild", "Debug"),
os.path.join(self._source_dir, "sconsbuild", "Debug"),
os.path.join(self._source_dir, "out", "Debug"),
]
if exe:
......
......@@ -99,7 +99,6 @@ class ChromeTests:
else:
dirs = [
os.path.join(self._source_dir, "xcodebuild", "Debug"),
os.path.join(self._source_dir, "sconsbuild", "Debug"),
os.path.join(self._source_dir, "out", "Debug"),
os.path.join(self._source_dir, "build", "Debug"),
]
......
......@@ -7,7 +7,7 @@
# This is a small script for manually launching valgrind, along with passing
# it the suppression file, and some helpful arguments (automatically attaching
# the debugger on failures, etc). Run it from your repo root, something like:
# $ sh ./tools/valgrind/valgrind.sh ./sconsbuild/Debug/chrome
# $ sh ./tools/valgrind/valgrind.sh ./out/Debug/chrome
#
# This is mostly intended for running the chrome browser interactively.
# To run unit tests, you probably want to run chrome_tests.sh instead.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment