Add Android.mk command to import headers without import symbols

LOCAL_COPY_HEADERS is deprecated by Android, we have to use
LOCAL_EXPORT_C_INCLUDE_DIRS instead.
In test we need to import a header without link with the library.
We replace the body of the function by a stub or a mock.
But we need to have the same prototype of the function by importing the
header. But there are no way to import a header exported by a
LOCAL_EXPORT_C_INCLUDE_DIRS without link with the library.

This patch add 2 new LOCAL variables
LOCAL_IMPORT_C_INCLUDE_DIRS_FROM_STATIC_LIBRARIES and
LOCAL_IMPORT_C_INCLUDE_DIRS_FROM_SHARED_LIBRARIES to import include
from libraries without import symbols.

Change-Id: I6f668c900003e27ba3c2ce0d2ab9200b6f058faf
Signed-off-by: Jeremie Graulle <jeremiex.graulle@intel.com>
Signed-off-by: Jian Luo <jian.luo@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 117000
Removed and Tweaked Some Build Flags
Tweaked build flags some more
Add "WITH_SYNTAX_CHECK=1 make ..."

The new option WITH_SYNTAX_CHECK=1 instructs build system to invoke
"clang -fsyntax-only" to utilize clang's better diagnostics before calling
LOCAL_CC/LOCAL_CXX for code generation.  The compilation time is slightly
longer, and the generated object file should be the same as w/o WITH_SYNTAX_CHECK

Project use lots of GCC extensions (eg. nested function) not supported
by clang may opt out by adding LOCAL_NO_SYNTAX_CHECK:=true

Change-Id: I5689586788ef049bd967364f71f31f1e359bd121

Conflicts:
	core/binary.mk
Some changes added to compile and run with Java 6 and Java 7.

  - correction of errors with Javac 6:
    - target 1.5 and source empty.
  - correction of errors with Javadoc 7:
    - strange behavior when duplicate classes are given.

Change-Id: Ib814ede143f7799ef18e0fb1b733547519b8b0e5

Conflicts:
	core/main.mk
Fix a bug that 'LOCAL_MODULE_STEM'ed apks are not signed

LOCAL_MODULE_STEM is used to rename module or package names in the
final output system image. However, $(APKCERTS_FILE): target did not
support this LOCAL_MODULE_STEM scheme.

This commit fixes this bug by explicitly addressing
'LOCAL_MODULE_STEM'ed apk name correctly.

Change-Id: I4cf096266d97180a32ae054d6ff6cf2b7e5d042a
Implement Auto Feedback Directed Optimization Support

Introduces auto feedback directed optimization support for arm,
mips, and x86 targets.

The following should be taken note of:

  - If runtime profile generation (BUILD_FDO_INSTRUMENT) is set,
    auto feedback directed optimizations will be disabled.
    Just as feedback directed optimizations would be disabled.

  - You may prefer to use AutoFDO over FDO by setting BUILD_PREFER_AUTO_FDO

  - If TARGET_FDO_PROFILE_PATH is set, but TARGET_AUTO_FDO_PROFILE_PATH
    is unset, we will attempt to use the FDO profile path instead.
    Otherwise, the default path of
    afdo/profiles/$(TARGET_ARCH)/$(TARGET_ARCH_VARIANT) will be set.
    Note: this will only work if TARGET_FDO_PROFILE_PATH contains afdo runtime
    profiles as well, but is here to cover all bases.

  - LOCAL_NO_AUTO_FDO_SUPPORT may be set to locally disable AFDO cflags, however
    we also abide by LOCAL_NO_FDO_SUPPORT for full compatibility.

  - We will not apply AFDO cflags for host modules by default.

Change-Id: Ia77458b83c6c554c1602912fb5596b522e711ad9

Conflicts:
	core/combo/TARGET_linux-x86.mk
Changed Fortify Source to =0
Add Junit4 to the classpath for CollectAllTests

This is needed for CollectAllTests to work with Junit4 tests.

Change-Id: I5e339022220b8e40bcb12337a09f3615dad7d53c

Conflicts:
	core/tasks/cts.mk
cout: move to $out

Change-Id: I3b5bf8a5f62dcdf267662bb97a2073150152cfa6