diff options
| -rw-r--r-- | build/Android.common.mk | 18 | ||||
| -rw-r--r-- | build/Android.executable.mk | 4 | ||||
| -rw-r--r-- | build/Android.gtest.mk | 1 | ||||
| -rw-r--r-- | build/Android.oat.mk | 3 | ||||
| -rw-r--r-- | dex2oat/dex2oat.cc | 8 | ||||
| -rw-r--r-- | runtime/common_test.h | 8 |
6 files changed, 17 insertions, 25 deletions
diff --git a/build/Android.common.mk b/build/Android.common.mk index 0871884b00..a2c2e1ae5e 100644 --- a/build/Android.common.mk +++ b/build/Android.common.mk @@ -149,11 +149,8 @@ else IMG_TARGET_BASE_ADDRESS := 0x60000000 endif -ART_HOST_CFLAGS := $(art_cflags) -DANDROID_SMP=1 -DART_BASE_ADDRESS=$(IMG_HOST_BASE_ADDRESS) - -ifeq ($(TARGET_ARCH),x86) -ART_TARGET_CFLAGS += -msse2 -endif +ART_HOST_CFLAGS := $(art_cflags) -DANDROID_SMP=1 -DART_BASE_ADDRESS=$(IMG_HOST_BASE_ADDRESS) +ART_HOST_CFLAGS += -DART_DEFAULT_INSTRUCTION_SET_FEATURES=default ART_TARGET_CFLAGS := $(art_cflags) -DART_TARGET -DART_BASE_ADDRESS=$(IMG_TARGET_BASE_ADDRESS) ifeq ($(TARGET_CPU_SMP),true) @@ -162,6 +159,17 @@ else ART_TARGET_CFLAGS += -DANDROID_SMP=0 endif +# DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES is set in ../build/core/dex_preopt.mk based on +# the TARGET_CPU_VARIANT +ifeq ($(DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES),) +$(error Required DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES is not set) +endif +ART_TARGET_CFLAGS += -DART_DEFAULT_INSTRUCTION_SET_FEATURES=$(DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES) + +ifeq ($(TARGET_ARCH),x86) +ART_TARGET_CFLAGS += -msse2 +endif + # Enable thread-safety for GCC 4.6 on the target but not for GCC 4.7 where this feature was removed. ifneq ($(filter 4.6 4.6.%, $(TARGET_GCC_VERSION)),) ART_TARGET_CFLAGS += -Wthread-safety diff --git a/build/Android.executable.mk b/build/Android.executable.mk index b317d92999..5cf15be1c1 100644 --- a/build/Android.executable.mk +++ b/build/Android.executable.mk @@ -24,10 +24,6 @@ ifeq ($(ART_USE_PORTABLE_COMPILER),true) ART_EXECUTABLES_CFLAGS += -DART_USE_PORTABLE_COMPILER=1 endif -# add the default instruction set features -ART_EXECUTABLES_CFLAGS += \ - -DART_DEFAULT_INSTRUCTION_SET_FEATURES=$(DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES) - # $(1): executable ("d" will be appended for debug version) # $(2): source # $(3): extra shared libraries diff --git a/build/Android.gtest.mk b/build/Android.gtest.mk index 0d759ce085..655c7dd01f 100644 --- a/build/Android.gtest.mk +++ b/build/Android.gtest.mk @@ -86,7 +86,6 @@ ART_TEST_CFLAGS := ifeq ($(ART_USE_PORTABLE_COMPILER),true) ART_TEST_CFLAGS += -DART_USE_PORTABLE_COMPILER=1 endif -ART_TEST_CFLAGS += -DART_DEFAULT_INSTRUCTION_SET_FEATURES=$(DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES) # $(1): target or host # $(2): file name diff --git a/build/Android.oat.mk b/build/Android.oat.mk index 5d355a6d86..f964346dbd 100644 --- a/build/Android.oat.mk +++ b/build/Android.oat.mk @@ -57,9 +57,6 @@ TARGET_CORE_OAT_OUT := $(ART_TEST_OUT)/core.oat HOST_CORE_IMG_OUT := $(HOST_OUT_JAVA_LIBRARIES)/core.art TARGET_CORE_IMG_OUT := $(ART_TEST_OUT)/core.art -# DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES is set in ../build/core/dex_preopt.mk based on -# the TARGET_CPU_VARIANT - TARGET_INSTRUCTION_SET_FEATURES := $(DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES) $(HOST_CORE_IMG_OUT): $(HOST_CORE_DEX_FILES) $(DEX2OAT_DEPENDENCY) diff --git a/dex2oat/dex2oat.cc b/dex2oat/dex2oat.cc index 1472337615..5b0653e00f 100644 --- a/dex2oat/dex2oat.cc +++ b/dex2oat/dex2oat.cc @@ -632,13 +632,9 @@ static int dex2oat(int argc, char** argv) { CompilerBackend compiler_backend = kQuick; #endif - // Take the default set of instruction features from the build if present. + // Take the default set of instruction features from the build. InstructionSetFeatures instruction_set_features = -#ifdef ART_DEFAULT_INSTRUCTION_SET_FEATURES - ParseFeatureList(STRINGIFY(ART_DEFAULT_INSTRUCTION_SET_FEATURES)); -#else - ParseFeatureList("default"); -#endif + ParseFeatureList(STRINGIFY(ART_DEFAULT_INSTRUCTION_SET_FEATURES)); #if defined(__arm__) InstructionSet instruction_set = kThumb2; diff --git a/runtime/common_test.h b/runtime/common_test.h index 79fa680392..643ed1d89d 100644 --- a/runtime/common_test.h +++ b/runtime/common_test.h @@ -423,13 +423,9 @@ class CommonTest : public testing::Test { InstructionSet instruction_set = kNone; - // take the default set of instruction features from the build if present + // Take the default set of instruction features from the build. InstructionSetFeatures instruction_set_features = -#ifdef ART_DEFAULT_INSTRUCTION_SET_FEATURES - ParseFeatureList(STRINGIFY(ART_DEFAULT_INSTRUCTION_SET_FEATURES)); -#else - ParseFeatureList("default"); -#endif + ParseFeatureList(STRINGIFY(ART_DEFAULT_INSTRUCTION_SET_FEATURES)); #if defined(__arm__) instruction_set = kThumb2; |