Add Blueprints files for remaining bionic modules
Change-Id: Ic9440fddb44ca1f17aad5b249535d7b96dd8d690
This commit is contained in:
1
Blueprints
Normal file
1
Blueprints
Normal file
@@ -0,0 +1 @@
|
||||
subdirs = ["*"]
|
||||
122
benchmarks/Blueprints
Normal file
122
benchmarks/Blueprints
Normal file
@@ -0,0 +1,122 @@
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Benchmarks library, usable by projects outside this directory.
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
benchmark_cflags = [
|
||||
"-O2",
|
||||
"-fno-builtin",
|
||||
"-Wall",
|
||||
"-Wextra",
|
||||
"-Werror",
|
||||
"-Wunused",
|
||||
]
|
||||
|
||||
benchmark_cppflags = ["-std=gnu++11"]
|
||||
|
||||
benchmarklib_src_files = [
|
||||
"Benchmark.cpp",
|
||||
"utils.cpp",
|
||||
"main.cpp",
|
||||
]
|
||||
|
||||
cc_library_static {
|
||||
name: "libbenchmark",
|
||||
host_supported: true,
|
||||
cflags: benchmark_cflags,
|
||||
cppflags: benchmark_cppflags,
|
||||
srcs: benchmarklib_src_files,
|
||||
static_libs: ["libbase"],
|
||||
target: {
|
||||
darwin: {
|
||||
// Only supported on linux systems.
|
||||
disabled: true,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Benchmarks.
|
||||
// -----------------------------------------------------------------------------
|
||||
benchmark_src_files = [
|
||||
"math_benchmark.cpp",
|
||||
"property_benchmark.cpp",
|
||||
"pthread_benchmark.cpp",
|
||||
"semaphore_benchmark.cpp",
|
||||
"stdio_benchmark.cpp",
|
||||
"string_benchmark.cpp",
|
||||
"time_benchmark.cpp",
|
||||
"unistd_benchmark.cpp",
|
||||
]
|
||||
|
||||
// Build benchmarks for the device (with bionic's .so). Run with:
|
||||
// adb shell bionic-benchmarks32
|
||||
// adb shell bionic-benchmarks64
|
||||
cc_binary {
|
||||
name: "bionic-benchmarks",
|
||||
multilib: {
|
||||
lib32: {
|
||||
suffix: "32",
|
||||
},
|
||||
lib64: {
|
||||
suffix: "64",
|
||||
},
|
||||
},
|
||||
compile_multilib: "both",
|
||||
cflags: benchmark_cflags,
|
||||
cppflags: benchmark_cppflags,
|
||||
srcs: benchmark_src_files,
|
||||
static_libs: [
|
||||
"libbenchmark",
|
||||
"libbase",
|
||||
],
|
||||
}
|
||||
|
||||
// We don't build a static benchmark executable because it's not usually
|
||||
// useful. If you're trying to run the current benchmarks on an older
|
||||
// release, it's (so far at least) always because you want to measure the
|
||||
// performance of the old release's libc, and a static benchmark isn't
|
||||
// going to let you do that.
|
||||
|
||||
// Build benchmarks for the host (against glibc!). Run with:
|
||||
cc_binary_host {
|
||||
name: "bionic-benchmarks-glibc",
|
||||
multilib: {
|
||||
lib32: {
|
||||
stem: "bionic-benchmarks-glibc32",
|
||||
},
|
||||
lib64: {
|
||||
stem: "bionic-benchmarks-glibc64",
|
||||
},
|
||||
},
|
||||
compile_multilib: "both",
|
||||
cflags: benchmark_cflags,
|
||||
cppflags: benchmark_cppflags,
|
||||
ldflags: ["-lrt"],
|
||||
srcs: benchmark_src_files,
|
||||
static_libs: [
|
||||
"libbenchmark",
|
||||
"libbase",
|
||||
],
|
||||
target: {
|
||||
darwin: {
|
||||
// Only supported on linux systems.
|
||||
disabled: true,
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -740,7 +740,8 @@ cc_library_static {
|
||||
"upstream-openbsd/lib/libc/net/res_random.c",
|
||||
],
|
||||
|
||||
cflags: ["-Dres_randomid=__res_randomid"] + libc_common_cflags + [
|
||||
cflags: ["-Dres_randomid=__res_randomid"] +
|
||||
libc_common_cflags + [
|
||||
"-DANDROID_CHANGES",
|
||||
"-DINET6",
|
||||
"-fvisibility=hidden",
|
||||
|
||||
111
linker/Blueprints
Normal file
111
linker/Blueprints
Normal file
@@ -0,0 +1,111 @@
|
||||
linker_cflags = [
|
||||
"-fno-stack-protector",
|
||||
"-Wstrict-overflow=5",
|
||||
"-fvisibility=hidden",
|
||||
"-Wall",
|
||||
"-Wextra",
|
||||
"-Wunused",
|
||||
"-Werror",
|
||||
]
|
||||
|
||||
cc_binary {
|
||||
|
||||
srcs: [
|
||||
"debugger.cpp",
|
||||
"dlfcn.cpp",
|
||||
"linker.cpp",
|
||||
"linker_allocator.cpp",
|
||||
"linker_block_allocator.cpp",
|
||||
"linker_environ.cpp",
|
||||
"linker_libc_support.c",
|
||||
"linker_memory.cpp",
|
||||
"linker_phdr.cpp",
|
||||
"rt.cpp",
|
||||
],
|
||||
|
||||
arch: {
|
||||
arm: {
|
||||
srcs: ["arch/arm/begin.S"],
|
||||
},
|
||||
arm64: {
|
||||
srcs: ["arch/arm64/begin.S"],
|
||||
},
|
||||
x86: {
|
||||
srcs: ["arch/x86/begin.c"],
|
||||
},
|
||||
x86_64: {
|
||||
srcs: ["arch/x86_64/begin.S"],
|
||||
},
|
||||
mips: {
|
||||
srcs: [
|
||||
"arch/mips/begin.S",
|
||||
"linker_mips.cpp",
|
||||
],
|
||||
},
|
||||
mips64: {
|
||||
srcs: [
|
||||
"arch/mips64/begin.S",
|
||||
"linker_mips.cpp",
|
||||
],
|
||||
},
|
||||
},
|
||||
|
||||
// -shared is used to overwrite the -Bstatic and -static
|
||||
// flags triggered by LOCAL_FORCE_STATIC_EXECUTABLE.
|
||||
// This dynamic linker is actually a shared object linked with static
|
||||
// libraries.
|
||||
ldflags: [
|
||||
"-shared",
|
||||
"-Wl,-Bsymbolic",
|
||||
"-Wl,--exclude-libs,ALL",
|
||||
],
|
||||
|
||||
cflags: linker_cflags,
|
||||
// TODO: split out the asflags.
|
||||
asflags: linker_cflags,
|
||||
|
||||
target: {
|
||||
android64: {
|
||||
cflags: ["-DTARGET_IS_64_BIT"],
|
||||
},
|
||||
},
|
||||
|
||||
// We need to access Bionic private headers in the linker.
|
||||
local_include_dirs: ["../libc/"],
|
||||
|
||||
conlyflags: ["-std=gnu99"],
|
||||
|
||||
cppflags: [
|
||||
"-std=gnu++11",
|
||||
"-Wold-style-cast",
|
||||
],
|
||||
|
||||
// we don't want crtbegin.o (because we have begin.o), so unset it
|
||||
// just for this module
|
||||
nocrt: true,
|
||||
|
||||
static_libs: ["libc_nomalloc"],
|
||||
|
||||
static_executable: true,
|
||||
|
||||
name: "linker",
|
||||
multilib: {
|
||||
lib32: {
|
||||
stem: "linker",
|
||||
},
|
||||
lib64: {
|
||||
stem: "linker64",
|
||||
},
|
||||
},
|
||||
compile_multilib: "both",
|
||||
|
||||
// Leave the symbols in the shared library so that stack unwinders can
|
||||
// produce meaningful name resolution.
|
||||
strip: "keep_symbols",
|
||||
|
||||
// Insert an extra objcopy step to add prefix to symbols. This is needed to
|
||||
// prevent gdb looking up symbols in the linker by mistake.
|
||||
prefix_symbols: "__dl_",
|
||||
}
|
||||
|
||||
subdirs = ["tests"]
|
||||
47
linker/tests/Blueprints
Normal file
47
linker/tests/Blueprints
Normal file
@@ -0,0 +1,47 @@
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
|
||||
cc_test {
|
||||
name: "linker-unit-tests",
|
||||
multilib: {
|
||||
lib32: {
|
||||
stem: "linker-unit-tests32",
|
||||
},
|
||||
lib64: {
|
||||
stem: "linker-unit-tests64",
|
||||
},
|
||||
},
|
||||
|
||||
cflags: [
|
||||
"-g",
|
||||
"-Wall",
|
||||
"-Wextra",
|
||||
"-Wunused",
|
||||
"-Werror",
|
||||
"-std=gnu++11",
|
||||
],
|
||||
local_include_dirs: ["/../../libc/"],
|
||||
|
||||
srcs: [
|
||||
"linked_list_test.cpp",
|
||||
"linker_block_allocator_test.cpp",
|
||||
"../linker_block_allocator.cpp",
|
||||
"linker_memory_allocator_test.cpp",
|
||||
"../linker_allocator.cpp",
|
||||
// for __libc_fatal
|
||||
"../../libc/bionic/libc_logging.cpp",
|
||||
],
|
||||
}
|
||||
1
tools/Blueprints
Normal file
1
tools/Blueprints
Normal file
@@ -0,0 +1 @@
|
||||
subdirs = ["relocation_packer"]
|
||||
104
tools/relocation_packer/Blueprints
Normal file
104
tools/relocation_packer/Blueprints
Normal file
@@ -0,0 +1,104 @@
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
|
||||
common_cppflags = [
|
||||
"-Wall",
|
||||
"-Wextra",
|
||||
"-Wunused",
|
||||
"-Werror",
|
||||
"-Wold-style-cast",
|
||||
]
|
||||
|
||||
cc_library_host_static {
|
||||
|
||||
srcs: [
|
||||
"src/debug.cc",
|
||||
"src/delta_encoder.cc",
|
||||
"src/elf_file.cc",
|
||||
"src/leb128.cc",
|
||||
"src/packer.cc",
|
||||
"src/sleb128.cc",
|
||||
],
|
||||
|
||||
static_libs: ["libelf"],
|
||||
include_dirs: ["external/elfutils/src/libelf"],
|
||||
name: "lib_relocation_packer",
|
||||
|
||||
cppflags: common_cppflags,
|
||||
|
||||
}
|
||||
|
||||
cc_binary_host {
|
||||
|
||||
srcs: ["src/main.cc"],
|
||||
static_libs: [
|
||||
"lib_relocation_packer",
|
||||
"libelf",
|
||||
],
|
||||
include_dirs: [
|
||||
"external/elfutils/src/libelf",
|
||||
"libnativehelper/include",
|
||||
],
|
||||
|
||||
name: "relocation_packer",
|
||||
|
||||
cppflags: common_cppflags,
|
||||
|
||||
}
|
||||
|
||||
cc_test_host {
|
||||
|
||||
srcs: [
|
||||
"src/debug_unittest.cc",
|
||||
"src/delta_encoder_unittest.cc",
|
||||
"src/elf_file_unittest.cc",
|
||||
"src/leb128_unittest.cc",
|
||||
"src/sleb128_unittest.cc",
|
||||
"src/packer_unittest.cc",
|
||||
],
|
||||
|
||||
static_libs: [
|
||||
"lib_relocation_packer",
|
||||
"libelf",
|
||||
],
|
||||
include_dirs: ["external/elfutils/src/libelf"],
|
||||
|
||||
cppflags: common_cppflags,
|
||||
|
||||
name: "relocation_packer_unit_tests",
|
||||
|
||||
}
|
||||
|
||||
// $(1) library name
|
||||
// ANDROIDMK TRANSLATION ERROR: unsupported directive
|
||||
// define copy-test-library
|
||||
// include $(CLEAR_VARS)
|
||||
// LOCAL_IS_HOST_MODULE := true
|
||||
// LOCAL_MODULE := $(1)
|
||||
// LOCAL_MODULE_CLASS := SHARED_LIBRARIES
|
||||
// LOCAL_MODULE_PATH := $(HOST_OUT_EXECUTABLES)
|
||||
// LOCAL_STRIP_MODULE := false
|
||||
// LOCAL_SRC_FILES := test_data/$(1)
|
||||
// include $(BUILD_PREBUILT)
|
||||
//
|
||||
// ANDROIDMK TRANSLATION ERROR: unsupported line
|
||||
// $(eval $(call copy-test-library,elf_file_unittest_relocs_arm32.so))
|
||||
// ANDROIDMK TRANSLATION ERROR: unsupported line
|
||||
// $(eval $(call copy-test-library,elf_file_unittest_relocs_arm32_packed.so))
|
||||
// ANDROIDMK TRANSLATION ERROR: unsupported line
|
||||
// $(eval $(call copy-test-library,elf_file_unittest_relocs_arm64.so))
|
||||
// ANDROIDMK TRANSLATION ERROR: unsupported line
|
||||
// $(eval $(call copy-test-library,elf_file_unittest_relocs_arm64_packed.so))
|
||||
Reference in New Issue
Block a user