From: Dan Willemsen Date: Mon, 6 Jun 2016 21:41:32 +0000 (-0700) Subject: Switch some build tools to Soong X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=56eb2f9f5455f0d43c710d75f45e47769b12c3a2;p=android-x86%2Fbuild.git Switch some build tools to Soong In preparation for including them in prebuilts/build-tools. acp: We use a prebuilt in prebuilts/sdk, but it's not part of the sdk. ijar: We use the host libstdc++ to workaround the lack of libc++ on some unbundled branches. ziptime: We disable this on unbundled builds, due to the lack of libc++. Change-Id: Ib9766b1dbddd151c38ff27c529865200ab37fce1 --- diff --git a/libs/host/Android.bp b/libs/host/Android.bp new file mode 100644 index 000000000..e5a5ecf37 --- /dev/null +++ b/libs/host/Android.bp @@ -0,0 +1,20 @@ +cc_library_host_static { + + srcs: ["CopyFile.c"], + + cflags: [ + "-Werror", + "-Wall", + ], + + name: "libhost", + target: { + windows: { + enabled: true, + }, + }, + local_include_dirs: ["include"], + export_include_dirs: ["include"], + stl: "none", + +} diff --git a/libs/host/Android.mk b/libs/host/Android.mk deleted file mode 100644 index 5e6a29120..000000000 --- a/libs/host/Android.mk +++ /dev/null @@ -1,18 +0,0 @@ -LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_SRC_FILES:= \ - CopyFile.c - -LOCAL_CFLAGS := -Werror -Wall - -LOCAL_MODULE:= libhost -LOCAL_MODULE_HOST_OS := darwin linux windows -LOCAL_C_INCLUDES := $(LOCAL_PATH)/include -LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include -LOCAL_CXX_STL := none - -include $(BUILD_HOST_STATIC_LIBRARY) - -# Include toolchain prebuilt modules if they exist. --include $(TARGET_TOOLCHAIN_ROOT)/toolchain.mk diff --git a/tools/acp/Android.bp b/tools/acp/Android.bp new file mode 100644 index 000000000..faf2034e3 --- /dev/null +++ b/tools/acp/Android.bp @@ -0,0 +1,13 @@ +// Copyright 2005 The Android Open Source Project +// +// Custom version of cp. + +cc_binary_host { + + srcs: ["acp.c"], + + static_libs: ["libhost"], + name: "acp", + stl: "none", + +} diff --git a/tools/acp/Android.mk b/tools/acp/Android.mk deleted file mode 100644 index 56aac141d..000000000 --- a/tools/acp/Android.mk +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright 2005 The Android Open Source Project -# -# Custom version of cp. - -LOCAL_PATH:= $(call my-dir) - -include $(CLEAR_VARS) - -LOCAL_SRC_FILES := \ - acp.c - -LOCAL_STATIC_LIBRARIES := libhost -LOCAL_MODULE := acp -LOCAL_CXX_STL := none - -include $(BUILD_HOST_EXECUTABLE) diff --git a/tools/ijar/Android.bp b/tools/ijar/Android.bp new file mode 100644 index 000000000..f7e9a2839 --- /dev/null +++ b/tools/ijar/Android.bp @@ -0,0 +1,20 @@ +// Copyright 2015 The Android Open Source Project +// +// The rest of files in this directory comes from +// https://github.com/bazelbuild/bazel/tree/master/third_party/ijar + +cc_binary_host { + srcs: [ + "classfile.cc", + "ijar.cc", + "zip.cc", + ], + cflags: [ + "-Wall", + "-Werror", + ], + host_ldlibs: ["-lz"], + name: "ijar", + // libc++ is not supported for TARGET_BUILD_APPS builds + stl: "libstdc++", +} diff --git a/tools/ijar/Android.mk b/tools/ijar/Android.mk deleted file mode 100644 index 8b2a02c74..000000000 --- a/tools/ijar/Android.mk +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright 2015 The Android Open Source Project -# -# The rest of files in this directory comes from -# https://github.com/bazelbuild/bazel/tree/master/third_party/ijar - -LOCAL_PATH:= $(call my-dir) - -include $(CLEAR_VARS) -LOCAL_CPP_EXTENSION := .cc -LOCAL_SRC_FILES := classfile.cc ijar.cc zip.cc -LOCAL_CFLAGS += -Wall -Werror -LOCAL_SHARED_LIBRARIES := libz-host -LOCAL_MODULE := ijar -# libc++ is not supported for TARGET_BUILD_APPS builds -LOCAL_CXX_STL := libstdc++ -include $(BUILD_HOST_EXECUTABLE) diff --git a/tools/ziptime/Android.bp b/tools/ziptime/Android.bp new file mode 100644 index 000000000..874d34685 --- /dev/null +++ b/tools/ziptime/Android.bp @@ -0,0 +1,36 @@ +// +// Copyright 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. +// + +// +// Zip timestamp removal tool +// + +cc_binary_host { + + srcs: [ + "ZipTime.cpp", + "ZipEntry.cpp", + "ZipFile.cpp", + ], + + name: "ziptime", + target: { + windows: { + enabled: true, + }, + }, + +} diff --git a/tools/ziptime/Android.mk b/tools/ziptime/Android.mk deleted file mode 100644 index 3575229eb..000000000 --- a/tools/ziptime/Android.mk +++ /dev/null @@ -1,32 +0,0 @@ -# -# Copyright 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. -# - -# -# Zip timestamp removal tool -# - -LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_SRC_FILES := \ - ZipTime.cpp \ - ZipEntry.cpp \ - ZipFile.cpp - -LOCAL_MODULE := ziptime -LOCAL_MODULE_HOST_OS := darwin linux windows - -include $(BUILD_HOST_EXECUTABLE)