# limitations under the License.
#
+LOCAL_ADDITIONAL_DEPENDENCIES += art/build/Android.libcxx.mk
+
ifneq ($(LOCAL_IS_HOST_MODULE),true)
include external/stlport/libstlport.mk
+ LOCAL_CFLAGS += -DART_WITH_STLPORT=1
# include external/libcxx/libcxx.mk
endif
#include "instruction_set.h"
#include "utils.h"
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
namespace llvm {
class Function;
#define ART_COMPILER_DEX_LOCAL_VALUE_NUMBERING_H_
#include "compiler_internals.h"
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
#include "utils/scoped_arena_allocator.h"
#include "utils/scoped_arena_containers.h"
#include "dex/quick/dex_file_method_inliner.h"
#include "dex/quick/dex_file_to_method_inliner_map.h"
#include "driver/compiler_options.h"
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
#include "utils/scoped_arena_containers.h"
namespace art {
#include "mirror/dex_cache-inl.h"
#include "mirror/object.h"
#include "mirror/object-inl.h"
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
#include "verifier/dex_gc_map.h"
#include "verifier/method_verifier.h"
#include "verifier/method_verifier-inl.h"
#include <stdint.h>
#include <stdio.h>
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
#include "class_linker.h"
#include "common_compiler_test.h"
#include "dex_file.h"
#include "base/stringprintf.h"
#include "elf_file.h"
#include "elf_writer.h"
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
namespace art {
#include <sys/types.h>
#include <vector>
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
#include "base/logging.h"
#include "elf_file.h"
#include "elf_utils.h"
#include "elf_writer.h"
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
#include "safe_map.h"
namespace mcld {
#include "lock_word.h"
#include "mirror/object-inl.h"
#include "signal_catcher.h"
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
#include "utils.h"
#include "vector_output_stream.h"
#include "runtime.h"
#include "scoped_thread_state_change.h"
#include "handle_scope-inl.h"
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
#include "utils.h"
using ::art::mirror::ArtField;
#include "os.h"
#include "safe_map.h"
#include "gc/space/space.h"
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
namespace art {
#include "ScopedLocalRef.h"
#include "scoped_thread_state_change.h"
#include "thread.h"
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
extern "C" JNIEXPORT jint JNICALL Java_MyClassNatives_bar(JNIEnv*, jobject, jint count) {
return count + 1;
#include "utils/mips/managed_register_mips.h"
#include "utils/x86/managed_register_x86.h"
#include "thread.h"
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
#define __ jni_asm->
#include "oat.h"
#include "mirror/class.h"
#include "safe_map.h"
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
namespace art {
#include "utils/assembler.h"
#include "offsets.h"
#include "utils.h"
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
#include "a64/macro-assembler-a64.h"
#include "a64/disasm-a64.h"
LOCAL_PATH := $(call my-dir)
-dalvikvm_cflags := -Wall -Werror -Wextra
+dalvikvm_cflags := -Wall -Werror -Wextra -std=gnu++11
include $(CLEAR_VARS)
LOCAL_MODULE := dalvikvm
LOCAL_CPP_EXTENSION := cc
LOCAL_SRC_FILES := dalvikvm.cc
LOCAL_CFLAGS := $(dalvikvm_cflags)
+LOCAL_C_INCLUDES := art/runtime
LOCAL_SHARED_LIBRARIES := libdl libnativehelper
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
LOCAL_MULTILIB := both
include $(CLEAR_VARS)
LOCAL_MODULE := dalvikvm
LOCAL_MODULE_TAGS := optional
+LOCAL_CLANG := true
LOCAL_CPP_EXTENSION := cc
LOCAL_SRC_FILES := dalvikvm.cc
LOCAL_CFLAGS := $(dalvikvm_cflags)
+LOCAL_C_INCLUDES := art/runtime
LOCAL_SHARED_LIBRARIES := libnativehelper
LOCAL_LDFLAGS := -ldl -lpthread
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
#include "JniInvocation.h"
#include "ScopedLocalRef.h"
#include "toStringArray.h"
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
namespace art {
--- /dev/null
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ART_RUNTIME_UNIQUEPTRCOMPAT_H_
+#define ART_RUNTIME_UNIQUEPTRCOMPAT_H_
+
+// Stlport doesn't declare std::unique_ptr. UniquePtr.h declares an incompatible std::swap
+// prototype with libc++. This compatibility header file resolves differences between the two, in
+// the future UniquePtr will become std::unique_ptr.
+
+#ifdef ART_WITH_STLPORT
+
+#include "UniquePtr.h"
+
+#else // ART_WITH_STLPORT
+
+#include <memory>
+
+template <typename T>
+using UniquePtr = typename std::unique_ptr<T>;
+
+#endif // ART_WITH_STLPORT
+
+#endif // ART_RUNTIME_UNIQUEPTRCOMPAT_H_
#define ART_RUNTIME_BARRIER_H_
#include "base/mutex.h"
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
namespace art {
#include "common_runtime_test.h"
#include "mirror/object_array-inl.h"
#include "thread_pool.h"
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
namespace art {
class CheckWaitTask : public Task {
* limitations under the License.
*/
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
#include "bit_vector.h"
#include "gtest/gtest.h"
#include "gtest/gtest.h"
#include "histogram-inl.h"
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
#include <sstream>
#include "base/mutex.h"
#include "runtime.h"
#include "thread-inl.h"
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
#include "utils.h"
namespace art {
#include <vector>
#include "base/macros.h"
#include "log_severity.h"
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
#define CHECK(x) \
if (UNLIKELY(!(x))) \
#include <string>
#include "common_runtime_test.h"
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
namespace unix_file {
#include "scoped_thread_state_change.h"
#include "handle_scope-inl.h"
#include "thread.h"
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
#include "utils.h"
#include "verifier/method_verifier.h"
#include "well_known_classes.h"
#include <string>
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
#include "class_linker-inl.h"
#include "common_runtime_test.h"
#include "dex_file.h"
#include "ScopedLocalRef.h"
#include "thread.h"
#include "utils.h"
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
#include "verifier/method_verifier.h"
#include "verifier/method_verifier-inl.h"
#include "well_known_classes.h"
#include "ScopedFd.h"
#include "handle_scope-inl.h"
#include "thread.h"
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
#include "utf-inl.h"
#include "utils.h"
#include "well_known_classes.h"
#include "mem_map.h"
#include "modifiers.h"
#include "safe_map.h"
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
namespace art {
#include "dex_file.h"
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
#include "common_runtime_test.h"
namespace art {
#include "dex_file-inl.h"
#include "leb128.h"
#include "safe_map.h"
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
#include "utf-inl.h"
#include "utils.h"
#include <iostream>
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
#include "gtest/gtest.h"
namespace art {
#include "elf_utils.h"
#include "mem_map.h"
#include "os.h"
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
namespace art {
#include "scoped_thread_state_change.h"
#include "handle_scope-inl.h"
#include "thread.h"
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
#include "vmap_table.h"
namespace art {
#include "atomic.h"
#include "base/logging.h"
#include "base/macros.h"
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
#include "mem_map.h"
#include "utils.h"
#include "base/mutex.h"
#include "globals.h"
#include "mem_map.h"
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
namespace art {
#include "mirror/object_array-inl.h"
#include "space_bitmap-inl.h"
#include "thread.h"
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
using ::art::mirror::Object;
#include "mirror/object_array-inl.h"
#include "space_bitmap-inl.h"
#include "thread.h"
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
namespace art {
namespace gc {
#include "mirror/object_array-inl.h"
#include "object_utils.h"
#include "space_bitmap-inl.h"
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
#include "utils.h"
namespace art {
#include "globals.h"
#include "mem_map.h"
#include "object_callbacks.h"
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
#include <limits.h>
#include <set>
#include "common_runtime_test.h"
#include "globals.h"
#include "space_bitmap-inl.h"
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
namespace art {
namespace gc {
#include "base/logging.h"
#include "globals.h"
#include "mem_map.h"
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
#include "utils.h"
// Ensure we have an unordered_set until we have worked out C++ library issues.
#include "immune_region.h"
#include "object_callbacks.h"
#include "offsets.h"
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
namespace art {
#include "immune_region.h"
#include "object_callbacks.h"
#include "offsets.h"
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
namespace art {
#include "scoped_thread_state_change.h"
#include "handle_scope-inl.h"
#include "thread_list.h"
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
#include "well_known_classes.h"
namespace art {
#include "base/logging.h"
#include "base/mutex-inl.h"
#include "base/stl_util.h"
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
#include "image.h"
#include "os.h"
#include "space-inl.h"
#include <string>
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
#include "base/macros.h"
#include "base/mutex.h"
#include "gc/accounting/space_bitmap.h"
#include "common_runtime_test.h"
#include "globals.h"
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
#include "mirror/array-inl.h"
#include "mirror/object-inl.h"
#include "mirror/object-inl.h"
#include "mirror/string.h"
#include "thread.h"
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
#include "utf.h"
namespace art {
#include "jdwp/jdwp_priv.h"
#include "runtime.h"
#include "thread-inl.h"
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
namespace art {
#include "ScopedLocalRef.h"
#include "thread.h"
#include "utf.h"
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
#include "well_known_classes.h"
namespace art {
#include <inttypes.h>
#include <backtrace/BacktraceMap.h>
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
#include "base/stringprintf.h"
#include "ScopedFd.h"
#include "utils.h"
#include "mem_map.h"
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
#include "gtest/gtest.h"
namespace art {
#include "object_array-inl.h"
#include "handle_scope-inl.h"
#include "string-inl.h"
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
namespace art {
namespace mirror {
#include "base/logging.h"
#include "base/unix_file/fd_file.h"
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
namespace art {
#include "parsed_options.h"
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
#include "common_runtime_test.h"
namespace art {
#include "instrumentation.h"
#include "os.h"
#include "safe_map.h"
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
namespace art {
#include "trace.h"
#include "transaction.h"
#include "profiler.h"
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
#include "verifier/method_verifier.h"
#include "well_known_classes.h"
#include "stack.h"
#include "thread_state.h"
#include "throw_location.h"
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
namespace art {
#include "instrumentation.h"
#include "os.h"
#include "safe_map.h"
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
namespace art {
#include <unistd.h>
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
#include "base/stl_util.h"
#include "base/unix_file/fd_file.h"
#include "dex_file-inl.h"
#include "reg_type_cache-inl.h"
#include "register_line.h"
#include "safe_map.h"
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
namespace art {
#include <stdio.h>
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
#include "class_linker.h"
#include "common_runtime_test.h"
#include "dex_file.h"
#include "dex_instruction.h"
#include "reg_type.h"
#include "safe_map.h"
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
namespace art {
namespace verifier {
#include "base/stringprintf.h"
#include "base/unix_file/fd_file.h"
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
namespace art {
#include "mem_map.h"
#include "os.h"
#include "safe_map.h"
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
namespace art {
#include <sys/types.h>
#include <zlib.h>
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
#include "common_runtime_test.h"
#include "os.h"
#include <stdio.h>
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
#include "class_linker.h"
#include "dex_file-inl.h"
#include "gc_map.h"
#include <stdio.h>
-#include "UniquePtr.h"
+#include "UniquePtrCompat.h"
#include "class_linker.h"
#include "gc_map.h"
#include "mirror/art_method.h"