Merge changes from topic "libedify-header"

* changes:
  edify: Export the header and move to Soong.
  Revert "Revert "Move error_code.h into otautil.""
This commit is contained in:
Tao Bao
2017-10-10 16:15:30 +00:00
committed by Gerrit Code Review
19 changed files with 64 additions and 67 deletions

View File

@@ -1,5 +1,6 @@
subdirs = [
"bootloader_message",
"edify",
"otafault",
"otautil",
]

View File

@@ -261,7 +261,6 @@ include $(BUILD_STATIC_LIBRARY)
include \
$(LOCAL_PATH)/applypatch/Android.mk \
$(LOCAL_PATH)/boot_control/Android.mk \
$(LOCAL_PATH)/edify/Android.mk \
$(LOCAL_PATH)/minadbd/Android.mk \
$(LOCAL_PATH)/minui/Android.mk \
$(LOCAL_PATH)/tests/Android.mk \

View File

@@ -29,6 +29,7 @@ LOCAL_C_INCLUDES := \
bootable/recovery
LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
LOCAL_STATIC_LIBRARIES := \
libedify \
libotafault \
libbase \
libcrypto \
@@ -116,6 +117,7 @@ LOCAL_STATIC_LIBRARIES := \
libapplypatch \
libedify \
libotafault \
libotautil \
libbspatch \
libbase \
libziparchive \

45
edify/Android.bp Normal file
View File

@@ -0,0 +1,45 @@
// Copyright (C) 2017 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_library_static {
name: "libedify",
host_supported: true,
srcs: [
"expr.cpp",
"lexer.ll",
"parser.yy",
],
cflags: [
"-Wall",
"-Werror",
"-Wno-deprecated-register",
"-Wno-unused-parameter",
],
export_include_dirs: [
"include",
],
local_include_dirs: [
"include",
],
static_libs: [
"libbase",
"libotautil",
],
}

View File

@@ -1,52 +0,0 @@
# Copyright 2009 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)
edify_src_files := \
lexer.ll \
parser.yy \
expr.cpp
#
# Build the device-side library (static library)
#
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(edify_src_files)
LOCAL_CFLAGS := -Wall -Werror
LOCAL_CPPFLAGS := -Wno-unused-parameter
LOCAL_CPPFLAGS += -Wno-deprecated-register
LOCAL_MODULE := libedify
LOCAL_C_INCLUDES += $(LOCAL_PATH)/..
LOCAL_STATIC_LIBRARIES += libbase
include $(BUILD_STATIC_LIBRARY)
#
# Build the host-side library (static library)
#
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(edify_src_files)
LOCAL_CFLAGS := -Wall -Werror
LOCAL_CPPFLAGS := -Wno-unused-parameter
LOCAL_CPPFLAGS += -Wno-deprecated-register
LOCAL_MODULE := libedify
LOCAL_C_INCLUDES += $(LOCAL_PATH)/..
LOCAL_STATIC_LIBRARIES += libbase
include $(BUILD_HOST_STATIC_LIBRARY)

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
#include "expr.h"
#include "edify/expr.h"
#include <stdarg.h>
#include <stdio.h>
@@ -31,7 +31,7 @@
#include <android-base/stringprintf.h>
#include <android-base/strings.h>
#include "error_code.h"
#include "otautil/error_code.h"
// Functions should:
//

View File

@@ -23,7 +23,7 @@
#include <string>
#include <vector>
// Forward declaration to avoid including "error_code.h".
// Forward declaration to avoid including "otautil/error_code.h".
enum ErrorCode : int;
enum CauseCode : int;

View File

@@ -18,7 +18,7 @@
#include <string.h>
#include <string>
#include "expr.h"
#include "edify/expr.h"
#include "yydefs.h"
#include "parser.h"

View File

@@ -25,7 +25,7 @@
#include <android-base/macros.h>
#include "expr.h"
#include "edify/expr.h"
#include "yydefs.h"
#include "parser.h"

View File

@@ -49,9 +49,9 @@
#include <ziparchive/zip_archive.h>
#include "common.h"
#include "error_code.h"
#include "otautil/SysUtil.h"
#include "otautil/ThermalUtil.h"
#include "otautil/error_code.h"
#include "private/install.h"
#include "roots.h"
#include "ui.h"

View File

@@ -15,6 +15,8 @@
cc_library_static {
name: "libotautil",
host_supported: true,
srcs: [
"SysUtil.cpp",
"DirUtil.cpp",

View File

@@ -75,4 +75,4 @@ enum UncryptErrorCode : int {
kUncryptBlockDeviceFindError,
};
#endif // _ERROR_CODE_H_
#endif // _ERROR_CODE_H_

View File

@@ -61,13 +61,13 @@
#include "adb_install.h"
#include "common.h"
#include "device.h"
#include "error_code.h"
#include "fuse_sdcard_provider.h"
#include "fuse_sideload.h"
#include "install.h"
#include "minadbd/minadbd.h"
#include "minui/minui.h"
#include "otautil/DirUtil.h"
#include "otautil/error_code.h"
#include "roots.h"
#include "rotate_logs.h"
#include "screen_ui.h"

View File

@@ -39,8 +39,8 @@
#include "common/test_constants.h"
#include "edify/expr.h"
#include "error_code.h"
#include "otautil/SysUtil.h"
#include "otautil/error_code.h"
#include "print_sha1.h"
#include "updater/blockimg.h"
#include "updater/install.h"

View File

@@ -17,10 +17,10 @@ LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := uncrypt.cpp
LOCAL_C_INCLUDES := $(LOCAL_PATH)/..
LOCAL_MODULE := uncrypt
LOCAL_STATIC_LIBRARIES := \
libbootloader_message \
libotautil \
libbase \
liblog \
libfs_mgr \

View File

@@ -116,7 +116,7 @@
#include <cutils/sockets.h>
#include <fs_mgr.h>
#include "error_code.h"
#include "otautil/error_code.h"
static constexpr int WINDOW_SIZE = 5;
static constexpr int FIBMAP_RETRY_LIMIT = 3;

View File

@@ -50,8 +50,8 @@
#include <ziparchive/zip_archive.h>
#include "edify/expr.h"
#include "error_code.h"
#include "otafault/ota_io.h"
#include "otautil/error_code.h"
#include "print_sha1.h"
#include "rangeset.h"
#include "updater/install.h"

View File

@@ -57,10 +57,10 @@
#include <ziparchive/zip_archive.h>
#include "edify/expr.h"
#include "error_code.h"
#include "mounts.h"
#include "otafault/ota_io.h"
#include "otautil/DirUtil.h"
#include "otautil/error_code.h"
#include "print_sha1.h"
#include "tune2fs.h"
#include "updater/updater.h"

View File

@@ -31,10 +31,10 @@
#include <ziparchive/zip_archive.h>
#include "edify/expr.h"
#include "error_code.h"
#include "otafault/config.h"
#include "otautil/DirUtil.h"
#include "otautil/SysUtil.h"
#include "otautil/error_code.h"
#include "updater/blockimg.h"
#include "updater/install.h"