summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Colin Cross <ccross@android.com> 2016-08-30 13:49:26 -0700
committer Colin Cross <ccross@android.com> 2016-09-08 11:00:53 -0700
commitfe6064ae8b861f1290aa793ce0de219781da6a10 (patch)
treea24da585adbafc5932e4c3aab07f0e1d9a639628
parent090a5da3a7f320b9d2aa9fa461efc11a7eb39392 (diff)
Convert more of art to Android.bp
Relanding I1b10f140e17dd5e12a9d7f6a29d47cf61f5bf6ef, with fixes to compile dalvikvm32 and dalvikvm64, and add them as dependencies of tests. Also fixes HOST_PREFER_32_BIT by moving the override from the defaults, which are not used by everything in art, to the art_cc_binary module type. Test: rm -rf out/host; m -j HOST_PREFER_32_BIT test-art-host; m -j test-art-host Change-Id: I64d3eef5080e128103d052497760c3521cc253c6
-rw-r--r--Android.bp28
-rw-r--r--Android.mk8
-rw-r--r--benchmark/Android.bp43
-rw-r--r--benchmark/Android.mk79
-rw-r--r--build/Android.bp5
-rw-r--r--build/Android.common_path.mk4
-rw-r--r--build/art.go36
-rw-r--r--compiler/Android.bp1
-rw-r--r--dalvikvm/Android.bp63
-rw-r--r--dalvikvm/Android.mk87
-rw-r--r--dexdump/Android.bp26
-rwxr-xr-xdexdump/Android.mk52
-rw-r--r--dexlayout/Android.bp25
-rwxr-xr-xdexlayout/Android.mk50
-rw-r--r--dexlist/Android.bp21
-rwxr-xr-xdexlist/Android.mk52
-rw-r--r--disassembler/Android.bp58
-rw-r--r--disassembler/Android.mk165
-rw-r--r--oatdump/Android.bp79
-rw-r--r--oatdump/Android.mk35
-rw-r--r--runtime/simulator/Android.bp7
-rw-r--r--tools/cpp-define-generator/Android.bp36
-rw-r--r--tools/cpp-define-generator/Android.mk34
-rw-r--r--tools/dmtracedump/Android.bp44
-rw-r--r--tools/dmtracedump/Android.mk32
25 files changed, 457 insertions, 613 deletions
diff --git a/Android.bp b/Android.bp
index 835048d96f..77b9ac3c45 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,6 +1,34 @@
+// TODO: These should be handled with transitive static library dependencies
+art_static_dependencies = [
+ // Note: the order is important because of static linking resolution.
+ "libziparchive",
+ "libnativehelper",
+ "libnativebridge",
+ "libnativeloader",
+ "libsigchain_dummy",
+ "liblog",
+ "libz",
+ "libbacktrace",
+ "libcutils",
+ "libunwindbacktrace",
+ "libutils",
+ "libbase",
+ "liblz4",
+ "liblzma",
+]
+
subdirs = [
+ "benchmark",
"build",
"compiler",
+ "dalvikvm",
+ "dexdump",
+ "dexlayout",
+ "dexlist",
+ "disassembler",
+ "oatdump",
"runtime",
"sigchainlib",
+ "tools/cpp-define-generator",
+ "tools/dmtracedump",
]
diff --git a/Android.mk b/Android.mk
index 4ea169a51d..0ed5d87271 100644
--- a/Android.mk
+++ b/Android.mk
@@ -76,20 +76,13 @@ include $(art_path)/build/Android.cpplint.mk
########################################################################
# product rules
-include $(art_path)/dexdump/Android.mk
-include $(art_path)/dexlayout/Android.mk
-include $(art_path)/dexlist/Android.mk
include $(art_path)/dex2oat/Android.mk
-include $(art_path)/disassembler/Android.mk
-include $(art_path)/oatdump/Android.mk
include $(art_path)/imgdiag/Android.mk
include $(art_path)/patchoat/Android.mk
include $(art_path)/profman/Android.mk
-include $(art_path)/dalvikvm/Android.mk
include $(art_path)/tools/Android.mk
include $(art_path)/tools/ahat/Android.mk
include $(art_path)/tools/dexfuzz/Android.mk
-include $(art_path)/tools/dmtracedump/Android.mk
include $(art_path)/libart_fake/Android.mk
@@ -114,7 +107,6 @@ TEST_ART_TARGET_SYNC_DEPS :=
include $(art_path)/build/Android.common_test.mk
include $(art_path)/build/Android.gtest.mk
include $(art_path)/test/Android.run-test.mk
-include $(art_path)/benchmark/Android.mk
TEST_ART_ADB_ROOT_AND_REMOUNT := \
(adb root && \
diff --git a/benchmark/Android.bp b/benchmark/Android.bp
new file mode 100644
index 0000000000..617f5b0927
--- /dev/null
+++ b/benchmark/Android.bp
@@ -0,0 +1,43 @@
+//
+// Copyright (C) 2015 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.
+//
+
+art_cc_library {
+ name: "libartbenchmark",
+ host_supported: true,
+ defaults: ["art_defaults", "art_debug_defaults"],
+ srcs: [
+ "jobject-benchmark/jobject_benchmark.cc",
+ "jni-perf/perf_jni.cc",
+ "scoped-primitive-array/scoped_primitive_array.cc",
+ ],
+ shared_libs: [
+ "libart",
+ "libbacktrace",
+ "libnativehelper",
+ ],
+ clang: true,
+ target: {
+ android: {
+ shared_libs: ["libdl"],
+ },
+ host: {
+ host_ldlibs: ["-ldl", "-lpthread"],
+ },
+ },
+ cflags: [
+ "-Wno-frame-larger-than=",
+ ],
+}
diff --git a/benchmark/Android.mk b/benchmark/Android.mk
deleted file mode 100644
index 2360bcc007..0000000000
--- a/benchmark/Android.mk
+++ /dev/null
@@ -1,79 +0,0 @@
-#
-# Copyright (C) 2015 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.
-#
-
-LOCAL_PATH := $(call my-dir)
-
-include art/build/Android.common_build.mk
-
-LIBARTBENCHMARK_COMMON_SRC_FILES := \
- jobject-benchmark/jobject_benchmark.cc \
- jni-perf/perf_jni.cc \
- scoped-primitive-array/scoped_primitive_array.cc
-
-# $(1): target or host
-define build-libartbenchmark
- ifneq ($(1),target)
- ifneq ($(1),host)
- $$(error expected target or host for argument 1, received $(1))
- endif
- endif
-
- art_target_or_host := $(1)
-
- include $(CLEAR_VARS)
- LOCAL_CPP_EXTENSION := $(ART_CPP_EXTENSION)
- LOCAL_MODULE := libartbenchmark
- ifeq ($$(art_target_or_host),target)
- LOCAL_MODULE_TAGS := tests
- endif
- LOCAL_SRC_FILES := $(LIBARTBENCHMARK_COMMON_SRC_FILES)
- LOCAL_SHARED_LIBRARIES += libart libbacktrace libnativehelper
- LOCAL_C_INCLUDES += $(ART_C_INCLUDES) art/runtime
- LOCAL_ADDITIONAL_DEPENDENCIES := art/build/Android.common_build.mk
- LOCAL_ADDITIONAL_DEPENDENCIES += $(LOCAL_PATH)/Android.mk
- ifeq ($$(art_target_or_host),target)
- LOCAL_CLANG := $(ART_TARGET_CLANG)
- $(call set-target-local-cflags-vars,debug)
- LOCAL_SHARED_LIBRARIES += libdl
- LOCAL_MULTILIB := both
- # LOCAL_MODULE_PATH_32 := $(ART_TARGET_OUT)/$(ART_TARGET_ARCH_32)
- # LOCAL_MODULE_PATH_64 := $(ART_TARGET_OUT)/$(ART_TARGET_ARCH_64)
- LOCAL_MODULE_TARGET_ARCH := $(ART_SUPPORTED_ARCH)
- include $(BUILD_SHARED_LIBRARY)
- else # host
- LOCAL_CLANG := $(ART_HOST_CLANG)
- LOCAL_CFLAGS := $(ART_HOST_CFLAGS) $(ART_HOST_DEBUG_CFLAGS)
- LOCAL_ASFLAGS := $(ART_HOST_ASFLAGS) $(ART_HOST_DEBUG_ASFLAGS)
- LOCAL_LDLIBS := -ldl -lpthread
- LOCAL_IS_HOST_MODULE := true
- LOCAL_MULTILIB := both
- include $(BUILD_HOST_SHARED_LIBRARY)
- endif
-
- # Clear locally used variables.
- art_target_or_host :=
-endef
-
-ifeq ($(ART_BUILD_TARGET),true)
- $(eval $(call build-libartbenchmark,target))
-endif
-ifeq ($(ART_BUILD_HOST),true)
- $(eval $(call build-libartbenchmark,host))
-endif
-
-# Clear locally used variables.
-LOCAL_PATH :=
-LIBARTBENCHMARK_COMMON_SRC_FILES :=
diff --git a/build/Android.bp b/build/Android.bp
index ed9f3086a2..ec374f252f 100644
--- a/build/Android.bp
+++ b/build/Android.bp
@@ -108,6 +108,11 @@ art_global_defaults {
// clang/libunwind bugs that cause SEGVs in run-test-004-ThreadStress.
"-fno-omit-frame-pointer",
],
+ host_ldlibs: [
+ "-ldl",
+ "-lpthread",
+ "-lrt",
+ ],
},
},
diff --git a/build/Android.common_path.mk b/build/Android.common_path.mk
index 3f25ae12f7..e88d027c7e 100644
--- a/build/Android.common_path.mk
+++ b/build/Android.common_path.mk
@@ -123,7 +123,7 @@ ART_CORE_EXECUTABLES := \
# Depend on the -target or -host phony targets generated by the build system
# for each module
-ART_TARGET_EXECUTABLES :=
+ART_TARGET_EXECUTABLES := dalvikvm-target
ifneq ($(ART_BUILD_TARGET_NDEBUG),false)
ART_TARGET_EXECUTABLES += $(foreach name,$(ART_CORE_EXECUTABLES),$(name)-target)
endif
@@ -131,7 +131,7 @@ ifneq ($(ART_BUILD_TARGET_DEBUG),false)
ART_TARGET_EXECUTABLES += $(foreach name,$(ART_CORE_EXECUTABLES),$(name)d-target)
endif
-ART_HOST_EXECUTABLES :=
+ART_HOST_EXECUTABLES := dalvikvm-host
ifneq ($(ART_BUILD_HOST_NDEBUG),false)
ART_HOST_EXECUTABLES += $(foreach name,$(ART_CORE_EXECUTABLES),$(name)-host)
endif
diff --git a/build/art.go b/build/art.go
index d41b40704f..9cab3b9fc4 100644
--- a/build/art.go
+++ b/build/art.go
@@ -137,38 +137,42 @@ func (a *artGlobalDefaults) CustomizeProperties(ctx android.CustomizePropertiesC
p.Target.Android.Cflags = deviceFlags(ctx)
p.Target.Host.Cflags = hostFlags(ctx)
ctx.AppendProperties(p)
+}
- if envTrue(ctx, "HOST_PREFER_32_BIT") {
+type artGlobalDefaults struct{}
+
+func (a *artCustomLinkerCustomizer) CustomizeProperties(ctx android.CustomizePropertiesContext) {
+ linker := envDefault(ctx, "CUSTOM_TARGET_LINKER", "")
+ if linker != "" {
type props struct {
- Target struct {
- Host struct {
- Compile_multilib string
- }
- }
+ DynamicLinker string
}
p := &props{}
- p.Target.Host.Compile_multilib = "prefer32"
+ p.DynamicLinker = linker
ctx.AppendProperties(p)
}
}
-type artGlobalDefaults struct{}
+type artCustomLinkerCustomizer struct{}
-func (a *artLinkerCustomizer) CustomizeProperties(ctx android.CustomizePropertiesContext) {
- linker := envDefault(ctx, "CUSTOM_TARGET_LINKER", "")
- if linker != "" {
+func (a *artPrefer32BitCustomizer) CustomizeProperties(ctx android.CustomizePropertiesContext) {
+ if envTrue(ctx, "HOST_PREFER_32_BIT") {
type props struct {
- DynamicLinker string
+ Target struct {
+ Host struct {
+ Compile_multilib string
+ }
+ }
}
p := &props{}
- p.DynamicLinker = linker
+ p.Target.Host.Compile_multilib = "prefer32"
ctx.AppendProperties(p)
}
}
-type artLinkerCustomizer struct{}
+type artPrefer32BitCustomizer struct{}
func init() {
soong.RegisterModuleType("art_cc_library", artLibrary)
@@ -200,6 +204,7 @@ func artLibrary() (blueprint.Module, []interface{}) {
c := &codegenCustomizer{}
android.AddCustomizer(library, c)
props = append(props, &c.codegenProperties)
+
return module, props
}
@@ -207,7 +212,8 @@ func artBinary() (blueprint.Module, []interface{}) {
binary, _ := cc.NewBinary(android.HostAndDeviceSupported)
module, props := binary.Init()
- android.AddCustomizer(binary, &artLinkerCustomizer{})
+ android.AddCustomizer(binary, &artCustomLinkerCustomizer{})
+ android.AddCustomizer(binary, &artPrefer32BitCustomizer{})
return module, props
}
diff --git a/compiler/Android.bp b/compiler/Android.bp
index 01432687b5..595a824999 100644
--- a/compiler/Android.bp
+++ b/compiler/Android.bp
@@ -188,6 +188,7 @@ art_cc_defaults {
"liblzma",
],
include_dirs: ["art/disassembler"],
+ export_include_dirs: ["."],
}
gensrcs {
diff --git a/dalvikvm/Android.bp b/dalvikvm/Android.bp
new file mode 100644
index 0000000000..ab645bb94d
--- /dev/null
+++ b/dalvikvm/Android.bp
@@ -0,0 +1,63 @@
+//
+// Copyright (C) 2013 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.
+//
+
+art_cc_binary {
+ name: "dalvikvm",
+ host_supported: true,
+ compile_multilib: "both",
+
+ srcs: ["dalvikvm.cc"],
+ cflags: [
+ "-Wall",
+ "-Werror",
+ "-Wextra",
+ ],
+ include_dirs: ["art/runtime"],
+ shared_libs: [
+ "libnativehelper",
+ ],
+ whole_static_libs: ["libsigchain"],
+ target: {
+ host: {
+ host_ldlibs: [
+ "-ldl",
+ "-lpthread",
+ ],
+ },
+ android: {
+ shared_libs: [
+ "libdl",
+ "liblog",
+ ],
+ ldflags: ["-Wl,--export-dynamic"],
+ },
+ linux: {
+ ldflags: ["-Wl,--export-dynamic"],
+ },
+ },
+
+ multilib: {
+ lib32: {
+ suffix: "32",
+ },
+ lib64: {
+ suffix: "64",
+ },
+ },
+
+ // Create symlink for the primary version target.
+ symlink_preferred_arch: true,
+}
diff --git a/dalvikvm/Android.mk b/dalvikvm/Android.mk
deleted file mode 100644
index 6c0bcb173e..0000000000
--- a/dalvikvm/Android.mk
+++ /dev/null
@@ -1,87 +0,0 @@
-#
-# Copyright (C) 2013 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.
-#
-
-LOCAL_PATH := $(call my-dir)
-
-include art/build/Android.common.mk
-
-dalvikvm_cflags := -Wall -Werror -Wextra
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := dalvikvm
-LOCAL_MODULE_TAGS := optional
-LOCAL_CPP_EXTENSION := cc
-LOCAL_SRC_FILES := dalvikvm.cc
-LOCAL_CFLAGS := $(dalvikvm_cflags)
-LOCAL_C_INCLUDES := art/runtime
-LOCAL_SHARED_LIBRARIES := libdl liblog libnativehelper
-LOCAL_WHOLE_STATIC_LIBRARIES := libsigchain
-LOCAL_LDFLAGS := -Wl,--export-dynamic
-LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
-LOCAL_ADDITIONAL_DEPENDENCIES += art/build/Android.common.mk
-LOCAL_MULTILIB := both
-LOCAL_MODULE_STEM_32 := dalvikvm32
-LOCAL_MODULE_STEM_64 := dalvikvm64
-LOCAL_NATIVE_COVERAGE := $(ART_COVERAGE)
-include $(BUILD_EXECUTABLE)
-
-# Create symlink for the primary version target.
-include $(BUILD_SYSTEM)/executable_prefer_symlink.mk
-
-ART_TARGET_EXECUTABLES += $(TARGET_OUT_EXECUTABLES)/$(LOCAL_MODULE)
-ART_TARGET_EXECUTABLES += $(TARGET_OUT_EXECUTABLES)/$(LOCAL_MODULE)$(ART_PHONY_TEST_TARGET_SUFFIX)
-ifdef 2ND_ART_PHONY_TEST_TARGET_SUFFIX
- ART_TARGET_EXECUTABLES += $(TARGET_OUT_EXECUTABLES)/$(LOCAL_MODULE)$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)
-endif
-
-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_WHOLE_STATIC_LIBRARIES := libsigchain
-LOCAL_LDFLAGS := -ldl -lpthread
-# Mac OS linker doesn't understand --export-dynamic.
-ifneq ($(HOST_OS),darwin)
- LOCAL_LDFLAGS += -Wl,--export-dynamic
-endif
-LOCAL_ADDITIONAL_DEPENDENCIES += $(LOCAL_PATH)/Android.mk
-LOCAL_ADDITIONAL_DEPENDENCIES += art/build/Android.common.mk
-LOCAL_IS_HOST_MODULE := true
-LOCAL_MULTILIB := both
-ifdef ART_MULTILIB_OVERRIDE_host
- LOCAL_MULTILIB := $(ART_MULTILIB_OVERRIDE_host)
-endif
-ifeq ($(LOCAL_MULTILIB),both)
-LOCAL_MODULE_STEM_32 := dalvikvm32
-LOCAL_MODULE_STEM_64 := dalvikvm64
-endif
-LOCAL_NATIVE_COVERAGE := $(ART_COVERAGE)
-include $(BUILD_HOST_EXECUTABLE)
-# Create symlink for the primary version target.
-ifeq ($(LOCAL_MULTILIB),both)
-include $(BUILD_SYSTEM)/executable_prefer_symlink.mk
-
-ART_HOST_EXECUTABLES += $(HOST_OUT_EXECUTABLES)/$(LOCAL_MODULE)$(ART_PHONY_TEST_HOST_SUFFIX)
-ifdef 2ND_ART_PHONY_TEST_HOST_SUFFIX
- ART_HOST_EXECUTABLES += $(HOST_OUT_EXECUTABLES)/$(LOCAL_MODULE)$(2ND_ART_PHONY_TEST_HOST_SUFFIX)
-endif
-endif
-ART_HOST_EXECUTABLES += $(HOST_OUT_EXECUTABLES)/$(LOCAL_MODULE)
diff --git a/dexdump/Android.bp b/dexdump/Android.bp
new file mode 100644
index 0000000000..e77f809d4b
--- /dev/null
+++ b/dexdump/Android.bp
@@ -0,0 +1,26 @@
+// Copyright (C) 2015 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.
+
+// TODO(ajcbik): rename dexdump2 into dexdump when Dalvik version is removed
+
+art_cc_binary {
+ name: "dexdump2",
+ host_supported: true,
+ srcs: [
+ "dexdump_main.cc",
+ "dexdump.cc",
+ ],
+ cflags: ["-Wall"],
+ shared_libs: ["libart"],
+}
diff --git a/dexdump/Android.mk b/dexdump/Android.mk
deleted file mode 100755
index ec2529e18f..0000000000
--- a/dexdump/Android.mk
+++ /dev/null
@@ -1,52 +0,0 @@
-# Copyright (C) 2015 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.
-
-# TODO(ajcbik): Art-i-fy this makefile
-
-# TODO(ajcbik): rename dexdump2 into dexdump when Dalvik version is removed
-
-LOCAL_PATH:= $(call my-dir)
-
-dexdump_src_files := dexdump_main.cc dexdump.cc
-dexdump_c_includes := art/runtime
-dexdump_libraries := libart
-
-##
-## Build the device command line tool dexdump.
-##
-
-ifneq ($(SDK_ONLY),true) # SDK_only doesn't need device version
-include $(CLEAR_VARS)
-LOCAL_CPP_EXTENSION := cc
-LOCAL_SRC_FILES := $(dexdump_src_files)
-LOCAL_C_INCLUDES := $(dexdump_c_includes)
-LOCAL_CFLAGS += -Wall
-LOCAL_SHARED_LIBRARIES += $(dexdump_libraries)
-LOCAL_MODULE := dexdump2
-include $(BUILD_EXECUTABLE)
-endif # !SDK_ONLY
-
-##
-## Build the host command line tool dexdump.
-##
-
-include $(CLEAR_VARS)
-LOCAL_CPP_EXTENSION := cc
-LOCAL_SRC_FILES := $(dexdump_src_files)
-LOCAL_C_INCLUDES := $(dexdump_c_includes)
-LOCAL_CFLAGS += -Wall
-LOCAL_SHARED_LIBRARIES += $(dexdump_libraries)
-LOCAL_MODULE := dexdump2
-LOCAL_MULTILIB := $(ART_MULTILIB_OVERRIDE_host)
-include $(BUILD_HOST_EXECUTABLE)
diff --git a/dexlayout/Android.bp b/dexlayout/Android.bp
new file mode 100644
index 0000000000..852f6c27a4
--- /dev/null
+++ b/dexlayout/Android.bp
@@ -0,0 +1,25 @@
+// Copyright (C) 2016 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.
+
+art_cc_binary {
+ name: "dexlayout",
+ host_supported: true,
+ srcs: [
+ "dexlayout_main.cc",
+ "dexlayout.cc",
+ "dex_ir_builder.cc",
+ ],
+ cflags: ["-Wall"],
+ shared_libs: ["libart"],
+}
diff --git a/dexlayout/Android.mk b/dexlayout/Android.mk
deleted file mode 100755
index de02580bf6..0000000000
--- a/dexlayout/Android.mk
+++ /dev/null
@@ -1,50 +0,0 @@
-# Copyright (C) 2016 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.
-
-# TODO(sehr): Art-i-fy this makefile
-
-LOCAL_PATH:= $(call my-dir)
-
-dexlayout_src_files := dexlayout_main.cc dexlayout.cc dex_ir_builder.cc
-dexlayout_c_includes := art/runtime
-dexlayout_libraries := libart
-
-##
-## Build the device command line tool dexlayout.
-##
-
-ifneq ($(SDK_ONLY),true) # SDK_only doesn't need device version
-include $(CLEAR_VARS)
-LOCAL_CPP_EXTENSION := cc
-LOCAL_SRC_FILES := $(dexlayout_src_files)
-LOCAL_C_INCLUDES := $(dexlayout_c_includes)
-LOCAL_CFLAGS += -Wall
-LOCAL_SHARED_LIBRARIES += $(dexlayout_libraries)
-LOCAL_MODULE := dexlayout
-include $(BUILD_EXECUTABLE)
-endif # !SDK_ONLY
-
-##
-## Build the host command line tool dexlayout.
-##
-
-include $(CLEAR_VARS)
-LOCAL_CPP_EXTENSION := cc
-LOCAL_SRC_FILES := $(dexlayout_src_files)
-LOCAL_C_INCLUDES := $(dexlayout_c_includes)
-LOCAL_CFLAGS += -Wall
-LOCAL_SHARED_LIBRARIES += $(dexlayout_libraries)
-LOCAL_MODULE := dexlayout
-LOCAL_MULTILIB := $(ART_MULTILIB_OVERRIDE_host)
-include $(BUILD_HOST_EXECUTABLE)
diff --git a/dexlist/Android.bp b/dexlist/Android.bp
new file mode 100644
index 0000000000..8e3c91d378
--- /dev/null
+++ b/dexlist/Android.bp
@@ -0,0 +1,21 @@
+// Copyright (C) 2015 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.
+
+art_cc_binary {
+ name: "dexlist",
+ host_supported: true,
+ srcs: ["dexlist.cc"],
+ cflags: ["-Wall"],
+ shared_libs: ["libart"],
+}
diff --git a/dexlist/Android.mk b/dexlist/Android.mk
deleted file mode 100755
index 6ec6c97dce..0000000000
--- a/dexlist/Android.mk
+++ /dev/null
@@ -1,52 +0,0 @@
-# Copyright (C) 2015 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.
-
-# TODO(ajcbik): Art-i-fy this makefile
-
-LOCAL_PATH:= $(call my-dir)
-
-dexlist_src_files := dexlist.cc
-dexlist_c_includes := art/runtime
-dexlist_libraries := libart
-
-##
-## Build the device command line tool dexlist.
-##
-
-ifneq ($(SDK_ONLY),true) # SDK_only doesn't need device version
-include $(CLEAR_VARS)
-LOCAL_CPP_EXTENSION := cc
-LOCAL_SRC_FILES := $(dexlist_src_files)
-LOCAL_C_INCLUDES := $(dexlist_c_includes)
-LOCAL_CFLAGS += -Wall
-LOCAL_SHARED_LIBRARIES += $(dexlist_libraries)
-LOCAL_MODULE := dexlist
-LOCAL_MODULE_TAGS := optional
-LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)
-include $(BUILD_EXECUTABLE)
-endif # !SDK_ONLY
-
-##
-## Build the host command line tool dexlist.
-##
-
-include $(CLEAR_VARS)
-LOCAL_CPP_EXTENSION := cc
-LOCAL_SRC_FILES := $(dexlist_src_files)
-LOCAL_C_INCLUDES := $(dexlist_c_includes)
-LOCAL_CFLAGS += -Wall
-LOCAL_SHARED_LIBRARIES += $(dexlist_libraries)
-LOCAL_MODULE := dexlist
-LOCAL_MULTILIB := $(ART_MULTILIB_OVERRIDE_host)
-include $(BUILD_HOST_EXECUTABLE)
diff --git a/disassembler/Android.bp b/disassembler/Android.bp
new file mode 100644
index 0000000000..d06e4de9b6
--- /dev/null
+++ b/disassembler/Android.bp
@@ -0,0 +1,58 @@
+//
+// Copyright (C) 2012 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.
+//
+
+art_cc_defaults {
+ name: "libart-disassembler-defaults",
+ defaults: ["art_defaults"],
+ host_supported: true,
+ clang: true,
+ srcs: [
+ "disassembler.cc",
+ "disassembler_arm.cc",
+ "disassembler_arm64.cc",
+ "disassembler_mips.cc",
+ "disassembler_x86.cc",
+ ],
+
+ shared_libs: [
+ "liblog",
+ "libbase",
+ ],
+ export_include_dirs: ["."],
+}
+
+art_cc_library {
+ name: "libart-disassembler",
+ defaults: ["libart-disassembler-defaults"],
+ shared_libs: [
+ "libart",
+ // For disassembler_arm64.
+ "libvixld-arm64",
+ ],
+}
+
+art_cc_library {
+ name: "libartd-disassembler",
+ defaults: [
+ "libart-disassembler-defaults",
+ "art_debug_defaults",
+ ],
+ shared_libs: [
+ "libartd",
+ // For disassembler_arm64.
+ "libvixld-arm64",
+ ],
+}
diff --git a/disassembler/Android.mk b/disassembler/Android.mk
deleted file mode 100644
index 6304c57e3e..0000000000
--- a/disassembler/Android.mk
+++ /dev/null
@@ -1,165 +0,0 @@
-#
-# Copyright (C) 2012 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.
-#
-
-LOCAL_PATH := $(call my-dir)
-
-include art/build/Android.common_build.mk
-
-LIBART_DISASSEMBLER_SRC_FILES := \
- disassembler.cc \
- disassembler_arm.cc \
- disassembler_arm64.cc \
- disassembler_mips.cc \
- disassembler_x86.cc
-
-# $(1): target or host
-# $(2): ndebug or debug
-# $(3): static or shared (static is only valid for host)
-define build-libart-disassembler
- ifneq ($(1),target)
- ifneq ($(1),host)
- $$(error expected target or host for argument 1, received $(1))
- endif
- endif
- ifneq ($(2),ndebug)
- ifneq ($(2),debug)
- $$(error expected ndebug or debug for argument 2, received $(2))
- endif
- endif
- ifeq ($(3),static)
- ifneq ($(1),host)
- $$(error received static for argument 3, but argument 1 is not host)
- endif
- else
- ifneq ($(3),shared)
- $$(error expected static or shared for argument 3, received $(3))
- endif
- endif
-
- art_target_or_host := $(1)
- art_ndebug_or_debug := $(2)
- art_static_or_shared := $(3)
-
- include $(CLEAR_VARS)
- ifeq ($$(art_target_or_host),host)
- LOCAL_IS_HOST_MODULE := true
- endif
- LOCAL_CPP_EXTENSION := $(ART_CPP_EXTENSION)
- ifeq ($$(art_ndebug_or_debug),ndebug)
- LOCAL_MODULE := libart-disassembler
- else # debug
- LOCAL_MODULE := libartd-disassembler
- endif
-
- LOCAL_MODULE_TAGS := optional
- ifeq ($$(art_static_or_shared),static)
- LOCAL_MODULE_CLASS := STATIC_LIBRARIES
- else # shared
- LOCAL_MODULE_CLASS := SHARED_LIBRARIES
- endif
-
- LOCAL_SRC_FILES := $$(LIBART_DISASSEMBLER_SRC_FILES)
-
- ifeq ($$(art_target_or_host),target)
- LOCAL_CLANG := $(ART_TARGET_CLANG)
- $(call set-target-local-cflags-vars,$(2))
- else # host
- LOCAL_CLANG := $(ART_HOST_CLANG)
- LOCAL_CFLAGS += $(ART_HOST_CFLAGS)
- LOCAL_ASFLAGS += $(ART_HOST_ASFLAGS)
- ifeq ($$(art_ndebug_or_debug),debug)
- LOCAL_CFLAGS += $(ART_HOST_DEBUG_CFLAGS)
- LOCAL_ASFLAGS += $(ART_HOST_DEBUG_ASFLAGS)
- else
- LOCAL_CFLAGS += $(ART_HOST_NON_DEBUG_CFLAGS)
- LOCAL_ASFLAGS += $(ART_HOST_NON_DEBUG_ASFLAGS)
- endif
- endif
-
- ifeq ($$(art_static_or_shared),static)
- LOCAL_STATIC_LIBRARIES += liblog libbase
- ifeq ($$(art_ndebug_or_debug),debug)
- LOCAL_STATIC_LIBRARIES += libartd
- else
- LOCAL_STATIC_LIBRARIES += libart
- endif
- else # shared
- LOCAL_SHARED_LIBRARIES += liblog libbase
- ifeq ($$(art_ndebug_or_debug),debug)
- LOCAL_SHARED_LIBRARIES += libartd
- else
- LOCAL_SHARED_LIBRARIES += libart
- endif
- endif
-
- LOCAL_C_INCLUDES += $(ART_C_INCLUDES) art/runtime
- LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
- LOCAL_MULTILIB := both
-
- LOCAL_ADDITIONAL_DEPENDENCIES := art/build/Android.common_build.mk
- LOCAL_ADDITIONAL_DEPENDENCIES += $(LOCAL_PATH)/Android.mk
- LOCAL_NATIVE_COVERAGE := $(ART_COVERAGE)
- # For disassembler_arm64.
- ifeq ($$(art_static_or_shared),static)
- ifeq ($$(art_ndebug_or_debug),debug)
- LOCAL_STATIC_LIBRARIES += libvixld-arm64
- else
- LOCAL_STATIC_LIBRARIES += libvixl-arm64
- endif
- ifeq ($$(art_target_or_host),target)
- $$(error libart-disassembler static builds for target are not supported)
- else # host
- include $(BUILD_HOST_STATIC_LIBRARY)
- endif
- else # shared
- ifeq ($$(art_ndebug_or_debug),debug)
- LOCAL_SHARED_LIBRARIES += libvixld-arm64
- else
- LOCAL_SHARED_LIBRARIES += libvixl-arm64
- endif
- ifeq ($$(art_target_or_host),target)
- include $(BUILD_SHARED_LIBRARY)
- else # host
- include $(BUILD_HOST_SHARED_LIBRARY)
- endif
- endif
-
- # Clear out local variables now that we're done with them.
- art_target_or_host :=
- art_ndebug_or_debug :=
- art_static_or_shared :=
-endef
-
-ifeq ($(ART_BUILD_TARGET_NDEBUG),true)
- $(eval $(call build-libart-disassembler,target,ndebug,shared))
-endif
-ifeq ($(ART_BUILD_TARGET_DEBUG),true)
- $(eval $(call build-libart-disassembler,target,debug,shared))
-endif
-# We always build dex2oat and dependencies, even if the host build is
-# otherwise disabled, since they are used to cross compile for the target.
-ifeq ($(ART_BUILD_HOST_NDEBUG),true)
- $(eval $(call build-libart-disassembler,host,ndebug,shared))
- ifeq ($(ART_BUILD_HOST_STATIC),true)
- $(eval $(call build-libart-disassembler,host,ndebug,static))
- endif
-endif
-ifeq ($(ART_BUILD_HOST_DEBUG),true)
- $(eval $(call build-libart-disassembler,host,debug,shared))
- ifeq ($(ART_BUILD_HOST_STATIC),true)
- $(eval $(call build-libart-disassembler,host,debug,static))
- endif
-endif
diff --git a/oatdump/Android.bp b/oatdump/Android.bp
new file mode 100644
index 0000000000..169822c097
--- /dev/null
+++ b/oatdump/Android.bp
@@ -0,0 +1,79 @@
+//
+// Copyright (C) 2011 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.
+//
+
+cc_defaults {
+ name: "oatdump-defaults",
+ defaults: ["art_defaults"],
+ host_supported: true,
+ srcs: ["oatdump.cc"],
+ target: {
+ android: {
+ shared_libs: ["libcutils"],
+ },
+ },
+ include_dirs: ["art/cmdline"],
+}
+
+art_cc_binary {
+ name: "oatdump",
+ defaults: ["oatdump-defaults"],
+ shared_libs: [
+ "libart",
+ "libart-compiler",
+ "libart-disassembler",
+ ],
+}
+
+art_cc_binary {
+ name: "oatdumpd",
+ defaults: [
+ "art_debug_defaults",
+ "oatdump-defaults",
+ ],
+ shared_libs: [
+ "libartd",
+ "libartd-compiler",
+ "libartd-disassembler",
+ ],
+}
+
+art_cc_binary {
+ name: "oatdumps",
+ defaults: ["oatdump-defaults"],
+ static_libs: [
+ "libart",
+ "libart-compiler",
+ "libart-disassembler",
+ "libvixl-arm",
+ "libvixl-arm64",
+ ] + art_static_dependencies,
+}
+
+art_cc_binary {
+ name: "oatdumpds",
+ defaults: [
+ "art_debug_defaults",
+ "oatdump-defaults",
+ ],
+ static_libs: [
+ "libartd",
+ "libartd-compiler",
+ "libartd-disassembler",
+ "libvixld-arm",
+ "libvixld-arm64",
+ ] + art_static_dependencies,
+}
+
diff --git a/oatdump/Android.mk b/oatdump/Android.mk
index 4b37c6a26a..7be8a8da0e 100644
--- a/oatdump/Android.mk
+++ b/oatdump/Android.mk
@@ -16,41 +16,6 @@
LOCAL_PATH := $(call my-dir)
-include art/build/Android.executable.mk
-
-OATDUMP_SRC_FILES := \
- oatdump.cc
-
-# Build variants {target,host} x {debug,ndebug}
-$(eval $(call build-art-multi-executable,oatdump,$(OATDUMP_SRC_FILES),libart-compiler libart-disassembler,libcutils,,art/compiler art/disassembler))
-
-# Static variants (only for host).
-ifeq ($(ART_BUILD_HOST_STATIC),true)
- ifeq ($(HOST_PREFER_32_BIT),true)
- # We need to explicitly restrict the host arch to 32-bit only, as
- # giving 'both' would make build-art-executable generate a build
- # rule for a 64-bit oatdump executable too.
- oatdump_host_arch := 32
- else
- oatdump_host_arch := both
- endif
-
- ifeq ($(ART_BUILD_HOST_NDEBUG),true)
- $(eval $(call build-art-executable,oatdump,$(OATDUMP_SRC_FILES),libart libart-compiler libart-disassembler libvixl-arm64 $(ART_STATIC_DEPENDENCIES),art/compiler art/disassembler,host,ndebug,$(oatdump_host_arch),static))
- endif
- ifeq ($(ART_BUILD_HOST_DEBUG),true)
- $(eval $(call build-art-executable,oatdump,$(OATDUMP_SRC_FILES),libartd libartd-compiler libartd-disassembler libvixld-arm64 $(ART_STATIC_DEPENDENCIES),art/compiler art/disassembler,host,debug,$(oatdump_host_arch),static))
- endif
-
- # Clear locals now they've served their purpose.
- oatdump_host_arch :=
-endif
-
-########################################################################
-# oatdump targets
-
-ART_DUMP_OAT_PATH ?= $(OUT_DIR)
-
OATDUMP := $(HOST_OUT_EXECUTABLES)/oatdump$(HOST_EXECUTABLE_SUFFIX)
OATDUMPD := $(HOST_OUT_EXECUTABLES)/oatdumpd$(HOST_EXECUTABLE_SUFFIX)
# TODO: for now, override with debug version for better error reporting
diff --git a/runtime/simulator/Android.bp b/runtime/simulator/Android.bp
index ec0b49e1bf..49322fcfb8 100644
--- a/runtime/simulator/Android.bp
+++ b/runtime/simulator/Android.bp
@@ -16,6 +16,9 @@
cc_defaults {
name: "libart_simulator_defaults",
+ host_supported: true,
+ device_supported: false,
+
defaults: ["art_defaults"],
srcs: [
"code_simulator.cc",
@@ -29,7 +32,7 @@ cc_defaults {
include_dirs: ["art/runtime"],
}
-cc_library_host_shared {
+art_cc_library {
name: "libart-simulator",
defaults: ["libart_simulator_defaults"],
shared_libs: [
@@ -38,7 +41,7 @@ cc_library_host_shared {
],
}
-cc_library_host_shared {
+art_cc_library {
name: "libartd-simulator",
defaults: [
"art_debug_defaults",
diff --git a/tools/cpp-define-generator/Android.bp b/tools/cpp-define-generator/Android.bp
new file mode 100644
index 0000000000..d792e906ef
--- /dev/null
+++ b/tools/cpp-define-generator/Android.bp
@@ -0,0 +1,36 @@
+//
+// 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.
+//
+
+// Build a "data" binary which will hold all the symbol values that will be parsed by the other scripts.
+//
+// Builds are for host only, target-specific define generation is possibly but is trickier and would need extra tooling.
+//
+// In the future we may wish to parameterize this on (32,64)x(read_barrier,no_read_barrier).
+
+art_cc_binary {
+ name: "cpp-define-generator-data",
+ host_supported: true,
+ device_supported: false,
+ defaults: [
+ "art_debug_defaults",
+ "art_defaults",
+ ],
+ include_dirs: ["art/runtime"],
+ srcs: ["main.cc"],
+ shared_libs: [
+ "libbase",
+ ],
+}
diff --git a/tools/cpp-define-generator/Android.mk b/tools/cpp-define-generator/Android.mk
deleted file mode 100644
index 6ba643cd81..0000000000
--- a/tools/cpp-define-generator/Android.mk
+++ /dev/null
@@ -1,34 +0,0 @@
-#
-# 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.
-#
-
-LOCAL_PATH := $(call my-dir)
-
-include art/build/Android.executable.mk
-
-CPP_DEFINE_GENERATOR_SRC_FILES := \
- main.cc
-
-CPP_DEFINE_GENERATOR_EXTRA_SHARED_LIBRARIES :=
-CPP_DEFINE_GENERATOR_EXTRA_INCLUDE :=
-CPP_DEFINE_GENERATOR_MULTILIB :=
-
-# Build a "data" binary which will hold all the symbol values that will be parsed by the other scripts.
-#
-# Builds are for host only, target-specific define generation is possibly but is trickier and would need extra tooling.
-#
-# In the future we may wish to parameterize this on (32,64)x(read_barrier,no_read_barrier).
-$(eval $(call build-art-executable,cpp-define-generator-data,$(CPP_DEFINE_GENERATOR_SRC_FILES),$(CPP_DEFINE_GENERATOR_EXTRA_SHARED_LIBRARIES),$(CPP_DEFINE_GENERATOR_EXTRA_INCLUDE),host,debug,$(CPP_DEFINE_GENERATOR_MULTILIB),shared))
-
diff --git a/tools/dmtracedump/Android.bp b/tools/dmtracedump/Android.bp
new file mode 100644
index 0000000000..4f942bd202
--- /dev/null
+++ b/tools/dmtracedump/Android.bp
@@ -0,0 +1,44 @@
+// Copyright (C) 2015 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.
+
+// Java method trace dump tool
+
+art_cc_binary {
+ name: "dmtracedump",
+ host_supported: true,
+ device_supported: false,
+ srcs: ["tracedump.cc"],
+ cflags: [
+ "-O0",
+ "-g",
+ "-Wall",
+ ],
+ target: {
+ windows: {
+ enabled: true,
+ },
+ },
+}
+
+art_cc_binary {
+ name: "create_test_dmtrace",
+ host_supported: true,
+ device_supported: false,
+ srcs: ["createtesttrace.cc"],
+ cflags: [
+ "-O0",
+ "-g",
+ "-Wall",
+ ],
+}
diff --git a/tools/dmtracedump/Android.mk b/tools/dmtracedump/Android.mk
deleted file mode 100644
index da0d632850..0000000000
--- a/tools/dmtracedump/Android.mk
+++ /dev/null
@@ -1,32 +0,0 @@
-# Copyright (C) 2015 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.
-
-# Java method trace dump tool
-
-LOCAL_PATH:= $(call my-dir)
-
-include $(CLEAR_VARS)
-LOCAL_CPP_EXTENSION := cc
-LOCAL_SRC_FILES := tracedump.cc
-LOCAL_CFLAGS += -O0 -g -Wall
-LOCAL_MODULE_HOST_OS := darwin linux windows
-LOCAL_MODULE := dmtracedump
-include $(BUILD_HOST_EXECUTABLE)
-
-include $(CLEAR_VARS)
-LOCAL_CPP_EXTENSION := cc
-LOCAL_SRC_FILES := createtesttrace.cc
-LOCAL_CFLAGS += -O0 -g -Wall
-LOCAL_MODULE := create_test_dmtrace
-include $(BUILD_HOST_EXECUTABLE)