Merge "Make it possible to change the number of remote jobs"
diff --git a/core/base_rules.mk b/core/base_rules.mk
index d96502d..21b59a3 100644
--- a/core/base_rules.mk
+++ b/core/base_rules.mk
@@ -260,7 +260,7 @@
my_path_components := $(subst /,$(space),$(LOCAL_PATH))
my_path_prefix := MODULES-IN
$(foreach c, $(my_path_components),\
- $(eval my_path_prefix := $(my_path_prefix)/$(c))\
+ $(eval my_path_prefix := $(my_path_prefix)-$(c))\
$(eval .PHONY : $(my_path_prefix))\
$(eval $(my_path_prefix) : $(my_register_name)))
diff --git a/core/clang/arm.mk b/core/clang/arm.mk
index 6b3d7c1..e66aa6c 100644
--- a/core/clang/arm.mk
+++ b/core/clang/arm.mk
@@ -10,11 +10,6 @@
CLANG_CONFIG_arm_EXTRA_CFLAGS += -mcpu=krait -mfpu=neon-vfpv4
endif
-ifeq ($(HOST_OS),darwin)
- # Darwin is really bad at dealing with idiv/sdiv. Don't use krait on Darwin.
- CLANG_CONFIG_arm_EXTRA_CFLAGS += -mcpu=cortex-a9
-endif
-
CLANG_CONFIG_arm_EXTRA_CPPFLAGS :=
CLANG_CONFIG_arm_EXTRA_LDFLAGS :=
diff --git a/core/config.mk b/core/config.mk
index a7517f3..12308fd 100644
--- a/core/config.mk
+++ b/core/config.mk
@@ -423,6 +423,12 @@
DOXYGEN:= doxygen
AAPT := $(HOST_OUT_EXECUTABLES)/aapt$(HOST_EXECUTABLE_SUFFIX)
AIDL := $(HOST_OUT_EXECUTABLES)/aidl$(HOST_EXECUTABLE_SUFFIX)
+ifeq ($(HOST_OS),linux)
+BREAKPAD_DUMP_SYMS := $(HOST_OUT_EXECUTABLES)/dump_syms
+else
+# For non-supported hosts, do not generate breakpad symbols.
+BREAKPAD_GENERATE_SYMBOLS := false
+endif
PROTOC := $(HOST_OUT_EXECUTABLES)/aprotoc$(HOST_EXECUTABLE_SUFFIX)
DBUS_GENERATOR := $(HOST_OUT_EXECUTABLES)/dbus-binding-generator
SIGNAPK_JAR := $(HOST_OUT_JAVA_LIBRARIES)/signapk$(COMMON_JAVA_PACKAGE_SUFFIX)
diff --git a/core/cxx_stl_setup.mk b/core/cxx_stl_setup.mk
index bf492d5..be8a711 100644
--- a/core/cxx_stl_setup.mk
+++ b/core/cxx_stl_setup.mk
@@ -72,7 +72,6 @@
ifneq ($(filter $(my_cxx_stl),libc++ libc++_static),)
my_cflags += -D_USING_LIBCXX
- my_c_includes += external/libcxx/include
# Note that the structure of this means that LOCAL_CXX_STL := libc++ will
# use the static libc++ for static executables.
diff --git a/core/dynamic_binary.mk b/core/dynamic_binary.mk
index 38c0cbe..240415d 100644
--- a/core/dynamic_binary.mk
+++ b/core/dynamic_binary.mk
@@ -86,6 +86,20 @@
@echo "target Symbolic: $(PRIVATE_MODULE) ($@)"
$(copy-file-to-target)
+###########################################################
+## Store breakpad symbols
+###########################################################
+
+ifeq ($(BREAKPAD_GENERATE_SYMBOLS),true)
+my_breakpad_path := $(PRODUCT_OUT)/breakpad/$(patsubst $(PRODUCT_OUT)/%,%,$(my_module_path))
+breakpad_input := $(relocation_packer_output)
+breakpad_output := $(my_breakpad_path)/$(my_installed_module_stem).sym
+$(breakpad_output) : $(breakpad_input) | $(BREAKPAD_DUMP_SYMS)
+ @echo "target breakpad: $(PRIVATE_MODULE) ($@)"
+ @mkdir -p $(dir $@)
+ $(hide) $(BREAKPAD_DUMP_SYMS) -c $< > $@
+$(LOCAL_BUILT_MODULE) : $(breakpad_output)
+endif
###########################################################
## Strip
@@ -143,5 +157,6 @@
$(cleantarget): PRIVATE_CLEAN_FILES += \
$(linked_module) \
+ $(breakpad_output) \
$(symbolic_output) \
$(strip_output)
diff --git a/core/goma.mk b/core/goma.mk
index a876a10..e119829 100644
--- a/core/goma.mk
+++ b/core/goma.mk
@@ -16,13 +16,14 @@
# Notice: this works only with Google's Goma build infrastructure.
ifneq ($(USE_GOMA),)
- # Check if USE_NINJA is defined because GNU make won't work well
- # with goma. Note this file is evaluated twice, once with
- # USE_NINJA=true by GNU make and once with USE_NINJA=false by kati
- # which is invoked by GNU make. So, we cannot test the value of
- # USE_NINJA.
- ifndef USE_NINJA
- $(error USE_GOMA=true works only with USE_NINJA=true)
+ # Check if USE_NINJA is not false because GNU make won't work well
+ # with goma. Note this file is evaluated twice, once by GNU make and
+ # once by kati with USE_NINJA=false. We do this check in the former
+ # pass.
+ ifndef KATI
+ ifeq ($(USE_NINJA),false)
+ $(error USE_GOMA=true is not compatible with USE_NINJA=false)
+ endif
endif
# Goma requires a lot of processes and file descriptors.
diff --git a/core/ninja.mk b/core/ninja.mk
index a800cc1..ee72087 100644
--- a/core/ninja.mk
+++ b/core/ninja.mk
@@ -7,7 +7,7 @@
PARSE_TIME_MAKE_GOALS := \
$(PARSE_TIME_MAKE_GOALS) \
$(dont_bother_goals) \
- %tests \
+ tests \
APP-% \
DUMP_% \
ECLIPSE-% \
diff --git a/core/pathmap.mk b/core/pathmap.mk
index 38306f4..190aed3 100644
--- a/core/pathmap.mk
+++ b/core/pathmap.mk
@@ -39,9 +39,6 @@
frameworks-native:frameworks/native/include \
libhardware:hardware/libhardware/include \
libhardware_legacy:hardware/libhardware_legacy/include \
- libhost:build/libs/host/include \
- libnativehelper:libnativehelper/include \
- libpagemap:system/extras/libpagemap/include \
libril:hardware/ril/include \
opengl-tests-includes:frameworks/native/opengl/tests/include \
recovery:bootable/recovery \
@@ -69,7 +66,7 @@
# Many modules expect to be able to say "#include <jni.h>",
# so make it easy for them to find the correct path.
#
-JNI_H_INCLUDE := $(call include-path-for,libnativehelper)/nativehelper
+JNI_H_INCLUDE := libnativehelper/include/nativehelper
#
# A list of all source roots under frameworks/base, which will be
diff --git a/core/shared_library.mk b/core/shared_library.mk
index 71a3bb2..73aca78c 100644
--- a/core/shared_library.mk
+++ b/core/shared_library.mk
@@ -9,13 +9,13 @@
ifeq ($(my_module_multilib),both)
ifneq ($(LOCAL_MODULE_PATH),)
ifneq ($(TARGET_2ND_ARCH),)
-$(warning $(LOCAL_MODULE): LOCAL_MODULE_PATH for shared libraries is unsupported in multiarch builds, use LOCAL_MODULE_RELATIVE_PATH instead)
+$(error $(LOCAL_MODULE): LOCAL_MODULE_PATH for shared libraries is unsupported in multiarch builds, use LOCAL_MODULE_RELATIVE_PATH instead)
endif
endif
ifneq ($(LOCAL_UNSTRIPPED_PATH),)
ifneq ($(TARGET_2ND_ARCH),)
-$(warning $(LOCAL_MODULE): LOCAL_UNSTRIPPED_PATH for shared libraries is unsupported in multiarch builds)
+$(error $(LOCAL_MODULE): LOCAL_UNSTRIPPED_PATH for shared libraries is unsupported in multiarch builds)
endif
endif
endif # my_module_multilib == both
diff --git a/envsetup.sh b/envsetup.sh
index 1ff5f4a..c24e1f0 100644
--- a/envsetup.sh
+++ b/envsetup.sh
@@ -780,7 +780,10 @@
return 1
fi
local MY_PWD=`PWD= /bin/pwd|sed 's:'$T'/::'`
- $DRV make -C $T -f build/core/main.mk $@ MODULES-IN/$MY_PWD
+ local MODULES_IN_PATHS=MODULES-IN-$MY_PWD
+ # Convert "/" to "-".
+ MODULES_IN_PATHS=${MODULES_IN_PATHS//\//-}
+ $DRV make -C $T -f build/core/main.mk $@ $MODULES_IN_PATHS
fi
}
@@ -808,7 +811,7 @@
if [ "$MY_PWD" != "" ]; then
DIR=$MY_PWD/$DIR
fi
- MODULES_IN_PATHS="$MODULES_IN_PATHS MODULES-IN/$DIR"
+ MODULES_IN_PATHS="$MODULES_IN_PATHS MODULES-IN-$DIR"
else
case $DIR in
showcommands | snod | dist | *=*) ARGS="$ARGS $DIR";;
@@ -816,6 +819,8 @@
esac
fi
done
+ # Convert "/" to "-".
+ MODULES_IN_PATHS=${MODULES_IN_PATHS//\//-}
$DRV make -C $T -f build/core/main.mk $DASH_ARGS $ARGS $MODULES_IN_PATHS
else
echo "Couldn't locate the top of the tree. Try setting TOP."