diff options
author | Dan Willemsen <dwillemsen@google.com> | 2016-08-26 15:01:36 -0700 |
---|---|---|
committer | Dan Willemsen <dwillemsen@google.com> | 2016-08-26 16:19:21 -0700 |
commit | 194edf772e4df2ade86acf97f616243aaef205fc (patch) | |
tree | 32bb95c53295dcccdde4afa28eeb1cec46f36f39 /libmemunreachable | |
parent | 091b631915c68c801bbded01ac8bb3a7af18436e (diff) | |
download | core-194edf772e4df2ade86acf97f616243aaef205fc.tar.gz core-194edf772e4df2ade86acf97f616243aaef205fc.tar.bz2 core-194edf772e4df2ade86acf97f616243aaef205fc.zip |
Convert to Android.bp
See build/soong/README.md for more information.
I tested the following tests on a Nexus9 and linux host, and they
continued to pass:
/data/nativetest{,64}/bootstat_tests/bootstat_tests
out/host/linux-x86/bin/nativetest{,64}/bootstat_tests/bootstat_tests
/data/nativetest64/memunreachable_test/memunreachable_test
out/host/linux-x86/bin/nativetest{,64}/memunreachable_test/memunreachable_test
These continue to fail just like before this change:
/data/nativetest{,64}/sync_test/sync_test (was /system/bin/sync_test)
/data/nativetest{,64}/sync-unit-test/sync-unit-test
/data/nativetest/memunreachable_test/memunreachable_test
Test: See above
Change-Id: I691e564e0cf008dd363e3746223b153d712e024d
Diffstat (limited to 'libmemunreachable')
-rw-r--r-- | libmemunreachable/Android.bp | 80 | ||||
-rw-r--r-- | libmemunreachable/Android.mk | 65 |
2 files changed, 80 insertions, 65 deletions
diff --git a/libmemunreachable/Android.bp b/libmemunreachable/Android.bp new file mode 100644 index 000000000..85bc421c3 --- /dev/null +++ b/libmemunreachable/Android.bp @@ -0,0 +1,80 @@ +cc_defaults { + name: "libmemunreachable_defaults", + + cflags: [ + "-std=c++14", + "-Wall", + "-Wextra", + "-Werror", + ], + clang: true, + shared_libs: [ + "libbase", + "liblog", + ], +} + +cc_library_shared { + name: "libmemunreachable", + defaults: ["libmemunreachable_defaults"], + srcs: [ + "Allocator.cpp", + "HeapWalker.cpp", + "LeakFolding.cpp", + "LeakPipe.cpp", + "LineBuffer.cpp", + "MemUnreachable.cpp", + "ProcessMappings.cpp", + "PtracerThread.cpp", + "ThreadCapture.cpp", + ], + + static_libs: [ + "libc_malloc_debug_backtrace", + "libc_logging", + ], + // Only need this for arm since libc++ uses its own unwind code that + // doesn't mix with the other default unwind code. + arch: { + arm: { + static_libs: ["libunwind_llvm"], + }, + }, + export_include_dirs: ["include"], + local_include_dirs: ["include"], +} + +cc_test { + name: "memunreachable_test", + defaults: ["libmemunreachable_defaults"], + host_supported: true, + srcs: [ + "tests/Allocator_test.cpp", + "tests/HeapWalker_test.cpp", + "tests/LeakFolding_test.cpp", + ], + + target: { + android: { + srcs: [ + "tests/DisableMalloc_test.cpp", + "tests/MemUnreachable_test.cpp", + "tests/ThreadCapture_test.cpp", + ], + shared_libs: [ + "libmemunreachable", + ], + }, + host: { + srcs: [ + "Allocator.cpp", + "HeapWalker.cpp", + "LeakFolding.cpp", + "tests/HostMallocStub.cpp", + ], + }, + darwin: { + enabled: false, + }, + }, +} diff --git a/libmemunreachable/Android.mk b/libmemunreachable/Android.mk deleted file mode 100644 index 7b66d4401..000000000 --- a/libmemunreachable/Android.mk +++ /dev/null @@ -1,65 +0,0 @@ -LOCAL_PATH := $(call my-dir) - -memunreachable_srcs := \ - Allocator.cpp \ - HeapWalker.cpp \ - LeakFolding.cpp \ - LeakPipe.cpp \ - LineBuffer.cpp \ - MemUnreachable.cpp \ - ProcessMappings.cpp \ - PtracerThread.cpp \ - ThreadCapture.cpp \ - -memunreachable_test_srcs := \ - tests/Allocator_test.cpp \ - tests/DisableMalloc_test.cpp \ - tests/HeapWalker_test.cpp \ - tests/LeakFolding_test.cpp \ - tests/MemUnreachable_test.cpp \ - tests/ThreadCapture_test.cpp \ - -include $(CLEAR_VARS) - -LOCAL_MODULE := libmemunreachable -LOCAL_SRC_FILES := $(memunreachable_srcs) -LOCAL_CFLAGS := -std=c++14 -Wall -Wextra -Werror -LOCAL_SHARED_LIBRARIES := libbase liblog -LOCAL_STATIC_LIBRARIES := libc_malloc_debug_backtrace libc_logging -# Only need this for arm since libc++ uses its own unwind code that -# doesn't mix with the other default unwind code. -LOCAL_STATIC_LIBRARIES_arm := libunwind_llvm -LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include -LOCAL_C_INCLUDES := $(LOCAL_PATH)/include -LOCAL_CLANG := true - -include $(BUILD_SHARED_LIBRARY) - -include $(CLEAR_VARS) - -LOCAL_MODULE := memunreachable_test -LOCAL_SRC_FILES := $(memunreachable_test_srcs) -LOCAL_CFLAGS := -std=c++14 -Wall -Wextra -Werror -LOCAL_CLANG := true -LOCAL_SHARED_LIBRARIES := libmemunreachable libbase liblog - -include $(BUILD_NATIVE_TEST) - -include $(CLEAR_VARS) - -LOCAL_MODULE := memunreachable_test -LOCAL_SRC_FILES := \ - Allocator.cpp \ - HeapWalker.cpp \ - LeakFolding.cpp \ - tests/Allocator_test.cpp \ - tests/HeapWalker_test.cpp \ - tests/HostMallocStub.cpp \ - tests/LeakFolding_test.cpp \ - -LOCAL_CFLAGS := -std=c++14 -Wall -Wextra -Werror -LOCAL_CLANG := true -LOCAL_SHARED_LIBRARIES := libbase liblog -LOCAL_MODULE_HOST_OS := linux - -include $(BUILD_HOST_NATIVE_TEST) |