mirror of https://gitee.com/bigwinds/arangodb
Integrated obiwahn contributions
This commit is contained in:
commit
3f39a10bf8
|
@ -18,11 +18,14 @@ addons:
|
|||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- george-edison55-precise-backports
|
||||
packages:
|
||||
- g++-4.9
|
||||
- gcc-4.9
|
||||
- binutils-gold
|
||||
- gdb
|
||||
- cmake-data
|
||||
- cmake
|
||||
|
||||
install:
|
||||
|
||||
|
|
|
@ -0,0 +1,89 @@
|
|||
#add_subdirectory(boost)
|
||||
#add_subdirectory(etcd)
|
||||
add_subdirectory(libev)
|
||||
#add_subdirectory(linenoise-ng)
|
||||
#add_subdirectory(valgrind)
|
||||
#add_subdirectory(velocypack)
|
||||
#add_subdirectory(zlib-1.2.7)
|
||||
|
||||
|
||||
|
||||
### V8 and ICU
|
||||
|
||||
if(UNIX)
|
||||
set(V8_DIR "${CMAKE_CURRENT_SOURCE_DIR}/V8-4.3.61")
|
||||
set(V8_PLATFORM "native")
|
||||
set(V8_BIN_DIR "${V8_DIR}/out/")
|
||||
else()
|
||||
message(ERROR "Not implemented for your OS")
|
||||
endif()
|
||||
|
||||
include(ExternalProject)
|
||||
ExternalProject_Add(v8_build
|
||||
SOURCE_DIR "${V8_DIR}"
|
||||
BUILD_IN_SOURCE TRUE
|
||||
BUILD_COMMAND CXX=g++ CXX_FLAGS=-std=c++11 make -f Makefile-v8 strictaliasing=off snapshot=off werror=no "${V8_PLATFORM}"
|
||||
INSTALL_COMMAND ""
|
||||
)
|
||||
|
||||
macro(import_target tname tdep tinclude tpath)
|
||||
add_library(${tname} STATIC IMPORTED GLOBAL)
|
||||
add_dependencies(${tname} ${tdep})
|
||||
set_target_properties(${tname} PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES
|
||||
"${tinclude}"
|
||||
IMPORTED_LOCATION
|
||||
"${tpath}"
|
||||
)
|
||||
endmacro()
|
||||
|
||||
|
||||
## V8
|
||||
import_target(v8_base v8_build
|
||||
"${V8_DIR}/include"
|
||||
"${V8_BIN_DIR}/${V8_PLATFORM}/obj.target/tools/gyp/libv8_base.a"
|
||||
)
|
||||
|
||||
import_target(v8_libbase v8_build
|
||||
"${V8_DIR}/include"
|
||||
"${V8_BIN_DIR}/${V8_PLATFORM}/obj.target/tools/gyp/libv8_libbase.a"
|
||||
)
|
||||
|
||||
import_target(v8_libplatform v8_build
|
||||
"${V8_DIR}/include"
|
||||
"${V8_BIN_DIR}/${V8_PLATFORM}/obj.target/tools/gyp/libv8_libplatform.a"
|
||||
)
|
||||
|
||||
|
||||
import_target(v8_nosnapshot v8_build
|
||||
"${V8_DIR}/include"
|
||||
"${V8_BIN_DIR}/${V8_PLATFORM}/obj.target/tools/gyp/libv8_nosnapshot.a"
|
||||
)
|
||||
|
||||
import_target(v8_snapshot v8_build
|
||||
"${V8_DIR}/include"
|
||||
"${V8_BIN_DIR}/${V8_PLATFORM}/obj.target/tools/gyp/libv8_snapshot.a"
|
||||
)
|
||||
|
||||
## ICU
|
||||
# include include paths
|
||||
add_library(icu_header INTERFACE)
|
||||
target_include_directories(icu_header INTERFACE
|
||||
"${V8_DIR}/third_party/icu/source/common"
|
||||
"${V8_DIR}/third_party/icu/source/io"
|
||||
"${V8_DIR}/third_party/icu/source/i18n"
|
||||
)
|
||||
import_target(icu_uc v8_build
|
||||
"${V8_DIR}/third_party/icu/source/common"
|
||||
"${V8_BIN_DIR}/${V8_PLATFORM}/obj.target/third_party/icu/libicuuc.a"
|
||||
)
|
||||
|
||||
import_target(icu_data v8_build
|
||||
"${V8_DIR}/third_party/icu/source/io"
|
||||
"${V8_BIN_DIR}/${V8_PLATFORM}/obj.target/third_party/icu/libicudata.a"
|
||||
)
|
||||
|
||||
import_target(icu_i18n v8_build
|
||||
"${V8_DIR}/third_party/icu/source/i18n"
|
||||
"${V8_BIN_DIR}/${V8_PLATFORM}/obj.target/third_party/icu/libicui18n.a"
|
||||
)
|
|
@ -1,499 +1,134 @@
|
|||
# Copyright 2012 the V8 project authors. All rights reserved.
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are
|
||||
# met:
|
||||
#
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above
|
||||
# copyright notice, this list of conditions and the following
|
||||
# disclaimer in the documentation and/or other materials provided
|
||||
# with the distribution.
|
||||
# * Neither the name of Google Inc. nor the names of its
|
||||
# contributors may be used to endorse or promote products derived
|
||||
# from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
# CMAKE generated file: DO NOT EDIT!
|
||||
# Generated by "Unix Makefiles" Generator, CMake Version 3.4
|
||||
|
||||
# Default target executed when no arguments are given to make.
|
||||
default_target: all
|
||||
|
||||
.PHONY : default_target
|
||||
|
||||
# Allow only one "make -f Makefile2" at a time, but pass parallelism.
|
||||
.NOTPARALLEL:
|
||||
|
||||
|
||||
# Variable default definitions. Override them by exporting them in your shell.
|
||||
OUTDIR ?= out
|
||||
TESTJOBS ?=
|
||||
GYPFLAGS ?=
|
||||
TESTFLAGS ?=
|
||||
ANDROID_NDK_ROOT ?=
|
||||
ANDROID_NDK_HOST_ARCH ?=
|
||||
ANDROID_TOOLCHAIN ?=
|
||||
ANDROID_V8 ?= /data/local/tmp/v8
|
||||
NACL_SDK_ROOT ?=
|
||||
#=============================================================================
|
||||
# Special targets provided by cmake.
|
||||
|
||||
# Special build flags. Use them like this: "make library=shared"
|
||||
# Disable implicit rules so canonical targets will work.
|
||||
.SUFFIXES:
|
||||
|
||||
# library=shared || component=shared_library
|
||||
ifeq ($(library), shared)
|
||||
GYPFLAGS += -Dcomponent=shared_library
|
||||
endif
|
||||
ifdef component
|
||||
GYPFLAGS += -Dcomponent=$(component)
|
||||
endif
|
||||
# console=readline
|
||||
ifdef console
|
||||
GYPFLAGS += -Dconsole=$(console)
|
||||
endif
|
||||
# disassembler=on
|
||||
ifeq ($(disassembler), on)
|
||||
GYPFLAGS += -Dv8_enable_disassembler=1
|
||||
endif
|
||||
# objectprint=on
|
||||
ifeq ($(objectprint), on)
|
||||
GYPFLAGS += -Dv8_object_print=1
|
||||
endif
|
||||
# verifyheap=on
|
||||
ifeq ($(verifyheap), on)
|
||||
GYPFLAGS += -Dv8_enable_verify_heap=1
|
||||
endif
|
||||
# tracemaps=on
|
||||
ifeq ($(tracemaps), on)
|
||||
GYPFLAGS += -Dv8_trace_maps=1
|
||||
endif
|
||||
# backtrace=off
|
||||
ifeq ($(backtrace), off)
|
||||
GYPFLAGS += -Dv8_enable_backtrace=0
|
||||
else
|
||||
GYPFLAGS += -Dv8_enable_backtrace=1
|
||||
endif
|
||||
# verifypredictable=on
|
||||
ifeq ($(verifypredictable), on)
|
||||
GYPFLAGS += -Dv8_enable_verify_predictable=1
|
||||
endif
|
||||
# snapshot=off
|
||||
ifeq ($(snapshot), off)
|
||||
GYPFLAGS += -Dv8_use_snapshot='false'
|
||||
endif
|
||||
ifeq ($(snapshot), external)
|
||||
GYPFLAGS += -Dv8_use_external_startup_data=1
|
||||
endif
|
||||
# extrachecks=on/off
|
||||
ifeq ($(extrachecks), on)
|
||||
GYPFLAGS += -Ddcheck_always_on=1 -Dv8_enable_handle_zapping=1
|
||||
endif
|
||||
ifeq ($(extrachecks), off)
|
||||
GYPFLAGS += -Ddcheck_always_on=0 -Dv8_enable_handle_zapping=0
|
||||
endif
|
||||
# slowdchecks=on/off
|
||||
ifeq ($(slowdchecks), on)
|
||||
GYPFLAGS += -Dv8_enable_slow_dchecks=1
|
||||
endif
|
||||
ifeq ($(slowdchecks), off)
|
||||
GYPFLAGS += -Dv8_enable_slow_dchecks=0
|
||||
endif
|
||||
# gdbjit=on/off
|
||||
ifeq ($(gdbjit), on)
|
||||
GYPFLAGS += -Dv8_enable_gdbjit=1
|
||||
endif
|
||||
ifeq ($(gdbjit), off)
|
||||
GYPFLAGS += -Dv8_enable_gdbjit=0
|
||||
endif
|
||||
# vtunejit=on
|
||||
ifeq ($(vtunejit), on)
|
||||
GYPFLAGS += -Dv8_enable_vtunejit=1
|
||||
endif
|
||||
# unalignedaccess=on
|
||||
ifeq ($(unalignedaccess), on)
|
||||
GYPFLAGS += -Dv8_can_use_unaligned_accesses=true
|
||||
endif
|
||||
# randomseed=12345, disable random seed via randomseed=0
|
||||
ifdef randomseed
|
||||
GYPFLAGS += -Dv8_random_seed=$(randomseed)
|
||||
endif
|
||||
# soname_version=1.2.3
|
||||
ifdef soname_version
|
||||
GYPFLAGS += -Dsoname_version=$(soname_version)
|
||||
endif
|
||||
# werror=no
|
||||
ifeq ($(werror), no)
|
||||
GYPFLAGS += -Dwerror=''
|
||||
endif
|
||||
# presubmit=no
|
||||
ifeq ($(presubmit), no)
|
||||
TESTFLAGS += --no-presubmit
|
||||
endif
|
||||
# strictaliasing=off (workaround for GCC-4.5)
|
||||
ifeq ($(strictaliasing), off)
|
||||
GYPFLAGS += -Dv8_no_strict_aliasing=1
|
||||
endif
|
||||
# regexp=interpreted
|
||||
ifeq ($(regexp), interpreted)
|
||||
GYPFLAGS += -Dv8_interpreted_regexp=1
|
||||
endif
|
||||
# i18nsupport=off
|
||||
ifeq ($(i18nsupport), off)
|
||||
GYPFLAGS += -Dv8_enable_i18n_support=0
|
||||
TESTFLAGS += --noi18n
|
||||
endif
|
||||
# deprecation_warnings=on
|
||||
ifeq ($(deprecationwarnings), on)
|
||||
GYPFLAGS += -Dv8_deprecation_warnings=1
|
||||
endif
|
||||
# asan=on
|
||||
ifeq ($(asan), on)
|
||||
GYPFLAGS += -Dasan=1 -Dclang=1
|
||||
TESTFLAGS += --asan
|
||||
ifeq ($(lsan), on)
|
||||
GYPFLAGS += -Dlsan=1
|
||||
endif
|
||||
endif
|
||||
ifdef embedscript
|
||||
GYPFLAGS += -Dembed_script=$(embedscript)
|
||||
endif
|
||||
|
||||
# arm specific flags.
|
||||
# arm_version=<number | "default">
|
||||
ifneq ($(strip $(arm_version)),)
|
||||
GYPFLAGS += -Darm_version=$(arm_version)
|
||||
else
|
||||
# Deprecated (use arm_version instead): armv7=false/true
|
||||
ifeq ($(armv7), false)
|
||||
GYPFLAGS += -Darm_version=6
|
||||
else
|
||||
ifeq ($(armv7), true)
|
||||
GYPFLAGS += -Darm_version=7
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
# hardfp=on/off. Deprecated, use armfloatabi
|
||||
ifeq ($(hardfp),on)
|
||||
GYPFLAGS += -Darm_float_abi=hard
|
||||
else
|
||||
ifeq ($(hardfp),off)
|
||||
GYPFLAGS += -Darm_float_abi=softfp
|
||||
endif
|
||||
endif
|
||||
# fpu: armfpu=xxx
|
||||
# xxx: vfp, vfpv3-d16, vfpv3, neon.
|
||||
ifeq ($(armfpu),)
|
||||
GYPFLAGS += -Darm_fpu=default
|
||||
else
|
||||
GYPFLAGS += -Darm_fpu=$(armfpu)
|
||||
endif
|
||||
# float abi: armfloatabi=softfp/hard
|
||||
ifeq ($(armfloatabi),)
|
||||
ifeq ($(hardfp),)
|
||||
GYPFLAGS += -Darm_float_abi=default
|
||||
endif
|
||||
else
|
||||
GYPFLAGS += -Darm_float_abi=$(armfloatabi)
|
||||
endif
|
||||
# armthumb=on/off
|
||||
ifeq ($(armthumb), off)
|
||||
GYPFLAGS += -Darm_thumb=0
|
||||
else
|
||||
ifeq ($(armthumb), on)
|
||||
GYPFLAGS += -Darm_thumb=1
|
||||
endif
|
||||
endif
|
||||
# arm_test_noprobe=on
|
||||
# With this flag set, by default v8 will only use features implied
|
||||
# by the compiler (no probe). This is done by modifying the default
|
||||
# values of enable_armv7, enable_vfp3, enable_32dregs and enable_neon.
|
||||
# Modifying these flags when launching v8 will enable the probing for
|
||||
# the specified values.
|
||||
ifeq ($(arm_test_noprobe), on)
|
||||
GYPFLAGS += -Darm_test_noprobe=on
|
||||
endif
|
||||
# Remove some rules from gmake that .SUFFIXES does not remove.
|
||||
SUFFIXES =
|
||||
|
||||
# ----------------- available targets: --------------------
|
||||
# - "grokdump": rebuilds heap constants lists used by grokdump
|
||||
# - any arch listed in ARCHES (see below)
|
||||
# - any mode listed in MODES
|
||||
# - every combination <arch>.<mode>, e.g. "ia32.release"
|
||||
# - "native": current host's architecture, release mode
|
||||
# - any of the above with .check appended, e.g. "ia32.release.check"
|
||||
# - "android": cross-compile for Android/ARM
|
||||
# - "nacl" : cross-compile for Native Client (ia32 and x64)
|
||||
# - default (no target specified): build all DEFAULT_ARCHES and MODES
|
||||
# - "check": build all targets and run all tests
|
||||
# - "<arch>.clean" for any <arch> in ARCHES
|
||||
# - "clean": clean all ARCHES
|
||||
.SUFFIXES: .hpux_make_needs_suffix_list
|
||||
|
||||
# ----------------- internal stuff ------------------------
|
||||
|
||||
# Architectures and modes to be compiled. Consider these to be internal
|
||||
# variables, don't override them (use the targets instead).
|
||||
ARCHES = ia32 x64 x32 arm arm64 mips mipsel mips64el x87 ppc ppc64
|
||||
DEFAULT_ARCHES = ia32 x64 arm
|
||||
MODES = release debug optdebug
|
||||
DEFAULT_MODES = release debug
|
||||
ANDROID_ARCHES = android_ia32 android_x64 android_arm android_arm64 \
|
||||
android_mipsel android_x87
|
||||
NACL_ARCHES = nacl_ia32 nacl_x64
|
||||
# Suppress display of executed commands.
|
||||
$(VERBOSE).SILENT:
|
||||
|
||||
# List of files that trigger Makefile regeneration:
|
||||
GYPFILES = third_party/icu/icu.gypi third_party/icu/icu.gyp \
|
||||
build/shim_headers.gypi build/features.gypi build/standalone.gypi \
|
||||
build/toolchain.gypi build/all.gyp build/mac/asan.gyp \
|
||||
build/android.gypi test/cctest/cctest.gyp \
|
||||
test/unittests/unittests.gyp tools/gyp/v8.gyp \
|
||||
tools/parser-shell.gyp testing/gmock.gyp testing/gtest.gyp \
|
||||
samples/samples.gyp \
|
||||
src/third_party/vtune/v8vtune.gyp src/d8.gyp
|
||||
|
||||
# If vtunejit=on, the v8vtune.gyp will be appended.
|
||||
ifeq ($(vtunejit), on)
|
||||
GYPFILES += src/third_party/vtune/v8vtune.gyp
|
||||
endif
|
||||
# Generates all combinations of ARCHES and MODES, e.g. "ia32.release".
|
||||
BUILDS = $(foreach mode,$(MODES),$(addsuffix .$(mode),$(ARCHES)))
|
||||
ANDROID_BUILDS = $(foreach mode,$(MODES), \
|
||||
$(addsuffix .$(mode),$(ANDROID_ARCHES)))
|
||||
NACL_BUILDS = $(foreach mode,$(MODES), \
|
||||
$(addsuffix .$(mode),$(NACL_ARCHES)))
|
||||
# Generates corresponding test targets, e.g. "ia32.release.check".
|
||||
CHECKS = $(addsuffix .check,$(BUILDS))
|
||||
QUICKCHECKS = $(addsuffix .quickcheck,$(BUILDS))
|
||||
ANDROID_CHECKS = $(addsuffix .check,$(ANDROID_BUILDS))
|
||||
NACL_CHECKS = $(addsuffix .check,$(NACL_BUILDS))
|
||||
# File where previously used GYPFLAGS are stored.
|
||||
ENVFILE = $(OUTDIR)/environment
|
||||
# A target that is always out of date.
|
||||
cmake_force:
|
||||
|
||||
.PHONY: all check clean builddeps dependencies $(ENVFILE).new native \
|
||||
qc quickcheck $(QUICKCHECKS) turbocheck \
|
||||
$(addsuffix .quickcheck,$(MODES)) $(addsuffix .quickcheck,$(ARCHES)) \
|
||||
$(ARCHES) $(MODES) $(BUILDS) $(CHECKS) $(addsuffix .clean,$(ARCHES)) \
|
||||
$(addsuffix .check,$(MODES)) $(addsuffix .check,$(ARCHES)) \
|
||||
$(ANDROID_ARCHES) $(ANDROID_BUILDS) $(ANDROID_CHECKS) \
|
||||
must-set-ANDROID_NDK_ROOT_OR_TOOLCHAIN \
|
||||
$(NACL_ARCHES) $(NACL_BUILDS) $(NACL_CHECKS) \
|
||||
must-set-NACL_SDK_ROOT
|
||||
.PHONY : cmake_force
|
||||
|
||||
# Target definitions. "all" is the default.
|
||||
all: $(DEFAULT_MODES)
|
||||
#=============================================================================
|
||||
# Set environment variables for the build.
|
||||
|
||||
# Special target for the buildbots to use. Depends on $(OUTDIR)/Makefile
|
||||
# having been created before.
|
||||
buildbot:
|
||||
$(MAKE) -C "$(OUTDIR)" BUILDTYPE=$(BUILDTYPE) \
|
||||
builddir="$(abspath $(OUTDIR))/$(BUILDTYPE)"
|
||||
# The shell in which to execute make rules.
|
||||
SHELL = /bin/sh
|
||||
|
||||
# Compile targets. MODES and ARCHES are convenience targets.
|
||||
.SECONDEXPANSION:
|
||||
$(MODES): $(addsuffix .$$@,$(DEFAULT_ARCHES))
|
||||
# The CMake executable.
|
||||
CMAKE_COMMAND = /Applications/CMake.app/Contents/bin/cmake
|
||||
|
||||
$(ARCHES): $(addprefix $$@.,$(DEFAULT_MODES))
|
||||
# The command to remove a file.
|
||||
RM = /Applications/CMake.app/Contents/bin/cmake -E remove -f
|
||||
|
||||
# Defines how to build a particular target (e.g. ia32.release).
|
||||
$(BUILDS): $(OUTDIR)/Makefile.$$@
|
||||
@$(MAKE) -C "$(OUTDIR)" -f Makefile.$@ \
|
||||
BUILDTYPE=$(shell echo $(subst .,,$(suffix $@)) | \
|
||||
python -c "print \
|
||||
raw_input().replace('opt', '').capitalize()") \
|
||||
builddir="$(shell pwd)/$(OUTDIR)/$@"
|
||||
# Escaping for special characters.
|
||||
EQUALS = =
|
||||
|
||||
native: $(OUTDIR)/Makefile.native
|
||||
@$(MAKE) -C "$(OUTDIR)" -f Makefile.native \
|
||||
BUILDTYPE=Release \
|
||||
builddir="$(shell pwd)/$(OUTDIR)/$@"
|
||||
# The top-level source directory on which CMake was run.
|
||||
CMAKE_SOURCE_DIR = /Users/kvahed/git/arangodb/3rdParty/V8-4.3.61
|
||||
|
||||
$(ANDROID_ARCHES): $(addprefix $$@.,$(MODES))
|
||||
# The top-level build directory on which CMake was run.
|
||||
CMAKE_BINARY_DIR = /Users/kvahed/git/arangodb/3rdParty/V8-4.3.61
|
||||
|
||||
$(ANDROID_BUILDS): $(GYPFILES) $(ENVFILE) build/android.gypi \
|
||||
must-set-ANDROID_NDK_ROOT_OR_TOOLCHAIN Makefile.android
|
||||
@$(MAKE) -f Makefile.android $@ \
|
||||
ARCH="$(basename $@)" \
|
||||
MODE="$(subst .,,$(suffix $@))" \
|
||||
OUTDIR="$(OUTDIR)" \
|
||||
GYPFLAGS="$(GYPFLAGS)"
|
||||
#=============================================================================
|
||||
# Targets provided globally by CMake.
|
||||
|
||||
$(NACL_ARCHES): $(addprefix $$@.,$(MODES))
|
||||
# Special rule for the target edit_cache
|
||||
edit_cache:
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake cache editor..."
|
||||
/Applications/CMake.app/Contents/bin/ccmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
|
||||
.PHONY : edit_cache
|
||||
|
||||
$(NACL_BUILDS): $(GYPFILES) $(ENVFILE) \
|
||||
Makefile.nacl must-set-NACL_SDK_ROOT
|
||||
@$(MAKE) -f Makefile.nacl $@ \
|
||||
ARCH="$(basename $@)" \
|
||||
MODE="$(subst .,,$(suffix $@))" \
|
||||
OUTDIR="$(OUTDIR)" \
|
||||
GYPFLAGS="$(GYPFLAGS)"
|
||||
# Special rule for the target edit_cache
|
||||
edit_cache/fast: edit_cache
|
||||
|
||||
# Test targets.
|
||||
check: all
|
||||
@tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
|
||||
--arch=$(shell echo $(DEFAULT_ARCHES) | sed -e 's/ /,/g') \
|
||||
$(TESTFLAGS)
|
||||
.PHONY : edit_cache/fast
|
||||
|
||||
$(addsuffix .check,$(MODES)): $$(basename $$@)
|
||||
@tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
|
||||
--mode=$(basename $@) $(TESTFLAGS)
|
||||
# Special rule for the target rebuild_cache
|
||||
rebuild_cache:
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
|
||||
/Applications/CMake.app/Contents/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
|
||||
.PHONY : rebuild_cache
|
||||
|
||||
$(addsuffix .check,$(ARCHES)): $$(basename $$@)
|
||||
@tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
|
||||
--arch=$(basename $@) $(TESTFLAGS)
|
||||
# Special rule for the target rebuild_cache
|
||||
rebuild_cache/fast: rebuild_cache
|
||||
|
||||
$(CHECKS): $$(basename $$@)
|
||||
@tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
|
||||
--arch-and-mode=$(basename $@) $(TESTFLAGS)
|
||||
.PHONY : rebuild_cache/fast
|
||||
|
||||
$(addsuffix .quickcheck,$(MODES)): $$(basename $$@)
|
||||
@tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
|
||||
--mode=$(basename $@) $(TESTFLAGS) --quickcheck
|
||||
# The main all target
|
||||
all: cmake_check_build_system
|
||||
$(CMAKE_COMMAND) -E cmake_progress_start /Users/kvahed/git/arangodb/3rdParty/V8-4.3.61/CMakeFiles /Users/kvahed/git/arangodb/3rdParty/V8-4.3.61/CMakeFiles/progress.marks
|
||||
$(MAKE) -f CMakeFiles/Makefile2 all
|
||||
$(CMAKE_COMMAND) -E cmake_progress_start /Users/kvahed/git/arangodb/3rdParty/V8-4.3.61/CMakeFiles 0
|
||||
.PHONY : all
|
||||
|
||||
$(addsuffix .quickcheck,$(ARCHES)): $$(basename $$@)
|
||||
@tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
|
||||
--arch=$(basename $@) $(TESTFLAGS) --quickcheck
|
||||
# The main clean target
|
||||
clean:
|
||||
$(MAKE) -f CMakeFiles/Makefile2 clean
|
||||
.PHONY : clean
|
||||
|
||||
$(QUICKCHECKS): $$(basename $$@)
|
||||
@tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
|
||||
--arch-and-mode=$(basename $@) $(TESTFLAGS) --quickcheck
|
||||
# The main clean target
|
||||
clean/fast: clean
|
||||
|
||||
$(addsuffix .sync, $(ANDROID_BUILDS)): $$(basename $$@)
|
||||
@tools/android-sync.sh $(basename $@) $(OUTDIR) \
|
||||
$(shell pwd) $(ANDROID_V8)
|
||||
.PHONY : clean/fast
|
||||
|
||||
$(addsuffix .check, $(ANDROID_BUILDS)): $$(basename $$@).sync
|
||||
@tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
|
||||
--arch-and-mode=$(basename $@) \
|
||||
--timeout=600 \
|
||||
--command-prefix="tools/android-run.py" $(TESTFLAGS)
|
||||
# Prepare targets for installation.
|
||||
preinstall: all
|
||||
$(MAKE) -f CMakeFiles/Makefile2 preinstall
|
||||
.PHONY : preinstall
|
||||
|
||||
$(addsuffix .check, $(ANDROID_ARCHES)): \
|
||||
$(addprefix $$(basename $$@).,$(MODES)).check
|
||||
# Prepare targets for installation.
|
||||
preinstall/fast:
|
||||
$(MAKE) -f CMakeFiles/Makefile2 preinstall
|
||||
.PHONY : preinstall/fast
|
||||
|
||||
$(addsuffix .check, $(NACL_BUILDS)): $$(basename $$@)
|
||||
@tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
|
||||
--arch-and-mode=$(basename $@) \
|
||||
--timeout=600 --nopresubmit --noi18n \
|
||||
--command-prefix="tools/nacl-run.py"
|
||||
# clear depends
|
||||
depend:
|
||||
$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
|
||||
.PHONY : depend
|
||||
|
||||
$(addsuffix .check, $(NACL_ARCHES)): \
|
||||
$(addprefix $$(basename $$@).,$(MODES)).check
|
||||
# Help Target
|
||||
help:
|
||||
@echo "The following are some of the valid targets for this Makefile:"
|
||||
@echo "... all (the default if no target is provided)"
|
||||
@echo "... clean"
|
||||
@echo "... depend"
|
||||
@echo "... edit_cache"
|
||||
@echo "... rebuild_cache"
|
||||
.PHONY : help
|
||||
|
||||
native.check: native
|
||||
@tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR)/native \
|
||||
--arch-and-mode=. $(TESTFLAGS)
|
||||
|
||||
SUPERFASTTESTMODES = ia32.release
|
||||
FASTTESTMODES = $(SUPERFASTTESTMODES),x64.release,ia32.optdebug,x64.optdebug,arm.optdebug,arm64.release
|
||||
FASTCOMPILEMODES = $(FASTTESTMODES),arm64.optdebug
|
||||
|
||||
COMMA = ,
|
||||
EMPTY =
|
||||
SPACE = $(EMPTY) $(EMPTY)
|
||||
quickcheck: $(subst $(COMMA),$(SPACE),$(FASTCOMPILEMODES))
|
||||
tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
|
||||
--arch-and-mode=$(SUPERFASTTESTMODES) $(TESTFLAGS) --quickcheck \
|
||||
--download-data mozilla webkit
|
||||
tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
|
||||
--arch-and-mode=$(FASTTESTMODES) $(TESTFLAGS) --quickcheck
|
||||
qc: quickcheck
|
||||
#=============================================================================
|
||||
# Special targets to cleanup operation of make.
|
||||
|
||||
turbocheck: $(subst $(COMMA),$(SPACE),$(FASTCOMPILEMODES))
|
||||
tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
|
||||
--arch-and-mode=$(SUPERFASTTESTMODES) $(TESTFLAGS) \
|
||||
--quickcheck --variants=turbofan --download-data mozilla webkit
|
||||
tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
|
||||
--arch-and-mode=$(FASTTESTMODES) $(TESTFLAGS) \
|
||||
--quickcheck --variants=turbofan
|
||||
tc: turbocheck
|
||||
# Special rule to run CMake to check the build system integrity.
|
||||
# No rule that depends on this can have commands that come from listfiles
|
||||
# because they might be regenerated.
|
||||
cmake_check_build_system:
|
||||
$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
|
||||
.PHONY : cmake_check_build_system
|
||||
|
||||
# Clean targets. You can clean each architecture individually, or everything.
|
||||
$(addsuffix .clean, $(ARCHES) $(ANDROID_ARCHES) $(NACL_ARCHES)):
|
||||
rm -f $(OUTDIR)/Makefile.$(basename $@)*
|
||||
rm -rf $(OUTDIR)/$(basename $@).release
|
||||
rm -rf $(OUTDIR)/$(basename $@).debug
|
||||
rm -rf $(OUTDIR)/$(basename $@).optdebug
|
||||
find $(OUTDIR) -regex '.*\(host\|target\)\.$(basename $@).*\.mk' -delete
|
||||
|
||||
native.clean:
|
||||
rm -f $(OUTDIR)/Makefile.native
|
||||
rm -rf $(OUTDIR)/native
|
||||
find $(OUTDIR) -regex '.*\(host\|target\)\.native\.mk' -delete
|
||||
|
||||
clean: $(addsuffix .clean, $(ARCHES) $(ANDROID_ARCHES) $(NACL_ARCHES)) native.clean gtags.clean
|
||||
|
||||
# GYP file generation targets.
|
||||
OUT_MAKEFILES = $(addprefix $(OUTDIR)/Makefile.,$(BUILDS))
|
||||
$(OUT_MAKEFILES): $(GYPFILES) $(ENVFILE)
|
||||
$(eval CXX_TARGET_ARCH:=$(shell $(CXX) -v 2>&1 | grep ^Target: | \
|
||||
cut -f 2 -d " " | cut -f 1 -d "-" ))
|
||||
$(eval CXX_TARGET_ARCH:=$(subst aarch64,arm64,$(CXX_TARGET_ARCH)))
|
||||
$(eval CXX_TARGET_ARCH:=$(subst x86_64,x64,$(CXX_TARGET_ARCH)))
|
||||
$(eval V8_TARGET_ARCH:=$(subst .,,$(suffix $(basename $@))))
|
||||
PYTHONPATH="$(shell pwd)/tools/generate_shim_headers:$(shell pwd)/build:$(PYTHONPATH):$(shell pwd)/build/gyp/pylib:$(PYTHONPATH)" \
|
||||
GYP_GENERATORS=make \
|
||||
build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \
|
||||
-Ibuild/standalone.gypi --depth=. \
|
||||
-Dv8_target_arch=$(V8_TARGET_ARCH) \
|
||||
$(if $(findstring $(CXX_TARGET_ARCH),$(V8_TARGET_ARCH)), \
|
||||
-Dtarget_arch=$(V8_TARGET_ARCH),) \
|
||||
$(if $(findstring optdebug,$@),-Dv8_optimized_debug=1,) \
|
||||
-S$(suffix $(basename $@))$(suffix $@) $(GYPFLAGS)
|
||||
|
||||
$(OUTDIR)/Makefile.native: $(GYPFILES) $(ENVFILE)
|
||||
PYTHONPATH="$(shell pwd)/tools/generate_shim_headers:$(shell pwd)/build:$(PYTHONPATH):$(shell pwd)/build/gyp/pylib:$(PYTHONPATH)" \
|
||||
GYP_GENERATORS=make \
|
||||
build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \
|
||||
-Ibuild/standalone.gypi --depth=. -S.native $(GYPFLAGS)
|
||||
|
||||
must-set-ANDROID_NDK_ROOT_OR_TOOLCHAIN:
|
||||
ifndef ANDROID_NDK_ROOT
|
||||
ifndef ANDROID_TOOLCHAIN
|
||||
$(error ANDROID_NDK_ROOT or ANDROID_TOOLCHAIN must be set))
|
||||
endif
|
||||
endif
|
||||
|
||||
# Note that NACL_SDK_ROOT must be set to point to an appropriate
|
||||
# Native Client SDK before using this makefile. You can download
|
||||
# an SDK here:
|
||||
# https://developers.google.com/native-client/sdk/download
|
||||
# The path indicated by NACL_SDK_ROOT will typically end with
|
||||
# a folder for a pepper version such as "pepper_25" that should
|
||||
# have "tools" and "toolchain" subdirectories.
|
||||
must-set-NACL_SDK_ROOT:
|
||||
ifndef NACL_SDK_ROOT
|
||||
$(error NACL_SDK_ROOT must be set)
|
||||
endif
|
||||
|
||||
# Replaces the old with the new environment file if they're different, which
|
||||
# will trigger GYP to regenerate Makefiles.
|
||||
$(ENVFILE): $(ENVFILE).new
|
||||
@if test -r $(ENVFILE) && cmp $(ENVFILE).new $(ENVFILE) > /dev/null; \
|
||||
then rm $(ENVFILE).new; \
|
||||
else mv $(ENVFILE).new $(ENVFILE); fi
|
||||
|
||||
# Stores current GYPFLAGS in a file.
|
||||
$(ENVFILE).new:
|
||||
$(eval CXX_TARGET_ARCH:=$(shell $(CXX) -v 2>&1 | grep ^Target: | \
|
||||
cut -f 2 -d " " | cut -f 1 -d "-" ))
|
||||
$(eval CXX_TARGET_ARCH:=$(subst aarch64,arm64,$(CXX_TARGET_ARCH)))
|
||||
$(eval CXX_TARGET_ARCH:=$(subst x86_64,x64,$(CXX_TARGET_ARCH)))
|
||||
@mkdir -p $(OUTDIR); echo "GYPFLAGS=$(GYPFLAGS) -Dtarget_arch=$(CXX_TARGET_ARCH)" > $(ENVFILE).new;
|
||||
|
||||
# Heap constants for grokdump.
|
||||
DUMP_FILE = tools/v8heapconst.py
|
||||
grokdump: ia32.release
|
||||
@cat $(DUMP_FILE).tmpl > $(DUMP_FILE)
|
||||
@$(OUTDIR)/ia32.release/d8 --dump-heap-constants >> $(DUMP_FILE)
|
||||
|
||||
# Support for the GNU GLOBAL Source Code Tag System.
|
||||
gtags.files: $(GYPFILES) $(ENVFILE)
|
||||
@find include src test -name '*.h' -o -name '*.cc' -o -name '*.c' > $@
|
||||
|
||||
# We need to manually set the stack limit here, to work around bugs in
|
||||
# gmake-3.81 and global-5.7.1 on recent 64-bit Linux systems.
|
||||
GPATH GRTAGS GSYMS GTAGS: gtags.files $(shell cat gtags.files 2> /dev/null)
|
||||
@bash -c 'ulimit -s 10240 && GTAGSFORCECPP=yes gtags -i -q -f $<'
|
||||
|
||||
gtags.clean:
|
||||
rm -f gtags.files GPATH GRTAGS GSYMS GTAGS
|
||||
|
||||
dependencies builddeps:
|
||||
$(error Use 'gclient sync' instead)
|
||||
|
|
|
@ -0,0 +1,499 @@
|
|||
# Copyright 2012 the V8 project authors. All rights reserved.
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are
|
||||
# met:
|
||||
#
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above
|
||||
# copyright notice, this list of conditions and the following
|
||||
# disclaimer in the documentation and/or other materials provided
|
||||
# with the distribution.
|
||||
# * Neither the name of Google Inc. nor the names of its
|
||||
# contributors may be used to endorse or promote products derived
|
||||
# from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
# Variable default definitions. Override them by exporting them in your shell.
|
||||
OUTDIR ?= out
|
||||
TESTJOBS ?=
|
||||
GYPFLAGS ?=
|
||||
TESTFLAGS ?=
|
||||
ANDROID_NDK_ROOT ?=
|
||||
ANDROID_NDK_HOST_ARCH ?=
|
||||
ANDROID_TOOLCHAIN ?=
|
||||
ANDROID_V8 ?= /data/local/tmp/v8
|
||||
NACL_SDK_ROOT ?=
|
||||
|
||||
# Special build flags. Use them like this: "make library=shared"
|
||||
|
||||
# library=shared || component=shared_library
|
||||
ifeq ($(library), shared)
|
||||
GYPFLAGS += -Dcomponent=shared_library
|
||||
endif
|
||||
ifdef component
|
||||
GYPFLAGS += -Dcomponent=$(component)
|
||||
endif
|
||||
# console=readline
|
||||
ifdef console
|
||||
GYPFLAGS += -Dconsole=$(console)
|
||||
endif
|
||||
# disassembler=on
|
||||
ifeq ($(disassembler), on)
|
||||
GYPFLAGS += -Dv8_enable_disassembler=1
|
||||
endif
|
||||
# objectprint=on
|
||||
ifeq ($(objectprint), on)
|
||||
GYPFLAGS += -Dv8_object_print=1
|
||||
endif
|
||||
# verifyheap=on
|
||||
ifeq ($(verifyheap), on)
|
||||
GYPFLAGS += -Dv8_enable_verify_heap=1
|
||||
endif
|
||||
# tracemaps=on
|
||||
ifeq ($(tracemaps), on)
|
||||
GYPFLAGS += -Dv8_trace_maps=1
|
||||
endif
|
||||
# backtrace=off
|
||||
ifeq ($(backtrace), off)
|
||||
GYPFLAGS += -Dv8_enable_backtrace=0
|
||||
else
|
||||
GYPFLAGS += -Dv8_enable_backtrace=1
|
||||
endif
|
||||
# verifypredictable=on
|
||||
ifeq ($(verifypredictable), on)
|
||||
GYPFLAGS += -Dv8_enable_verify_predictable=1
|
||||
endif
|
||||
# snapshot=off
|
||||
ifeq ($(snapshot), off)
|
||||
GYPFLAGS += -Dv8_use_snapshot='false'
|
||||
endif
|
||||
ifeq ($(snapshot), external)
|
||||
GYPFLAGS += -Dv8_use_external_startup_data=1
|
||||
endif
|
||||
# extrachecks=on/off
|
||||
ifeq ($(extrachecks), on)
|
||||
GYPFLAGS += -Ddcheck_always_on=1 -Dv8_enable_handle_zapping=1
|
||||
endif
|
||||
ifeq ($(extrachecks), off)
|
||||
GYPFLAGS += -Ddcheck_always_on=0 -Dv8_enable_handle_zapping=0
|
||||
endif
|
||||
# slowdchecks=on/off
|
||||
ifeq ($(slowdchecks), on)
|
||||
GYPFLAGS += -Dv8_enable_slow_dchecks=1
|
||||
endif
|
||||
ifeq ($(slowdchecks), off)
|
||||
GYPFLAGS += -Dv8_enable_slow_dchecks=0
|
||||
endif
|
||||
# gdbjit=on/off
|
||||
ifeq ($(gdbjit), on)
|
||||
GYPFLAGS += -Dv8_enable_gdbjit=1
|
||||
endif
|
||||
ifeq ($(gdbjit), off)
|
||||
GYPFLAGS += -Dv8_enable_gdbjit=0
|
||||
endif
|
||||
# vtunejit=on
|
||||
ifeq ($(vtunejit), on)
|
||||
GYPFLAGS += -Dv8_enable_vtunejit=1
|
||||
endif
|
||||
# unalignedaccess=on
|
||||
ifeq ($(unalignedaccess), on)
|
||||
GYPFLAGS += -Dv8_can_use_unaligned_accesses=true
|
||||
endif
|
||||
# randomseed=12345, disable random seed via randomseed=0
|
||||
ifdef randomseed
|
||||
GYPFLAGS += -Dv8_random_seed=$(randomseed)
|
||||
endif
|
||||
# soname_version=1.2.3
|
||||
ifdef soname_version
|
||||
GYPFLAGS += -Dsoname_version=$(soname_version)
|
||||
endif
|
||||
# werror=no
|
||||
ifeq ($(werror), no)
|
||||
GYPFLAGS += -Dwerror=''
|
||||
endif
|
||||
# presubmit=no
|
||||
ifeq ($(presubmit), no)
|
||||
TESTFLAGS += --no-presubmit
|
||||
endif
|
||||
# strictaliasing=off (workaround for GCC-4.5)
|
||||
ifeq ($(strictaliasing), off)
|
||||
GYPFLAGS += -Dv8_no_strict_aliasing=1
|
||||
endif
|
||||
# regexp=interpreted
|
||||
ifeq ($(regexp), interpreted)
|
||||
GYPFLAGS += -Dv8_interpreted_regexp=1
|
||||
endif
|
||||
# i18nsupport=off
|
||||
ifeq ($(i18nsupport), off)
|
||||
GYPFLAGS += -Dv8_enable_i18n_support=0
|
||||
TESTFLAGS += --noi18n
|
||||
endif
|
||||
# deprecation_warnings=on
|
||||
ifeq ($(deprecationwarnings), on)
|
||||
GYPFLAGS += -Dv8_deprecation_warnings=1
|
||||
endif
|
||||
# asan=on
|
||||
ifeq ($(asan), on)
|
||||
GYPFLAGS += -Dasan=1 -Dclang=1
|
||||
TESTFLAGS += --asan
|
||||
ifeq ($(lsan), on)
|
||||
GYPFLAGS += -Dlsan=1
|
||||
endif
|
||||
endif
|
||||
ifdef embedscript
|
||||
GYPFLAGS += -Dembed_script=$(embedscript)
|
||||
endif
|
||||
|
||||
# arm specific flags.
|
||||
# arm_version=<number | "default">
|
||||
ifneq ($(strip $(arm_version)),)
|
||||
GYPFLAGS += -Darm_version=$(arm_version)
|
||||
else
|
||||
# Deprecated (use arm_version instead): armv7=false/true
|
||||
ifeq ($(armv7), false)
|
||||
GYPFLAGS += -Darm_version=6
|
||||
else
|
||||
ifeq ($(armv7), true)
|
||||
GYPFLAGS += -Darm_version=7
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
# hardfp=on/off. Deprecated, use armfloatabi
|
||||
ifeq ($(hardfp),on)
|
||||
GYPFLAGS += -Darm_float_abi=hard
|
||||
else
|
||||
ifeq ($(hardfp),off)
|
||||
GYPFLAGS += -Darm_float_abi=softfp
|
||||
endif
|
||||
endif
|
||||
# fpu: armfpu=xxx
|
||||
# xxx: vfp, vfpv3-d16, vfpv3, neon.
|
||||
ifeq ($(armfpu),)
|
||||
GYPFLAGS += -Darm_fpu=default
|
||||
else
|
||||
GYPFLAGS += -Darm_fpu=$(armfpu)
|
||||
endif
|
||||
# float abi: armfloatabi=softfp/hard
|
||||
ifeq ($(armfloatabi),)
|
||||
ifeq ($(hardfp),)
|
||||
GYPFLAGS += -Darm_float_abi=default
|
||||
endif
|
||||
else
|
||||
GYPFLAGS += -Darm_float_abi=$(armfloatabi)
|
||||
endif
|
||||
# armthumb=on/off
|
||||
ifeq ($(armthumb), off)
|
||||
GYPFLAGS += -Darm_thumb=0
|
||||
else
|
||||
ifeq ($(armthumb), on)
|
||||
GYPFLAGS += -Darm_thumb=1
|
||||
endif
|
||||
endif
|
||||
# arm_test_noprobe=on
|
||||
# With this flag set, by default v8 will only use features implied
|
||||
# by the compiler (no probe). This is done by modifying the default
|
||||
# values of enable_armv7, enable_vfp3, enable_32dregs and enable_neon.
|
||||
# Modifying these flags when launching v8 will enable the probing for
|
||||
# the specified values.
|
||||
ifeq ($(arm_test_noprobe), on)
|
||||
GYPFLAGS += -Darm_test_noprobe=on
|
||||
endif
|
||||
|
||||
# ----------------- available targets: --------------------
|
||||
# - "grokdump": rebuilds heap constants lists used by grokdump
|
||||
# - any arch listed in ARCHES (see below)
|
||||
# - any mode listed in MODES
|
||||
# - every combination <arch>.<mode>, e.g. "ia32.release"
|
||||
# - "native": current host's architecture, release mode
|
||||
# - any of the above with .check appended, e.g. "ia32.release.check"
|
||||
# - "android": cross-compile for Android/ARM
|
||||
# - "nacl" : cross-compile for Native Client (ia32 and x64)
|
||||
# - default (no target specified): build all DEFAULT_ARCHES and MODES
|
||||
# - "check": build all targets and run all tests
|
||||
# - "<arch>.clean" for any <arch> in ARCHES
|
||||
# - "clean": clean all ARCHES
|
||||
|
||||
# ----------------- internal stuff ------------------------
|
||||
|
||||
# Architectures and modes to be compiled. Consider these to be internal
|
||||
# variables, don't override them (use the targets instead).
|
||||
ARCHES = ia32 x64 x32 arm arm64 mips mipsel mips64el x87 ppc ppc64
|
||||
DEFAULT_ARCHES = ia32 x64 arm
|
||||
MODES = release debug optdebug
|
||||
DEFAULT_MODES = release debug
|
||||
ANDROID_ARCHES = android_ia32 android_x64 android_arm android_arm64 \
|
||||
android_mipsel android_x87
|
||||
NACL_ARCHES = nacl_ia32 nacl_x64
|
||||
|
||||
# List of files that trigger Makefile regeneration:
|
||||
GYPFILES = third_party/icu/icu.gypi third_party/icu/icu.gyp \
|
||||
build/shim_headers.gypi build/features.gypi build/standalone.gypi \
|
||||
build/toolchain.gypi build/all.gyp build/mac/asan.gyp \
|
||||
build/android.gypi test/cctest/cctest.gyp \
|
||||
test/unittests/unittests.gyp tools/gyp/v8.gyp \
|
||||
tools/parser-shell.gyp testing/gmock.gyp testing/gtest.gyp \
|
||||
samples/samples.gyp \
|
||||
src/third_party/vtune/v8vtune.gyp src/d8.gyp
|
||||
|
||||
# If vtunejit=on, the v8vtune.gyp will be appended.
|
||||
ifeq ($(vtunejit), on)
|
||||
GYPFILES += src/third_party/vtune/v8vtune.gyp
|
||||
endif
|
||||
# Generates all combinations of ARCHES and MODES, e.g. "ia32.release".
|
||||
BUILDS = $(foreach mode,$(MODES),$(addsuffix .$(mode),$(ARCHES)))
|
||||
ANDROID_BUILDS = $(foreach mode,$(MODES), \
|
||||
$(addsuffix .$(mode),$(ANDROID_ARCHES)))
|
||||
NACL_BUILDS = $(foreach mode,$(MODES), \
|
||||
$(addsuffix .$(mode),$(NACL_ARCHES)))
|
||||
# Generates corresponding test targets, e.g. "ia32.release.check".
|
||||
CHECKS = $(addsuffix .check,$(BUILDS))
|
||||
QUICKCHECKS = $(addsuffix .quickcheck,$(BUILDS))
|
||||
ANDROID_CHECKS = $(addsuffix .check,$(ANDROID_BUILDS))
|
||||
NACL_CHECKS = $(addsuffix .check,$(NACL_BUILDS))
|
||||
# File where previously used GYPFLAGS are stored.
|
||||
ENVFILE = $(OUTDIR)/environment
|
||||
|
||||
.PHONY: all check clean builddeps dependencies $(ENVFILE).new native \
|
||||
qc quickcheck $(QUICKCHECKS) turbocheck \
|
||||
$(addsuffix .quickcheck,$(MODES)) $(addsuffix .quickcheck,$(ARCHES)) \
|
||||
$(ARCHES) $(MODES) $(BUILDS) $(CHECKS) $(addsuffix .clean,$(ARCHES)) \
|
||||
$(addsuffix .check,$(MODES)) $(addsuffix .check,$(ARCHES)) \
|
||||
$(ANDROID_ARCHES) $(ANDROID_BUILDS) $(ANDROID_CHECKS) \
|
||||
must-set-ANDROID_NDK_ROOT_OR_TOOLCHAIN \
|
||||
$(NACL_ARCHES) $(NACL_BUILDS) $(NACL_CHECKS) \
|
||||
must-set-NACL_SDK_ROOT
|
||||
|
||||
# Target definitions. "all" is the default.
|
||||
all: $(DEFAULT_MODES)
|
||||
|
||||
# Special target for the buildbots to use. Depends on $(OUTDIR)/Makefile
|
||||
# having been created before.
|
||||
buildbot:
|
||||
$(MAKE) -C "$(OUTDIR)" BUILDTYPE=$(BUILDTYPE) \
|
||||
builddir="$(abspath $(OUTDIR))/$(BUILDTYPE)"
|
||||
|
||||
# Compile targets. MODES and ARCHES are convenience targets.
|
||||
.SECONDEXPANSION:
|
||||
$(MODES): $(addsuffix .$$@,$(DEFAULT_ARCHES))
|
||||
|
||||
$(ARCHES): $(addprefix $$@.,$(DEFAULT_MODES))
|
||||
|
||||
# Defines how to build a particular target (e.g. ia32.release).
|
||||
$(BUILDS): $(OUTDIR)/Makefile.$$@
|
||||
@$(MAKE) -C "$(OUTDIR)" -f Makefile.$@ \
|
||||
BUILDTYPE=$(shell echo $(subst .,,$(suffix $@)) | \
|
||||
python -c "print \
|
||||
raw_input().replace('opt', '').capitalize()") \
|
||||
builddir="$(shell pwd)/$(OUTDIR)/$@"
|
||||
|
||||
native: $(OUTDIR)/Makefile.native
|
||||
@$(MAKE) -C "$(OUTDIR)" -f Makefile.native \
|
||||
BUILDTYPE=Release \
|
||||
builddir="$(shell pwd)/$(OUTDIR)/$@"
|
||||
|
||||
$(ANDROID_ARCHES): $(addprefix $$@.,$(MODES))
|
||||
|
||||
$(ANDROID_BUILDS): $(GYPFILES) $(ENVFILE) build/android.gypi \
|
||||
must-set-ANDROID_NDK_ROOT_OR_TOOLCHAIN Makefile.android
|
||||
@$(MAKE) -f Makefile.android $@ \
|
||||
ARCH="$(basename $@)" \
|
||||
MODE="$(subst .,,$(suffix $@))" \
|
||||
OUTDIR="$(OUTDIR)" \
|
||||
GYPFLAGS="$(GYPFLAGS)"
|
||||
|
||||
$(NACL_ARCHES): $(addprefix $$@.,$(MODES))
|
||||
|
||||
$(NACL_BUILDS): $(GYPFILES) $(ENVFILE) \
|
||||
Makefile.nacl must-set-NACL_SDK_ROOT
|
||||
@$(MAKE) -f Makefile.nacl $@ \
|
||||
ARCH="$(basename $@)" \
|
||||
MODE="$(subst .,,$(suffix $@))" \
|
||||
OUTDIR="$(OUTDIR)" \
|
||||
GYPFLAGS="$(GYPFLAGS)"
|
||||
|
||||
# Test targets.
|
||||
check: all
|
||||
@tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
|
||||
--arch=$(shell echo $(DEFAULT_ARCHES) | sed -e 's/ /,/g') \
|
||||
$(TESTFLAGS)
|
||||
|
||||
$(addsuffix .check,$(MODES)): $$(basename $$@)
|
||||
@tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
|
||||
--mode=$(basename $@) $(TESTFLAGS)
|
||||
|
||||
$(addsuffix .check,$(ARCHES)): $$(basename $$@)
|
||||
@tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
|
||||
--arch=$(basename $@) $(TESTFLAGS)
|
||||
|
||||
$(CHECKS): $$(basename $$@)
|
||||
@tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
|
||||
--arch-and-mode=$(basename $@) $(TESTFLAGS)
|
||||
|
||||
$(addsuffix .quickcheck,$(MODES)): $$(basename $$@)
|
||||
@tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
|
||||
--mode=$(basename $@) $(TESTFLAGS) --quickcheck
|
||||
|
||||
$(addsuffix .quickcheck,$(ARCHES)): $$(basename $$@)
|
||||
@tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
|
||||
--arch=$(basename $@) $(TESTFLAGS) --quickcheck
|
||||
|
||||
$(QUICKCHECKS): $$(basename $$@)
|
||||
@tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
|
||||
--arch-and-mode=$(basename $@) $(TESTFLAGS) --quickcheck
|
||||
|
||||
$(addsuffix .sync, $(ANDROID_BUILDS)): $$(basename $$@)
|
||||
@tools/android-sync.sh $(basename $@) $(OUTDIR) \
|
||||
$(shell pwd) $(ANDROID_V8)
|
||||
|
||||
$(addsuffix .check, $(ANDROID_BUILDS)): $$(basename $$@).sync
|
||||
@tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
|
||||
--arch-and-mode=$(basename $@) \
|
||||
--timeout=600 \
|
||||
--command-prefix="tools/android-run.py" $(TESTFLAGS)
|
||||
|
||||
$(addsuffix .check, $(ANDROID_ARCHES)): \
|
||||
$(addprefix $$(basename $$@).,$(MODES)).check
|
||||
|
||||
$(addsuffix .check, $(NACL_BUILDS)): $$(basename $$@)
|
||||
@tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
|
||||
--arch-and-mode=$(basename $@) \
|
||||
--timeout=600 --nopresubmit --noi18n \
|
||||
--command-prefix="tools/nacl-run.py"
|
||||
|
||||
$(addsuffix .check, $(NACL_ARCHES)): \
|
||||
$(addprefix $$(basename $$@).,$(MODES)).check
|
||||
|
||||
native.check: native
|
||||
@tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR)/native \
|
||||
--arch-and-mode=. $(TESTFLAGS)
|
||||
|
||||
SUPERFASTTESTMODES = ia32.release
|
||||
FASTTESTMODES = $(SUPERFASTTESTMODES),x64.release,ia32.optdebug,x64.optdebug,arm.optdebug,arm64.release
|
||||
FASTCOMPILEMODES = $(FASTTESTMODES),arm64.optdebug
|
||||
|
||||
COMMA = ,
|
||||
EMPTY =
|
||||
SPACE = $(EMPTY) $(EMPTY)
|
||||
quickcheck: $(subst $(COMMA),$(SPACE),$(FASTCOMPILEMODES))
|
||||
tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
|
||||
--arch-and-mode=$(SUPERFASTTESTMODES) $(TESTFLAGS) --quickcheck \
|
||||
--download-data mozilla webkit
|
||||
tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
|
||||
--arch-and-mode=$(FASTTESTMODES) $(TESTFLAGS) --quickcheck
|
||||
qc: quickcheck
|
||||
|
||||
turbocheck: $(subst $(COMMA),$(SPACE),$(FASTCOMPILEMODES))
|
||||
tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
|
||||
--arch-and-mode=$(SUPERFASTTESTMODES) $(TESTFLAGS) \
|
||||
--quickcheck --variants=turbofan --download-data mozilla webkit
|
||||
tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
|
||||
--arch-and-mode=$(FASTTESTMODES) $(TESTFLAGS) \
|
||||
--quickcheck --variants=turbofan
|
||||
tc: turbocheck
|
||||
|
||||
# Clean targets. You can clean each architecture individually, or everything.
|
||||
$(addsuffix .clean, $(ARCHES) $(ANDROID_ARCHES) $(NACL_ARCHES)):
|
||||
rm -f $(OUTDIR)/Makefile.$(basename $@)*
|
||||
rm -rf $(OUTDIR)/$(basename $@).release
|
||||
rm -rf $(OUTDIR)/$(basename $@).debug
|
||||
rm -rf $(OUTDIR)/$(basename $@).optdebug
|
||||
find $(OUTDIR) -regex '.*\(host\|target\)\.$(basename $@).*\.mk' -delete
|
||||
|
||||
native.clean:
|
||||
rm -f $(OUTDIR)/Makefile.native
|
||||
rm -rf $(OUTDIR)/native
|
||||
find $(OUTDIR) -regex '.*\(host\|target\)\.native\.mk' -delete
|
||||
|
||||
clean: $(addsuffix .clean, $(ARCHES) $(ANDROID_ARCHES) $(NACL_ARCHES)) native.clean gtags.clean
|
||||
|
||||
# GYP file generation targets.
|
||||
OUT_MAKEFILES = $(addprefix $(OUTDIR)/Makefile.,$(BUILDS))
|
||||
$(OUT_MAKEFILES): $(GYPFILES) $(ENVFILE)
|
||||
$(eval CXX_TARGET_ARCH:=$(shell $(CXX) -v 2>&1 | grep ^Target: | \
|
||||
cut -f 2 -d " " | cut -f 1 -d "-" ))
|
||||
$(eval CXX_TARGET_ARCH:=$(subst aarch64,arm64,$(CXX_TARGET_ARCH)))
|
||||
$(eval CXX_TARGET_ARCH:=$(subst x86_64,x64,$(CXX_TARGET_ARCH)))
|
||||
$(eval V8_TARGET_ARCH:=$(subst .,,$(suffix $(basename $@))))
|
||||
PYTHONPATH="$(shell pwd)/tools/generate_shim_headers:$(shell pwd)/build:$(PYTHONPATH):$(shell pwd)/build/gyp/pylib:$(PYTHONPATH)" \
|
||||
GYP_GENERATORS=make \
|
||||
build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \
|
||||
-Ibuild/standalone.gypi --depth=. \
|
||||
-Dv8_target_arch=$(V8_TARGET_ARCH) \
|
||||
$(if $(findstring $(CXX_TARGET_ARCH),$(V8_TARGET_ARCH)), \
|
||||
-Dtarget_arch=$(V8_TARGET_ARCH),) \
|
||||
$(if $(findstring optdebug,$@),-Dv8_optimized_debug=1,) \
|
||||
-S$(suffix $(basename $@))$(suffix $@) $(GYPFLAGS)
|
||||
|
||||
$(OUTDIR)/Makefile.native: $(GYPFILES) $(ENVFILE)
|
||||
PYTHONPATH="$(shell pwd)/tools/generate_shim_headers:$(shell pwd)/build:$(PYTHONPATH):$(shell pwd)/build/gyp/pylib:$(PYTHONPATH)" \
|
||||
GYP_GENERATORS=make \
|
||||
build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \
|
||||
-Ibuild/standalone.gypi --depth=. -S.native $(GYPFLAGS)
|
||||
|
||||
must-set-ANDROID_NDK_ROOT_OR_TOOLCHAIN:
|
||||
ifndef ANDROID_NDK_ROOT
|
||||
ifndef ANDROID_TOOLCHAIN
|
||||
$(error ANDROID_NDK_ROOT or ANDROID_TOOLCHAIN must be set))
|
||||
endif
|
||||
endif
|
||||
|
||||
# Note that NACL_SDK_ROOT must be set to point to an appropriate
|
||||
# Native Client SDK before using this makefile. You can download
|
||||
# an SDK here:
|
||||
# https://developers.google.com/native-client/sdk/download
|
||||
# The path indicated by NACL_SDK_ROOT will typically end with
|
||||
# a folder for a pepper version such as "pepper_25" that should
|
||||
# have "tools" and "toolchain" subdirectories.
|
||||
must-set-NACL_SDK_ROOT:
|
||||
ifndef NACL_SDK_ROOT
|
||||
$(error NACL_SDK_ROOT must be set)
|
||||
endif
|
||||
|
||||
# Replaces the old with the new environment file if they're different, which
|
||||
# will trigger GYP to regenerate Makefiles.
|
||||
$(ENVFILE): $(ENVFILE).new
|
||||
@if test -r $(ENVFILE) && cmp $(ENVFILE).new $(ENVFILE) > /dev/null; \
|
||||
then rm $(ENVFILE).new; \
|
||||
else mv $(ENVFILE).new $(ENVFILE); fi
|
||||
|
||||
# Stores current GYPFLAGS in a file.
|
||||
$(ENVFILE).new:
|
||||
$(eval CXX_TARGET_ARCH:=$(shell $(CXX) -v 2>&1 | grep ^Target: | \
|
||||
cut -f 2 -d " " | cut -f 1 -d "-" ))
|
||||
$(eval CXX_TARGET_ARCH:=$(subst aarch64,arm64,$(CXX_TARGET_ARCH)))
|
||||
$(eval CXX_TARGET_ARCH:=$(subst x86_64,x64,$(CXX_TARGET_ARCH)))
|
||||
@mkdir -p $(OUTDIR); echo "GYPFLAGS=$(GYPFLAGS) -Dtarget_arch=$(CXX_TARGET_ARCH)" > $(ENVFILE).new;
|
||||
|
||||
# Heap constants for grokdump.
|
||||
DUMP_FILE = tools/v8heapconst.py
|
||||
grokdump: ia32.release
|
||||
@cat $(DUMP_FILE).tmpl > $(DUMP_FILE)
|
||||
@$(OUTDIR)/ia32.release/d8 --dump-heap-constants >> $(DUMP_FILE)
|
||||
|
||||
# Support for the GNU GLOBAL Source Code Tag System.
|
||||
gtags.files: $(GYPFILES) $(ENVFILE)
|
||||
@find include src test -name '*.h' -o -name '*.cc' -o -name '*.c' > $@
|
||||
|
||||
# We need to manually set the stack limit here, to work around bugs in
|
||||
# gmake-3.81 and global-5.7.1 on recent 64-bit Linux systems.
|
||||
GPATH GRTAGS GSYMS GTAGS: gtags.files $(shell cat gtags.files 2> /dev/null)
|
||||
@bash -c 'ulimit -s 10240 && GTAGSFORCECPP=yes gtags -i -q -f $<'
|
||||
|
||||
gtags.clean:
|
||||
rm -f gtags.files GPATH GRTAGS GSYMS GTAGS
|
||||
|
||||
dependencies builddeps:
|
||||
$(error Use 'gclient sync' instead)
|
|
@ -0,0 +1,12 @@
|
|||
# header only atm
|
||||
if(AR_USE_SYSTEM_LIBS)
|
||||
find_package(Boost REQUIED)
|
||||
else()
|
||||
#mimic findpackage
|
||||
set(Boost_INCLUDE_DIRS "1.58.0")
|
||||
set(Boost_VERSION "1.58.0")
|
||||
set(Boost_FOUND True)
|
||||
endif()
|
||||
|
||||
add_library(ar_boost INTERFACE)
|
||||
target_include_directories(ar_boost INTERFACE ${Boost_INCLUDE_DIRS})
|
|
@ -0,0 +1,179 @@
|
|||
project(libev)
|
||||
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
#FIXME TEST AND CONFIGURE
|
||||
|
||||
add_library(ar_libev STATIC ev.c event.c)
|
||||
target_compile_definitions(ar_libev PUBLIC "EV_CHILD_ENABLE=0")
|
||||
target_compile_options(ar_libev PRIVATE "-O3") ## FIXME Windows
|
||||
target_include_directories(ar_libev PUBLIC .)
|
||||
|
||||
|
||||
include(CheckIncludeFiles)
|
||||
include(CheckFunctionExists)
|
||||
include(CheckLibraryExists)
|
||||
|
||||
### /* Define to 1 if you have the `clock_gettime' function. */
|
||||
### #undef HAVE_CLOCK_GETTIME
|
||||
check_function_exists(clock_gettime HAVE_CLOCK_GETTIME)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### /* Define to 1 to use the syscall interface for clock_gettime */
|
||||
### #undef HAVE_CLOCK_SYSCALL
|
||||
# FIXME FIXME FIXME FIXME FIXME FIXME take code from libev.m4
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### /* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
### #undef HAVE_DLFCN_H
|
||||
check_include_files(dlfcn.h HAVE_DLFCN_H)
|
||||
|
||||
### /* Define to 1 if you have the `epoll_ctl' function. */
|
||||
### #undef HAVE_EPOLL_CTL
|
||||
check_function_exists(epoll_ctl HAVE_EPOLL_CTL)
|
||||
|
||||
### /* Define to 1 if you have the `eventfd' function. */
|
||||
### #undef HAVE_EVENTFD
|
||||
check_function_exists(eventfd HAVE_EVENTFD)
|
||||
|
||||
### /* Define to 1 if the floor function is available */
|
||||
### #undef HAVE_FLOOR
|
||||
check_function_exists(floor HAVE_FLOOR)
|
||||
|
||||
### /* Define to 1 if you have the `inotify_init' function. */
|
||||
### #undef HAVE_INOTIFY_INIT
|
||||
check_function_exists(inotify_init HAVE_INOTIFY_INIT)
|
||||
|
||||
### /* Define to 1 if you have the <inttypes.h> header file. */
|
||||
### #undef HAVE_INTTYPES_H
|
||||
check_include_files(inttypes.h HAVE_INTTYPES_H)
|
||||
|
||||
### /* Define to 1 if you have the `kqueue' function. */
|
||||
### #undef HAVE_KQUEUE
|
||||
check_function_exists(kqueue HAVE_KQUEUE)
|
||||
|
||||
### /* Define to 1 if you have the `rt' library (-lrt). */
|
||||
### #undef HAVE_LIBRT
|
||||
check_library_exists(rt clock_gettime "" HAVE_LIBRT)
|
||||
|
||||
### /* Define to 1 if you have the <memory.h> header file. */
|
||||
### #undef HAVE_MEMORY_H
|
||||
check_include_files(memory.h HAVE_MEMORY_H)
|
||||
|
||||
### /* Define to 1 if you have the `nanosleep' function. */
|
||||
### #undef HAVE_NANOSLEEP
|
||||
check_function_exists(nanosleep HAVE_NANOSLEEP)
|
||||
|
||||
### /* Define to 1 if you have the `poll' function. */
|
||||
### #undef HAVE_POLL
|
||||
check_function_exists(poll HAVE_POLL)
|
||||
|
||||
### /* Define to 1 if you have the <poll.h> header file. */
|
||||
### #undef HAVE_POLL_H
|
||||
check_include_files(poll.h HAVE_POLL_H)
|
||||
|
||||
### /* Define to 1 if you have the `port_create' function. */
|
||||
### #undef HAVE_PORT_CREATE
|
||||
check_function_exists(port_create HAVE_PORT_CREATE)
|
||||
|
||||
### /* Define to 1 if you have the <port.h> header file. */
|
||||
### #undef HAVE_PORT_H
|
||||
check_include_files(port.h HAVE_PORT_H)
|
||||
|
||||
### /* Define to 1 if you have the `select' function. */
|
||||
### #undef HAVE_SELECT
|
||||
check_function_exists(select HAVE_SELECT)
|
||||
|
||||
### /* Define to 1 if you have the `signalfd' function. */
|
||||
### #undef HAVE_SIGNALFD
|
||||
check_function_exists(signalfd HAVE_SIGNALFD)
|
||||
|
||||
### /* Define to 1 if you have the <stdint.h> header file. */
|
||||
### #undef HAVE_STDINT_H
|
||||
check_include_files(stdint.h HAVE_STDINT_H)
|
||||
|
||||
### /* Define to 1 if you have the <stdlib.h> header file. */
|
||||
### #undef HAVE_STDLIB_H
|
||||
check_include_files(stdlib.h HAVE_STDLIB_H)
|
||||
|
||||
### /* Define to 1 if you have the <strings.h> header file. */
|
||||
### #undef HAVE_STRINGS_H
|
||||
check_include_files (strings.h HAVE_STRINGS_H)
|
||||
|
||||
### /* Define to 1 if you have the <string.h> header file. */
|
||||
### #undef HAVE_STRING_H
|
||||
check_include_files (string.h HAVE_STRING_H)
|
||||
|
||||
### /* Define to 1 if you have the <sys/epoll.h> header file. */
|
||||
### #undef HAVE_SYS_EPOLL_H
|
||||
check_include_files(sys/epoll.h HAVE_SYS_EPOLL_H)
|
||||
|
||||
### /* Define to 1 if you have the <sys/eventfd.h> header file. */
|
||||
### #undef HAVE_SYS_EVENTFD_H
|
||||
check_include_files(sys/eventfd.h HAVE_SYS_EVENTFD_H)
|
||||
|
||||
### /* Define to 1 if you have the <sys/event.h> header file. */
|
||||
### #undef HAVE_SYS_EVENT_H
|
||||
check_include_files(sys/event.h HAVE_SYS_EVENT_H)
|
||||
|
||||
### /* Define to 1 if you have the <sys/inotify.h> header file. */
|
||||
### #undef HAVE_SYS_INOTIFY_H
|
||||
check_include_files(sys/inotify.h HAVE_SYS_INOTIFY_H)
|
||||
|
||||
### /* Define to 1 if you have the <sys/select.h> header file. */
|
||||
### #undef HAVE_SYS_SELECT_H
|
||||
check_include_files(sys/select.h HAVE_SYS_SELECT_H)
|
||||
|
||||
### /* Define to 1 if you have the <sys/signalfd.h> header file. */
|
||||
### #undef HAVE_SYS_SIGNALFD_H
|
||||
check_include_files(sys/signalfd.h HAVE_SYS_SIGNALFD_H)
|
||||
|
||||
### /* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
### #undef HAVE_SYS_STAT_H
|
||||
check_include_files(sys/stat.h HAVE_SYS_STAT_H)
|
||||
|
||||
### /* Define to 1 if you have the <sys/types.h> header file. */
|
||||
### #undef HAVE_SYS_TYPES_H
|
||||
check_include_files(sys/types.h HAVE_SYS_TYPES_H)
|
||||
|
||||
### /* Define to 1 if you have the <unistd.h> header file. */
|
||||
### #undef HAVE_UNISTD_H
|
||||
check_include_files(unistd.h HAVE_UNISTD_H)
|
||||
|
||||
### /* Define to the sub-directory in which libtool stores uninstalled libraries.
|
||||
### */
|
||||
### #undef LT_OBJDIR
|
||||
###
|
||||
### /* Name of package */
|
||||
### #undef PACKAGE
|
||||
###
|
||||
### /* Define to the address where bug reports for this package should be sent. */
|
||||
### #undef PACKAGE_BUGREPORT
|
||||
###
|
||||
### /* Define to the full name of this package. */
|
||||
### #undef PACKAGE_NAME
|
||||
###
|
||||
### /* Define to the full name and version of this package. */
|
||||
### #undef PACKAGE_STRING
|
||||
###
|
||||
### /* Define to the one symbol short name of this package. */
|
||||
### #undef PACKAGE_TARNAME
|
||||
###
|
||||
### /* Define to the home page for this package. */
|
||||
### #undef PACKAGE_URL
|
||||
###
|
||||
### /* Define to the version of this package. */
|
||||
### #undef PACKAGE_VERSION
|
||||
###
|
||||
### /* Define to 1 if you have the ANSI C header files. */
|
||||
### #undef STDC_HEADERS
|
||||
###/* Version number of package */
|
||||
####undef VERSION
|
||||
|
||||
configure_file(config.h.cmake.in config.h)
|
|
@ -0,0 +1,125 @@
|
|||
/* config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* Define to 1 if you have the `clock_gettime' function. */
|
||||
#cmakedefine01 HAVE_CLOCK_GETTIME
|
||||
|
||||
/* Define to 1 to use the syscall interface for clock_gettime */
|
||||
#cmakedefine01 HAVE_CLOCK_SYSCALL
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#cmakedefine01 HAVE_DLFCN_H
|
||||
|
||||
/* Define to 1 if you have the `epoll_ctl' function. */
|
||||
#cmakedefine01 HAVE_EPOLL_CTL
|
||||
|
||||
/* Define to 1 if you have the `eventfd' function. */
|
||||
#cmakedefine01 HAVE_EVENTFD
|
||||
|
||||
/* Define to 1 if the floor function is available */
|
||||
#cmakedefine01 HAVE_FLOOR
|
||||
|
||||
/* Define to 1 if you have the `inotify_init' function. */
|
||||
#cmakedefine01 HAVE_INOTIFY_INIT
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#cmakedefine01 HAVE_INTTYPES_H
|
||||
|
||||
/* Define to 1 if you have the `kqueue' function. */
|
||||
#cmakedefine01 HAVE_KQUEUE
|
||||
|
||||
/* Define to 1 if you have the `rt' library (-lrt). */
|
||||
#cmakedefine01 HAVE_LIBRT
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#cmakedefine01 HAVE_MEMORY_H
|
||||
|
||||
/* Define to 1 if you have the `nanosleep' function. */
|
||||
#cmakedefine01 HAVE_NANOSLEEP
|
||||
|
||||
/* Define to 1 if you have the `poll' function. */
|
||||
#cmakedefine01 HAVE_POLL
|
||||
|
||||
/* Define to 1 if you have the <poll.h> header file. */
|
||||
#cmakedefine01 HAVE_POLL_H
|
||||
|
||||
/* Define to 1 if you have the `port_create' function. */
|
||||
#cmakedefine01 HAVE_PORT_CREATE
|
||||
|
||||
/* Define to 1 if you have the <port.h> header file. */
|
||||
#cmakedefine01 HAVE_PORT_H
|
||||
|
||||
/* Define to 1 if you have the `select' function. */
|
||||
#cmakedefine01 HAVE_SELECT
|
||||
|
||||
/* Define to 1 if you have the `signalfd' function. */
|
||||
#cmakedefine01 HAVE_SIGNALFD
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#cmakedefine01 HAVE_STDINT_H
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#cmakedefine01 HAVE_STDLIB_H
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#cmakedefine01 HAVE_STRINGS_H
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#cmakedefine01 HAVE_STRING_H
|
||||
|
||||
/* Define to 1 if you have the <sys/epoll.h> header file. */
|
||||
#cmakedefine01 HAVE_SYS_EPOLL_H
|
||||
|
||||
/* Define to 1 if you have the <sys/eventfd.h> header file. */
|
||||
#cmakedefine01 HAVE_SYS_EVENTFD_H
|
||||
|
||||
/* Define to 1 if you have the <sys/event.h> header file. */
|
||||
#cmakedefine01 HAVE_SYS_EVENT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/inotify.h> header file. */
|
||||
#cmakedefine01 HAVE_SYS_INOTIFY_H
|
||||
|
||||
/* Define to 1 if you have the <sys/select.h> header file. */
|
||||
#cmakedefine01 HAVE_SYS_SELECT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/signalfd.h> header file. */
|
||||
#cmakedefine01 HAVE_SYS_SIGNALFD_H
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#cmakedefine01 HAVE_SYS_STAT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#cmakedefine01 HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#cmakedefine01 HAVE_UNISTD_H
|
||||
|
||||
/* Define to the sub-directory in which libtool stores uninstalled libraries.
|
||||
*/
|
||||
#cmakedefine LT_OBJDIR
|
||||
|
||||
/* Name of package */
|
||||
#cmakedefine PACKAGE
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#cmakedefine PACKAGE_BUGREPORT
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#cmakedefine PACKAGE_NAME
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#cmakedefine PACKAGE_STRING
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#cmakedefine PACKAGE_TARNAME
|
||||
|
||||
/* Define to the home page for this package. */
|
||||
#cmakedefine PACKAGE_URL
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#cmakedefine PACKAGE_VERSION
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#cmakedefine STDC_HEADERS
|
||||
|
||||
/* Version number of package */
|
||||
#cmakedefine VERSION
|
|
@ -8,7 +8,7 @@
|
|||
### @brief required cmake version
|
||||
################################################################################
|
||||
|
||||
cmake_minimum_required(VERSION 2.6)
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
|
||||
################################################################################
|
||||
### @brief cmake build types
|
||||
|
@ -18,12 +18,35 @@ if (NOT CMAKE_BUILD_TYPE)
|
|||
set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE string "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel." FORCE)
|
||||
endif ()
|
||||
|
||||
|
||||
################################################################################
|
||||
### @brief arangodb project
|
||||
################################################################################
|
||||
|
||||
project(arangodb)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
|
||||
|
||||
|
||||
######################
|
||||
## OBI EXPERIMENTAL ##
|
||||
######################
|
||||
find_package(Threads REQUIRED)
|
||||
|
||||
set(AR_ICU_LIBS icu_header icu_uc icu_data icu_i18n)
|
||||
set(AR_V8_LIBS v8_base v8_libbase v8_libplatform v8_nosnapshot)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
option(AR_USE_SYSTEM_LIBS "use libraries provided by the system" OFF)
|
||||
add_subdirectory(3rdParty)
|
||||
|
||||
|
||||
set(LIB_ARANGO arango)
|
||||
set(LIB_ARANGO_CLIENT arango_client)
|
||||
set(LIB_ARANGO_V8 arango_v8)
|
||||
|
@ -426,6 +449,7 @@ endif ()
|
|||
################################################################################
|
||||
|
||||
include_directories(${PROJECT_SOURCE_DIR})
|
||||
include_directories(${PROJECT_BINARY_DIR}/lib) #for configured file
|
||||
|
||||
if (CUSTOM_INCLUDES)
|
||||
include_directories(${CUSTOM_INCLUDES})
|
||||
|
@ -623,17 +647,17 @@ elseif (DARWIN)
|
|||
set(ICU_LIB_PATH ${PROJECT_SOURCE_DIR}/3rdParty/V8-${V8_VERSION}/out/x64.release CACHE path "ICU library path")
|
||||
set(ICU_LIBS icui18n;icuuc;icudata;pthread;dl;m CACHE path "ICU libraries")
|
||||
else ()
|
||||
set(ICU_INCLUDE ${PROJECT_SOURCE_DIR}/3rdParty/V8-${V8_VERSION}/third_party/icu/source/common;${PROJECT_SOURCE_DIR}/3rdParty/V8-${V8_VERSION}/third_party/icu/source/i18n;${PROJECT_SOURCE_DIR}/3rdParty/V8-${V8_VERSION}/third_party/icu/source/io CACHE path "ICU include path")
|
||||
set(ICU_LIB_PATH ${PROJECT_SOURCE_DIR}/3rdParty/V8-${V8_VERSION}/out/x64.release/obj.target/third_party/icu/ CACHE path "ICU library path")
|
||||
set(ICU_LIBS icui18n;icuuc;icudata;pthread;dl;m CACHE path "ICU libraries")
|
||||
# set(ICU_INCLUDE ${PROJECT_SOURCE_DIR}/3rdParty/V8-${V8_VERSION}/third_party/icu/source/common;${PROJECT_SOURCE_DIR}/3rdParty/V8-${V8_VERSION}/third_party/icu/source/i18n;${PROJECT_SOURCE_DIR}/3rdParty/V8-${V8_VERSION}/third_party/icu/source/io CACHE path "ICU include path")
|
||||
# set(ICU_LIB_PATH ${PROJECT_SOURCE_DIR}/3rdParty/V8-${V8_VERSION}/out/x64.release/obj.target/third_party/icu/ CACHE path "ICU library path")
|
||||
# set(ICU_LIBS icui18n;icuuc;icudata;pthread;dl;m CACHE path "ICU libraries")
|
||||
endif ()
|
||||
|
||||
if (ICU_INCLUDE)
|
||||
include_directories(${ICU_INCLUDE})
|
||||
# include_directories(${ICU_INCLUDE})
|
||||
endif ()
|
||||
|
||||
if (ICU_LIB_PATH)
|
||||
link_directories(${ICU_LIB_PATH})
|
||||
# link_directories(${ICU_LIB_PATH})
|
||||
endif ()
|
||||
|
||||
# OS type ------------------------------------------------------------
|
||||
|
@ -647,15 +671,15 @@ elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
|||
endif()
|
||||
|
||||
# Boost --------------------------------------------------------------
|
||||
find_package(Boost COMPONENTS unit_test_framework)
|
||||
if (${Boost_FOUND})
|
||||
include_directories(${Boost_INCLUDE_DIRS})
|
||||
add_definitions(-DBoost_MAJOR_VERSION=${Boost_MAJOR_VERSION})
|
||||
add_definitions(-DBoost_MINOR_VERSION=${Boost_MINOR_VERSION})
|
||||
link_directories (${BOOST_LIBRARYDIR})
|
||||
else()
|
||||
message ("Boost unit test framework not found. Unit tests are disabled.")
|
||||
endif()
|
||||
#find_package(Boost COMPONENTS unit_test_framework)
|
||||
#if (${Boost_FOUND})
|
||||
# include_directories(${Boost_INCLUDE_DIRS})
|
||||
# add_definitions(-DBoost_MAJOR_VERSION=${Boost_MAJOR_VERSION})
|
||||
# add_definitions(-DBoost_MINOR_VERSION=${Boost_MINOR_VERSION})
|
||||
# link_directories (${BOOST_LIBRARYDIR})
|
||||
#else()
|
||||
# message ("Boost unit test framework not found. Unit tests are disabled.")
|
||||
#endif()
|
||||
|
||||
# OpenSSL -----------------------------------------------------------
|
||||
find_package(OpenSSL REQUIRED)
|
||||
|
@ -731,7 +755,11 @@ set(LINENOISE_VERSION "unknown" CACHE string "LINENOISE version")
|
|||
### @brief V8
|
||||
################################################################################
|
||||
|
||||
set(V8_VERSION "unknown" CACHE string "V8 version")
|
||||
|
||||
# on the first run the cache variable would replace the regular variable and on
|
||||
# subsequent runs the regular variable would take precedence over the cache variable
|
||||
# the behavior is not consisten btween runs -- so the following line has to go
|
||||
##set(V8_VERSION "unknown" CACHE string "V8 version")
|
||||
|
||||
if (MSVC OR RASPBIAN)
|
||||
set(V8_LIBS v8_base;v8_libbase;v8_libplatform;v8_nosnapshot CACHE string "V8 libraries")
|
||||
|
|
|
@ -49,13 +49,15 @@ target_link_libraries(
|
|||
${BIN_ARANGOB}
|
||||
${LIB_ARANGO_CLIENT}
|
||||
${LIB_ARANGO}
|
||||
${ICU_LIBRARIES}
|
||||
${V8_LIBRARIES}
|
||||
${BT_LIBS}
|
||||
${ZLIB_LIBS}
|
||||
${LINENOISE_LIBS}
|
||||
${OPENSSL_LIBRARIES}
|
||||
${MSVC_LIBS}
|
||||
|
||||
${AR_V8_LIBS}
|
||||
${AR_ICU_LIBS}
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
)
|
||||
|
||||
################################################################################
|
||||
|
|
|
@ -30,6 +30,9 @@ using namespace arangodb::basics;
|
|||
using namespace std;
|
||||
|
||||
|
||||
|
||||
extern "C" const SSL_METHOD *SSLv3_method(void);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief creates an SSL context
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -38,37 +38,42 @@ else ()
|
|||
|
||||
endif ()
|
||||
|
||||
include_directories(../3rdParty/linenoise-ng/include)
|
||||
include_directories(../3rdParty/linenoise-ng/src)
|
||||
# TODO # add vars to configure
|
||||
configure_file(Basics/local-configuration.h.in Basics/local-configuration.h COPYONLY)
|
||||
# Find includes in corresponding build directories
|
||||
# set(CMAKE_INCLUDE_CURRENT_DIR ON) # <- now done via include_directories in main file
|
||||
|
||||
include_directories(${PROJECT_SOURCE_DIR}/linenoise-ng/include)
|
||||
include_directories(${PROJECT_SOURCE_DIR}/linenoise-ng/src)
|
||||
include_directories(${V8_INCLUDE_DIR})
|
||||
add_definitions("-DTRI_HAVE_LINENOISE")
|
||||
|
||||
SET(LIB_ARANGO_CONSOLE
|
||||
../3rdParty/linenoise-ng/src/ConvertUTF.cpp
|
||||
../3rdParty/linenoise-ng/src/linenoise.cpp
|
||||
../3rdParty/linenoise-ng/src/wcwidth.cpp
|
||||
${PROJECT_SOURCE_DIR}/linenoise-ng/src/ConvertUTF.cpp
|
||||
${PROJECT_SOURCE_DIR}/linenoise-ng/src/linenoise.cpp
|
||||
${PROJECT_SOURCE_DIR}/linenoise-ng/src/wcwidth.cpp
|
||||
Utilities/LinenoiseShell.cpp
|
||||
)
|
||||
|
||||
include_directories(../3rdParty/velocypack/include)
|
||||
include_directories(${PROJECT_SOURCE_DIR}/velocypack/include)
|
||||
|
||||
SET(LIB_ARANGO_VPACK
|
||||
../3rdParty/velocypack/src/AttributeTranslator.cpp
|
||||
../3rdParty/velocypack/src/Builder.cpp
|
||||
../3rdParty/velocypack/src/Collection.cpp
|
||||
../3rdParty/velocypack/src/Dumper.cpp
|
||||
../3rdParty/velocypack/src/Exception.cpp
|
||||
../3rdParty/velocypack/src/HexDump.cpp
|
||||
../3rdParty/velocypack/src/Iterator.cpp
|
||||
../3rdParty/velocypack/src/Options.cpp
|
||||
../3rdParty/velocypack/src/Parser.cpp
|
||||
../3rdParty/velocypack/src/Slice.cpp
|
||||
../3rdParty/velocypack/src/ValueType.cpp
|
||||
../3rdParty/velocypack/src/Version.cpp
|
||||
../3rdParty/velocypack/src/asm-functions.cpp
|
||||
../3rdParty/velocypack/src/fasthash.cpp
|
||||
../3rdParty/velocypack/src/fpconv.cpp
|
||||
../3rdParty/velocypack/src/velocypack-common.cpp
|
||||
${PROJECT_SOURCE_DIR}/velocypack/src/AttributeTranslator.cpp
|
||||
${PROJECT_SOURCE_DIR}/velocypack/src/Builder.cpp
|
||||
${PROJECT_SOURCE_DIR}/velocypack/src/Collection.cpp
|
||||
${PROJECT_SOURCE_DIR}/velocypack/src/Dumper.cpp
|
||||
${PROJECT_SOURCE_DIR}/velocypack/src/Exception.cpp
|
||||
${PROJECT_SOURCE_DIR}/velocypack/src/HexDump.cpp
|
||||
${PROJECT_SOURCE_DIR}/velocypack/src/Iterator.cpp
|
||||
${PROJECT_SOURCE_DIR}/velocypack/src/Options.cpp
|
||||
${PROJECT_SOURCE_DIR}/velocypack/src/Parser.cpp
|
||||
${PROJECT_SOURCE_DIR}/velocypack/src/Slice.cpp
|
||||
${PROJECT_SOURCE_DIR}/velocypack/src/ValueType.cpp
|
||||
${PROJECT_SOURCE_DIR}/velocypack/src/Version.cpp
|
||||
${PROJECT_SOURCE_DIR}/velocypack/src/asm-functions.cpp
|
||||
${PROJECT_SOURCE_DIR}/velocypack/src/fasthash.cpp
|
||||
${PROJECT_SOURCE_DIR}/velocypack/src/fpconv.cpp
|
||||
${PROJECT_SOURCE_DIR}/velocypack/src/velocypack-common.cpp
|
||||
)
|
||||
|
||||
add_library(
|
||||
|
@ -156,6 +161,8 @@ add_library(
|
|||
Zip/unzip.cpp
|
||||
Zip/zip.cpp
|
||||
)
|
||||
target_link_libraries(${LIB_ARANGO} ${AR_ICU_LIBS} ${AR_V8_LIBS})
|
||||
|
||||
|
||||
################################################################################
|
||||
### @brief LIB_ARANGO_CLIENT
|
||||
|
|
Loading…
Reference in New Issue