diff options
Diffstat (limited to 'third_party')
-rw-r--r-- | third_party/libevent/SConstruct | 2 | ||||
-rw-r--r-- | third_party/libevent/event-config.h | 2 | ||||
-rw-r--r-- | third_party/libevent/event.c | 4 | ||||
-rw-r--r-- | third_party/libevent/evutil.c | 4 | ||||
-rw-r--r-- | third_party/libevent/libevent.Makefile | 6 | ||||
-rw-r--r-- | third_party/libevent/libevent.scons | 292 | ||||
-rw-r--r-- | third_party/libevent/libevent.target.mk | 135 | ||||
-rw-r--r-- | third_party/libevent/libevent_main.scons | 327 | ||||
-rw-r--r-- | third_party/libevent/select.c | 5 |
9 files changed, 4 insertions, 773 deletions
diff --git a/third_party/libevent/SConstruct b/third_party/libevent/SConstruct deleted file mode 100644 index 5a83d6a..0000000 --- a/third_party/libevent/SConstruct +++ /dev/null @@ -1,2 +0,0 @@ -# This file is generated; do not edit. -SConscript('libevent_main.scons') diff --git a/third_party/libevent/event-config.h b/third_party/libevent/event-config.h index 66a53de..d0b4ba5 100644 --- a/third_party/libevent/event-config.h +++ b/third_party/libevent/event-config.h @@ -7,6 +7,8 @@ #if defined(__APPLE__) #include "mac/event-config.h" +#elif defined(ANDROID) // Android has to be defined before linux +#include "android/event-config.h" #elif defined(__linux__) #include "linux/event-config.h" #else diff --git a/third_party/libevent/event.c b/third_party/libevent/event.c index 0bdcd78..d7ccd3f 100644 --- a/third_party/libevent/event.c +++ b/third_party/libevent/event.c @@ -25,11 +25,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H -#ifdef ANDROID // maybe libevent should be in a seperate lib ... -#include "android/config.h" -#else #include "config.h" -#endif //Android #endif #ifdef WIN32 diff --git a/third_party/libevent/evutil.c b/third_party/libevent/evutil.c index f281fc7..564377d 100644 --- a/third_party/libevent/evutil.c +++ b/third_party/libevent/evutil.c @@ -25,11 +25,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H -#ifdef ANDROID // maybe libevent should be in a seperate lib ... -#include "android/config.h" -#else #include "config.h" -#endif //Android #endif #ifdef WIN32 diff --git a/third_party/libevent/libevent.Makefile b/third_party/libevent/libevent.Makefile deleted file mode 100644 index 97b6bc2..0000000 --- a/third_party/libevent/libevent.Makefile +++ /dev/null @@ -1,6 +0,0 @@ -# This file is generated by gyp; do not edit. - -export builddir_name ?= /usr/local/google/src/chromium-merge/src/third_party/libevent/out -.PHONY: all -all: - $(MAKE) -C ../.. libevent diff --git a/third_party/libevent/libevent.scons b/third_party/libevent/libevent.scons deleted file mode 100644 index 0b582cf..0000000 --- a/third_party/libevent/libevent.scons +++ /dev/null @@ -1,292 +0,0 @@ -# This file is generated; do not edit. - -import os - -Import("env") - -env = env.Clone(COMPONENT_NAME='libevent', - TARGET_NAME='libevent') - -configurations = { - 'Debug' : { - 'Append' : dict( - CCFLAGS = [ - '-pthread', - '-fno-exceptions', - '-fno-asynchronous-unwind-tables', - '-fvisibility=hidden', - '-D_FILE_OFFSET_BITS=64', - '-O0', - '-g' - ], - CPPDEFINES = [ - 'CHROMIUM_BUILD', - 'HAVE_CONFIG_H', - '_DEBUG' - ], - CPPPATH = [ - env.Dir('$SRC_DIR/third_party/libevent/.'), - env.Dir('$SRC_DIR/third_party/libevent/linux') - ], - CXXFLAGS = [ - '-fno-rtti', - '-fno-threadsafe-statics', - '-fvisibility-inlines-hidden' - ], - LINKFLAGS = [ - '-pthread', - '-rdynamic' - ], - ), - 'FilterOut' : dict( - ), - 'Replace' : dict( - FLOCK_LDMODULE = ['flock', '$TOP_BUILDDIR/linker.lock', '$LDMODULE'], - FLOCK_LINK = ['flock', '$TOP_BUILDDIR/linker.lock', '$LINK'], - FLOCK_SHLINK = ['flock', '$TOP_BUILDDIR/linker.lock', '$SHLINK'], - IMPLICIT_COMMAND_DEPENDENCIES = '0', - LDMODULECOM = [['$FLOCK_LDMODULE', - '-o', - '$TARGET', - '$_LIBDIRFLAGS', - '$LDMODULEFLAGS', - '$SOURCES', - '-Wl,--start-group', - '$_LIBFLAGS', - '-Wl,--end-group']], - LIBPATH = ['$LIB_DIR'], - 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']], - ), - 'ImportExternal' : [ - 'AS', - 'CC', - 'CXX', - 'LINK', - ], - 'PropagateExternal' : [ - 'AS', - 'CC', - 'CCACHE_DIR', - 'CXX', - 'DISTCC_DIR', - 'DISTCC_HOSTS', - 'HOME', - 'INCLUDE_SERVER_ARGS', - 'INCLUDE_SERVER_PORT', - 'LINK', - 'CHROME_BUILD_TYPE', - 'CHROMIUM_BUILD', - 'OFFICIAL_BUILD', - ], - }, - 'Release' : { - 'Append' : dict( - CCFLAGS = [ - '-pthread', - '-fno-exceptions', - '-fno-asynchronous-unwind-tables', - '-fvisibility=hidden', - '-D_FILE_OFFSET_BITS=64', - '-O2', - '-fno-ident', - '-fdata-sections', - '-ffunction-sections' - ], - CPPDEFINES = [ - 'CHROMIUM_BUILD', - 'HAVE_CONFIG_H', - 'NDEBUG', - 'NVALGRIND' - ], - CPPPATH = [ - env.Dir('$SRC_DIR/third_party/libevent/.'), - env.Dir('$SRC_DIR/third_party/libevent/linux') - ], - CXXFLAGS = [ - '-fno-rtti', - '-fno-threadsafe-statics', - '-fvisibility-inlines-hidden' - ], - LINKFLAGS = [ - '-pthread', - '-Wl,--gc-sections' - ], - ), - 'FilterOut' : dict( - ), - 'Replace' : dict( - FLOCK_LDMODULE = ['flock', '$TOP_BUILDDIR/linker.lock', '$LDMODULE'], - FLOCK_LINK = ['flock', '$TOP_BUILDDIR/linker.lock', '$LINK'], - FLOCK_SHLINK = ['flock', '$TOP_BUILDDIR/linker.lock', '$SHLINK'], - IMPLICIT_COMMAND_DEPENDENCIES = '0', - LDMODULECOM = [['$FLOCK_LDMODULE', - '-o', - '$TARGET', - '$_LIBDIRFLAGS', - '$LDMODULEFLAGS', - '$SOURCES', - '-Wl,--start-group', - '$_LIBFLAGS', - '-Wl,--end-group']], - LIBPATH = ['$LIB_DIR'], - 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']], - ), - 'ImportExternal' : [ - 'AS', - 'CC', - 'CXX', - 'LINK', - ], - 'PropagateExternal' : [ - 'AS', - 'CC', - 'CCACHE_DIR', - 'CXX', - 'DISTCC_DIR', - 'DISTCC_HOSTS', - 'HOME', - 'INCLUDE_SERVER_ARGS', - 'INCLUDE_SERVER_PORT', - 'LINK', - 'CHROME_BUILD_TYPE', - 'CHROMIUM_BUILD', - 'OFFICIAL_BUILD', - ], - }, -} - -config = configurations[env['CONFIG_NAME']] -env.Append(**config['Append']) -env.FilterOut(**config['FilterOut']) -env.Replace(**config['Replace']) - -# Scons forces -fPIC for SHCCFLAGS on some platforms. -# Disable that so we can control it from cflags in gyp. -# Note that Scons itself is inconsistent with its -fPIC -# setting. SHCCFLAGS forces -fPIC, and SHCFLAGS does not. -# This will make SHCCFLAGS consistent with SHCFLAGS. -env['SHCCFLAGS'] = ['$CCFLAGS'] - -for _var in config['ImportExternal']: - if _var in ARGUMENTS: - env[_var] = ARGUMENTS[_var] - elif _var in os.environ: - env[_var] = os.environ[_var] -for _var in config['PropagateExternal']: - if _var in ARGUMENTS: - env[_var] = ARGUMENTS[_var] - elif _var in os.environ: - env['ENV'][_var] = os.environ[_var] - -env['ENV']['LD_LIBRARY_PATH'] = env.subst('$LIB_DIR') - -if ARGUMENTS.get('COVERAGE') not in (None, '0'): - env.AppendUnique( - CCFLAGS = [ - '-fprofile-arcs', - '-ftest-coverage' - ], - LINKFLAGS = [ - '-fprofile-arcs' - ], - ) - -if ARGUMENTS.get('PROFILE') not in (None, '0'): - env.AppendUnique( - CCFLAGS = [ - '-pg', - '-g' - ], - LINKFLAGS = [ - '-pg' - ], - ) - -if ARGUMENTS.get('SYMBOLS') not in (None, '0'): - env.AppendUnique( - CCFLAGS = [ - '-g' - ], - ) - -input_files = [ - 'buffer.c', - 'evbuffer.c', - 'evdns.c', - 'event.c', - 'event_tagging.c', - 'evrpc.c', - 'evutil.c', - 'http.c', - 'log.c', - 'poll.c', - 'select.c', - 'signal.c', - 'strlcpy.c', - 'epoll.c', - 'epoll_sub.c', -] - -target_files = [] -prerequisites = [] - -_result = [] -for infile in input_files: - if env.compilable(infile): - if (type(infile) == type('') - and (infile.startswith('$SRC_DIR/third_party/libevent/') - or not os.path.isabs(env.subst(infile)))): - # Force files below the build directory by replacing all '..' - # elements in the path with '__': - base, ext = os.path.splitext(os.path.normpath(infile)) - base = [d == '..' and '__' or d for d in base.split('/')] - base = os.path.join(*base) - object = '${OBJ_DIR}/${COMPONENT_NAME}/${TARGET_NAME}/' + base - if not infile.startswith('$SRC_DIR/third_party/libevent/'): - infile = '$SRC_DIR/third_party/libevent/' + infile - infile = env.StaticObject(object, infile)[0] - else: - infile = env.StaticObject(infile)[0] - _result.append(infile) -input_files = _result - -_outputs = env.GypStaticLibrary('event', input_files) -target_files.extend(_outputs) - -gyp_target = env.Alias('libevent', target_files) -env.Requires(gyp_target, prerequisites) -Return("gyp_target") diff --git a/third_party/libevent/libevent.target.mk b/third_party/libevent/libevent.target.mk deleted file mode 100644 index a06862c..0000000 --- a/third_party/libevent/libevent.target.mk +++ /dev/null @@ -1,135 +0,0 @@ -# This file is generated by gyp; do not edit. - -TOOLSET := target -TARGET := libevent -DEFS_Debug := '-DNO_HEAPCHECKER' \ - '-DCHROMIUM_BUILD' \ - '-DENABLE_REMOTING=1' \ - '-DENABLE_GPU=1' \ - '-DHAVE_CONFIG_H' \ - '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \ - '-D_DEBUG' - -# Flags passed to both C and C++ files. -CFLAGS_Debug := -pthread \ - -fno-exceptions \ - -Wno-unused-parameter \ - -Wno-missing-field-initializers \ - -D_FILE_OFFSET_BITS=64 \ - -fvisibility=hidden \ - -pipe \ - -fno-strict-aliasing \ - -O0 \ - -g - -# Flags passed to only C (and not C++) files. -CFLAGS_C_Debug := - -# Flags passed to only C++ (and not C) files. -CFLAGS_CC_Debug := -fno-rtti \ - -fno-threadsafe-statics \ - -fvisibility-inlines-hidden - -INCS_Debug := -Ithird_party/libevent \ - -Ithird_party/libevent/linux - -DEFS_Release := '-DNO_HEAPCHECKER' \ - '-DCHROMIUM_BUILD' \ - '-DENABLE_REMOTING=1' \ - '-DENABLE_GPU=1' \ - '-DHAVE_CONFIG_H' \ - '-DNDEBUG' \ - '-DNVALGRIND' \ - '-DDYNAMIC_ANNOTATIONS_ENABLED=0' - -# Flags passed to both C and C++ files. -CFLAGS_Release := -pthread \ - -fno-exceptions \ - -Wno-unused-parameter \ - -Wno-missing-field-initializers \ - -D_FILE_OFFSET_BITS=64 \ - -fvisibility=hidden \ - -pipe \ - -fno-strict-aliasing \ - -O2 \ - -fno-ident \ - -fdata-sections \ - -ffunction-sections - -# Flags passed to only C (and not C++) files. -CFLAGS_C_Release := - -# Flags passed to only C++ (and not C) files. -CFLAGS_CC_Release := -fno-rtti \ - -fno-threadsafe-statics \ - -fvisibility-inlines-hidden - -INCS_Release := -Ithird_party/libevent \ - -Ithird_party/libevent/linux - -OBJS := $(obj).target/$(TARGET)/third_party/libevent/buffer.o \ - $(obj).target/$(TARGET)/third_party/libevent/evbuffer.o \ - $(obj).target/$(TARGET)/third_party/libevent/evdns.o \ - $(obj).target/$(TARGET)/third_party/libevent/event.o \ - $(obj).target/$(TARGET)/third_party/libevent/event_tagging.o \ - $(obj).target/$(TARGET)/third_party/libevent/evrpc.o \ - $(obj).target/$(TARGET)/third_party/libevent/evutil.o \ - $(obj).target/$(TARGET)/third_party/libevent/http.o \ - $(obj).target/$(TARGET)/third_party/libevent/log.o \ - $(obj).target/$(TARGET)/third_party/libevent/poll.o \ - $(obj).target/$(TARGET)/third_party/libevent/select.o \ - $(obj).target/$(TARGET)/third_party/libevent/signal.o \ - $(obj).target/$(TARGET)/third_party/libevent/strlcpy.o \ - $(obj).target/$(TARGET)/third_party/libevent/epoll.o \ - $(obj).target/$(TARGET)/third_party/libevent/epoll_sub.o - -# Add to the list of files we specially track dependencies for. -all_deps += $(OBJS) - -# CFLAGS et al overrides must be target-local. -# See "Target-specific Variable Values" in the GNU Make manual. -$(OBJS): TOOLSET := $(TOOLSET) -$(OBJS): GYP_CFLAGS := $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE)) $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) -$(OBJS): GYP_CXXFLAGS := $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE)) $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) - -# Suffix rules, putting all outputs into $(obj). - -$(obj).$(TOOLSET)/$(TARGET)/%.o: $(srcdir)/%.c FORCE_DO_CMD - @$(call do_cmd,cc,1) - -# Try building from generated source, too. - -$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj).$(TOOLSET)/%.c FORCE_DO_CMD - @$(call do_cmd,cc,1) - -$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj)/%.c FORCE_DO_CMD - @$(call do_cmd,cc,1) - -# End of this set of suffix rules -### Rules for final target. -LDFLAGS_Debug := -pthread \ - -Wl,-z,noexecstack - -LDFLAGS_Release := -pthread \ - -Wl,-z,noexecstack \ - -Wl,-O1 \ - -Wl,--as-needed \ - -Wl,--gc-sections - -LIBS := - -$(obj).target/third_party/libevent/libevent.a: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE)) -$(obj).target/third_party/libevent/libevent.a: LIBS := $(LIBS) -$(obj).target/third_party/libevent/libevent.a: TOOLSET := $(TOOLSET) -$(obj).target/third_party/libevent/libevent.a: $(OBJS) FORCE_DO_CMD - $(call do_cmd,alink) - -all_deps += $(obj).target/third_party/libevent/libevent.a -# Add target alias -.PHONY: libevent -libevent: $(obj).target/third_party/libevent/libevent.a - -# Add target alias to "all" target. -.PHONY: all -all: libevent - diff --git a/third_party/libevent/libevent_main.scons b/third_party/libevent/libevent_main.scons deleted file mode 100644 index 46cd75e..0000000 --- a/third_party/libevent/libevent_main.scons +++ /dev/null @@ -1,327 +0,0 @@ -# This file is generated; do not edit. - -__doc__ = ''' -Wrapper configuration for building this entire "solution," -including all the specific targets in various *.scons files. -''' - -import os -import sys - -import SCons.Environment -import SCons.Util - -def GetProcessorCount(): - ''' - Detects the number of CPUs on the system. Adapted form: - http://codeliberates.blogspot.com/2008/05/detecting-cpuscores-in-python.html - ''' - # Linux, Unix and Mac OS X: - if hasattr(os, 'sysconf'): - if os.sysconf_names.has_key('SC_NPROCESSORS_ONLN'): - # Linux and Unix or Mac OS X with python >= 2.5: - return os.sysconf('SC_NPROCESSORS_ONLN') - else: # Mac OS X with Python < 2.5: - return int(os.popen2("sysctl -n hw.ncpu")[1].read()) - # Windows: - if os.environ.has_key('NUMBER_OF_PROCESSORS'): - return max(int(os.environ.get('NUMBER_OF_PROCESSORS', '1')), 1) - return 1 # Default - -# Support PROGRESS= to show progress in different ways. -p = ARGUMENTS.get('PROGRESS') -if p == 'spinner': - Progress(['/\r', '|\r', '\\\r', '-\r'], - interval=5, - file=open('/dev/tty', 'w')) -elif p == 'name': - Progress('$TARGET\r', overwrite=True, file=open('/dev/tty', 'w')) - -# Set the default -j value based on the number of processors. -SetOption('num_jobs', GetProcessorCount() + 1) - -# Have SCons use its cached dependency information. -SetOption('implicit_cache', 1) - -# Only re-calculate MD5 checksums if a timestamp has changed. -Decider('MD5-timestamp') - -# Since we set the -j value by default, suppress SCons warnings about being -# unable to support parallel build on versions of Python with no threading. -default_warnings = ['no-no-parallel-support'] -SetOption('warn', default_warnings + GetOption('warn')) - -AddOption('--mode', nargs=1, dest='conf_list', default=[], - action='append', help='Configuration to build.') - -AddOption('--verbose', dest='verbose', default=False, - action='store_true', help='Verbose command-line output.') - - -# -sconscript_file_map = dict( - libevent = 'libevent.scons', -) - -class LoadTarget: - ''' - Class for deciding if a given target sconscript is to be included - based on a list of included target names, optionally prefixed with '-' - to exclude a target name. - ''' - def __init__(self, load): - ''' - Initialize a class with a list of names for possible loading. - - Arguments: - load: list of elements in the LOAD= specification - ''' - self.included = set([c for c in load if not c.startswith('-')]) - self.excluded = set([c[1:] for c in load if c.startswith('-')]) - - if not self.included: - self.included = set(['all']) - - def __call__(self, target): - ''' - Returns True if the specified target's sconscript file should be - loaded, based on the initialized included and excluded lists. - ''' - return (target in self.included or - ('all' in self.included and not target in self.excluded)) - -if 'LOAD' in ARGUMENTS: - load = ARGUMENTS['LOAD'].split(',') -else: - load = [] -load_target = LoadTarget(load) - -sconscript_files = [] -for target, sconscript in sconscript_file_map.iteritems(): - if load_target(target): - sconscript_files.append(sconscript) - - -target_alias_list= [] - -conf_list = GetOption('conf_list') -if conf_list: - # In case the same --mode= value was specified multiple times. - conf_list = list(set(conf_list)) -else: - conf_list = ['Debug'] - -sconsbuild_dir = Dir('../../sconsbuild') - - -def FilterOut(self, **kw): - kw = SCons.Environment.copy_non_reserved_keywords(kw) - for key, val in kw.items(): - envval = self.get(key, None) - if envval is None: - # No existing variable in the environment, so nothing to delete. - continue - - for vremove in val: - # Use while not if, so we can handle duplicates. - while vremove in envval: - envval.remove(vremove) - - self[key] = envval - - # TODO(sgk): SCons.Environment.Append() has much more logic to deal - # with various types of values. We should handle all those cases in here - # too. (If variable is a dict, etc.) - - -non_compilable_suffixes = { - 'LINUX' : set([ - '.bdic', - '.css', - '.dat', - '.fragment', - '.gperf', - '.h', - '.hh', - '.hpp', - '.html', - '.hxx', - '.idl', - '.in', - '.in0', - '.in1', - '.js', - '.mk', - '.rc', - '.sigs', - '', - ]), - 'WINDOWS' : set([ - '.h', - '.hh', - '.hpp', - '.dat', - '.idl', - '.in', - '.in0', - '.in1', - ]), -} - -def compilable(env, file): - base, ext = os.path.splitext(str(file)) - if ext in non_compilable_suffixes[env['TARGET_PLATFORM']]: - return False - return True - -def compilable_files(env, sources): - return [x for x in sources if compilable(env, x)] - -def GypProgram(env, target, source, *args, **kw): - source = compilable_files(env, source) - result = env.Program('$TOP_BUILDDIR/' + str(target), source, *args, **kw) - if env.get('INCREMENTAL'): - env.Precious(result) - return result - -def GypTestProgram(env, target, source, *args, **kw): - source = compilable_files(env, source) - result = env.Program('$TOP_BUILDDIR/' + str(target), source, *args, **kw) - if env.get('INCREMENTAL'): - env.Precious(*result) - return result - -def GypLibrary(env, target, source, *args, **kw): - source = compilable_files(env, source) - result = env.Library('$LIB_DIR/' + str(target), source, *args, **kw) - return result - -def GypLoadableModule(env, target, source, *args, **kw): - source = compilable_files(env, source) - result = env.LoadableModule('$TOP_BUILDDIR/' + str(target), source, *args, - **kw) - return result - -def GypStaticLibrary(env, target, source, *args, **kw): - source = compilable_files(env, source) - result = env.StaticLibrary('$LIB_DIR/' + str(target), source, *args, **kw) - return result - -def GypSharedLibrary(env, target, source, *args, **kw): - source = compilable_files(env, source) - result = env.SharedLibrary('$LIB_DIR/' + str(target), source, *args, **kw) - if env.get('INCREMENTAL'): - env.Precious(result) - return result - -def add_gyp_methods(env): - env.AddMethod(GypProgram) - env.AddMethod(GypTestProgram) - env.AddMethod(GypLibrary) - env.AddMethod(GypLoadableModule) - env.AddMethod(GypStaticLibrary) - env.AddMethod(GypSharedLibrary) - - env.AddMethod(FilterOut) - - env.AddMethod(compilable) - - -base_env = Environment( - tools = ['ar', 'as', 'gcc', 'g++', 'gnulink', 'chromium_builders'], - INTERMEDIATE_DIR='$OBJ_DIR/${COMPONENT_NAME}/_${TARGET_NAME}_intermediate', - LIB_DIR='$TOP_BUILDDIR/lib', - OBJ_DIR='$TOP_BUILDDIR/obj', - SCONSBUILD_DIR=sconsbuild_dir.abspath, - SHARED_INTERMEDIATE_DIR='$OBJ_DIR/_global_intermediate', - SRC_DIR=Dir('../..'), - TARGET_PLATFORM='LINUX', - TOP_BUILDDIR='$SCONSBUILD_DIR/$CONFIG_NAME', - LIBPATH=['$LIB_DIR'], -) - -if not GetOption('verbose'): - base_env.SetDefault( - ARCOMSTR='Creating library $TARGET', - ASCOMSTR='Assembling $TARGET', - CCCOMSTR='Compiling $TARGET', - CONCATSOURCECOMSTR='ConcatSource $TARGET', - CXXCOMSTR='Compiling $TARGET', - LDMODULECOMSTR='Building loadable module $TARGET', - LINKCOMSTR='Linking $TARGET', - MANIFESTCOMSTR='Updating manifest for $TARGET', - MIDLCOMSTR='Compiling IDL $TARGET', - PCHCOMSTR='Precompiling $TARGET', - RANLIBCOMSTR='Indexing $TARGET', - RCCOMSTR='Compiling resource $TARGET', - SHCCCOMSTR='Compiling $TARGET', - SHCXXCOMSTR='Compiling $TARGET', - SHLINKCOMSTR='Linking $TARGET', - SHMANIFESTCOMSTR='Updating manifest for $TARGET', - ) - -add_gyp_methods(base_env) - -for conf in conf_list: - env = base_env.Clone(CONFIG_NAME=conf) - SConsignFile(env.File('$TOP_BUILDDIR/.sconsign').abspath) - for sconscript in sconscript_files: - target_alias = env.SConscript(sconscript, exports=['env']) - if target_alias: - target_alias_list.extend(target_alias) - -Default(Alias('all', target_alias_list)) - -help_fmt = ''' -Usage: hammer [SCONS_OPTIONS] [VARIABLES] [TARGET] ... - -Local command-line build options: - --mode=CONFIG Configuration to build: - --mode=Debug [default] - --mode=Release - --verbose Print actual executed command lines. - -Supported command-line build variables: - LOAD=[module,...] Comma-separated list of components to load in the - dependency graph ('-' prefix excludes) - PROGRESS=type Display a progress indicator: - name: print each evaluated target name - spinner: print a spinner every 5 targets - -The following TARGET names can also be used as LOAD= module names: - -%s -''' - -if GetOption('help'): - def columnar_text(items, width=78, indent=2, sep=2): - result = [] - colwidth = max(map(len, items)) + sep - cols = (width - indent) / colwidth - if cols < 1: - cols = 1 - rows = (len(items) + cols - 1) / cols - indent = '%*s' % (indent, '') - sep = indent - for row in xrange(0, rows): - result.append(sep) - for i in xrange(row, len(items), rows): - result.append('%-*s' % (colwidth, items[i])) - sep = '\n' + indent - result.append('\n') - return ''.join(result) - - load_list = set(sconscript_file_map.keys()) - target_aliases = set(map(str, target_alias_list)) - - common = load_list and target_aliases - load_only = load_list - common - target_only = target_aliases - common - help_text = [help_fmt % columnar_text(sorted(list(common)))] - if target_only: - fmt = "The following are additional TARGET names:\n\n%s\n" - help_text.append(fmt % columnar_text(sorted(list(target_only)))) - if load_only: - fmt = "The following are additional LOAD= module names:\n\n%s\n" - help_text.append(fmt % columnar_text(sorted(list(load_only)))) - Help(''.join(help_text)) diff --git a/third_party/libevent/select.c b/third_party/libevent/select.c index 65e5997..3f73331 100644 --- a/third_party/libevent/select.c +++ b/third_party/libevent/select.c @@ -60,13 +60,12 @@ #define howmany(x, y) (((x)+((y)-1))/(y)) #endif -//#ifndef _EVENT_HAVE_FD_MASK -#ifdef __BIONIC__ +#ifndef _EVENT_HAVE_FD_MASK /* This type is mandatory, but Android doesn't define it. */ #undef NFDBITS #define NFDBITS (sizeof(long)*8) typedef unsigned long fd_mask; -#endif // ANDROID +#endif struct selectop { int event_fds; /* Highest fd in fd set */ |