diff --git a/tools/gn2bp/Android.bp.swp b/tools/gn2bp/Android.bp.swp index d985c047d4..5f73254665 100644 --- a/tools/gn2bp/Android.bp.swp +++ b/tools/gn2bp/Android.bp.swp @@ -284,6 +284,18 @@ cc_library_static { ], }, }, + target: { + android_x86_64: { + srcs: [ + "base/allocator/partition_allocator/partition_alloc_base/files/file_path.cc", + "base/allocator/partition_allocator/partition_alloc_base/files/file_path.h", + "base/allocator/partition_allocator/partition_alloc_base/native_library.cc", + "base/allocator/partition_allocator/partition_alloc_base/native_library.h", + "base/allocator/partition_allocator/partition_alloc_base/native_library_posix.cc", + "base/allocator/partition_allocator/partition_alloc_base/time/time_android.cc", + ], + }, + }, } // GN: //base/allocator/partition_allocator:partition_alloc_buildflags @@ -983,6 +995,157 @@ cc_library_static { "liblog", ], }, + host: { + srcs: [ + "base/allocator/partition_allocator/shim/allocator_shim_default_dispatch_to_glibc.cc", + "base/allocator/partition_allocator/shim/allocator_shim_override_glibc_weak_symbols.h", + "base/allocator/partition_allocator/shim/allocator_shim_override_libc_symbols.h", + "base/base_paths_posix.cc", + "base/debug/stack_trace_posix.cc", + "base/files/dir_reader_linux.h", + "base/files/file_util_linux.cc", + "base/files/scoped_file_linux.cc", + "base/memory/platform_shared_memory_mapper_posix.cc", + "base/memory/platform_shared_memory_region_posix.cc", + "base/nix/mime_util_xdg.cc", + "base/nix/mime_util_xdg.h", + "base/nix/xdg_util.cc", + "base/nix/xdg_util.h", + "base/power_monitor/power_monitor_device_source_stub.cc", + "base/process/process_linux.cc", + "base/profiler/stack_sampler_posix.cc", + "base/stack_canary_linux.cc", + "base/stack_canary_linux.h", + "base/threading/platform_thread_linux.cc", + ], + }, + android_x86_64: { + srcs: [ + "base/allocator/partition_allocator/shim/allocator_shim_default_dispatch_to_linker_wrapped_symbols.cc", + "base/allocator/partition_allocator/shim/allocator_shim_override_linker_wrapped_symbols.h", + "base/android/android_hardware_buffer_compat.cc", + "base/android/android_hardware_buffer_compat.h", + "base/android/android_image_reader_abi.h", + "base/android/android_image_reader_compat.cc", + "base/android/android_image_reader_compat.h", + "base/android/apk_assets.cc", + "base/android/apk_assets.h", + "base/android/application_status_listener.cc", + "base/android/application_status_listener.h", + "base/android/base_feature_list.cc", + "base/android/base_features.cc", + "base/android/base_features.h", + "base/android/base_jni_onload.cc", + "base/android/base_jni_onload.h", + "base/android/build_info.cc", + "base/android/build_info.h", + "base/android/bundle_utils.cc", + "base/android/bundle_utils.h", + "base/android/callback_android.cc", + "base/android/callback_android.h", + "base/android/child_process_binding_types.h", + "base/android/child_process_service.cc", + "base/android/command_line_android.cc", + "base/android/content_uri_utils.cc", + "base/android/content_uri_utils.h", + "base/android/cpu_features.cc", + "base/android/early_trace_event_binding.cc", + "base/android/early_trace_event_binding.h", + "base/android/event_log.cc", + "base/android/event_log.h", + "base/android/feature_list_jni.cc", + "base/android/features_jni.cc", + "base/android/field_trial_list.cc", + "base/android/important_file_writer_android.cc", + "base/android/int_string_callback.cc", + "base/android/int_string_callback.h", + "base/android/jank_metric_uma_recorder.cc", + "base/android/jank_metric_uma_recorder.h", + "base/android/java_exception_reporter.cc", + "base/android/java_exception_reporter.h", + "base/android/java_handler_thread.cc", + "base/android/java_handler_thread.h", + "base/android/java_heap_dump_generator.cc", + "base/android/java_heap_dump_generator.h", + "base/android/java_runtime.cc", + "base/android/java_runtime.h", + "base/android/jni_android.cc", + "base/android/jni_android.h", + "base/android/jni_array.cc", + "base/android/jni_array.h", + "base/android/jni_generator/jni_generator_helper.h", + "base/android/jni_int_wrapper.h", + "base/android/jni_registrar.cc", + "base/android/jni_registrar.h", + "base/android/jni_string.cc", + "base/android/jni_string.h", + "base/android/jni_utils.cc", + "base/android/jni_utils.h", + "base/android/jni_weak_ref.cc", + "base/android/jni_weak_ref.h", + "base/android/library_loader/anchor_functions.cc", + "base/android/library_loader/anchor_functions.h", + "base/android/library_loader/library_loader_hooks.cc", + "base/android/library_loader/library_loader_hooks.h", + "base/android/library_loader/library_prefetcher.cc", + "base/android/library_loader/library_prefetcher.h", + "base/android/library_loader/library_prefetcher_hooks.cc", + "base/android/locale_utils.cc", + "base/android/locale_utils.h", + "base/android/memory_pressure_listener_android.cc", + "base/android/memory_pressure_listener_android.h", + "base/android/native_uma_recorder.cc", + "base/android/path_service_android.cc", + "base/android/path_utils.cc", + "base/android/path_utils.h", + "base/android/radio_utils.cc", + "base/android/radio_utils.h", + "base/android/reached_addresses_bitset.cc", + "base/android/reached_addresses_bitset.h", + "base/android/reached_code_profiler.h", + "base/android/reached_code_profiler_stub.cc", + "base/android/remove_stale_data.cc", + "base/android/remove_stale_data.h", + "base/android/scoped_hardware_buffer_fence_sync.cc", + "base/android/scoped_hardware_buffer_fence_sync.h", + "base/android/scoped_hardware_buffer_handle.cc", + "base/android/scoped_hardware_buffer_handle.h", + "base/android/scoped_java_ref.cc", + "base/android/scoped_java_ref.h", + "base/android/statistics_recorder_android.cc", + "base/android/sys_utils.cc", + "base/android/sys_utils.h", + "base/android/task_scheduler/post_task_android.cc", + "base/android/task_scheduler/post_task_android.h", + "base/android/task_scheduler/task_runner_android.cc", + "base/android/task_scheduler/task_runner_android.h", + "base/android/thread_instruction_count.cc", + "base/android/thread_instruction_count.h", + "base/android/timezone_utils.cc", + "base/android/timezone_utils.h", + "base/android/trace_event_binding.cc", + "base/android/trace_event_binding.h", + "base/android/unguessable_token_android.cc", + "base/android/unguessable_token_android.h", + "base/base_paths_android.cc", + "base/base_paths_android.h", + "base/debug/stack_trace_android.cc", + "base/files/file_util_android.cc", + "base/files/scoped_file_android.cc", + "base/memory/platform_shared_memory_mapper_android.cc", + "base/memory/platform_shared_memory_region_android.cc", + "base/message_loop/message_pump_android.cc", + "base/message_loop/message_pump_android.h", + "base/os_compat_android.cc", + "base/os_compat_android.h", + "base/power_monitor/power_monitor_device_source_android.cc", + "base/process/process_android.cc", + "base/profiler/stack_sampler_android.cc", + "base/system/sys_info_android.cc", + "base/threading/platform_thread_android.cc", + "base/time/time_android.cc", + ], + }, }, } @@ -1990,6 +2153,18 @@ filegroup { "buildtools/third_party/libc++abi/trunk/src/stdlib_stdexcept.cpp", "buildtools/third_party/libc++abi/trunk/src/stdlib_typeinfo.cpp", ], + target: { + host: { + srcs: [ + "buildtools/third_party/libc++abi/trunk/src/cxa_demangle.cpp", + ], + }, + android_x86_64: { + srcs: [ + "buildtools/third_party/libc++abi/cxa_demangle_stub.cc", + ], + }, + }, } // GN: //buildtools/third_party/libunwind:libunwind @@ -2656,6 +2831,16 @@ cc_library_static { "liblog", ], }, + host: { + srcs: [ + "crypto/nss_crypto_module_delegate.h", + "crypto/nss_key_util.cc", + "crypto/nss_key_util.h", + "crypto/nss_util.cc", + "crypto/nss_util.h", + "crypto/nss_util_internal.h", + ], + }, }, } @@ -5799,6 +5984,25 @@ filegroup { "third_party/boringssl/linux-x86_64/crypto/test/trampoline-x86_64.S", "third_party/boringssl/src/crypto/hrss/asm/poly_rq_mul.S", ], + target: { + android_x86: { + srcs: [ + "third_party/boringssl/linux-x86/crypto/chacha/chacha-x86.S", + "third_party/boringssl/linux-x86/crypto/fipsmodule/aesni-x86.S", + "third_party/boringssl/linux-x86/crypto/fipsmodule/bn-586.S", + "third_party/boringssl/linux-x86/crypto/fipsmodule/co-586.S", + "third_party/boringssl/linux-x86/crypto/fipsmodule/ghash-ssse3-x86.S", + "third_party/boringssl/linux-x86/crypto/fipsmodule/ghash-x86.S", + "third_party/boringssl/linux-x86/crypto/fipsmodule/md5-586.S", + "third_party/boringssl/linux-x86/crypto/fipsmodule/sha1-586.S", + "third_party/boringssl/linux-x86/crypto/fipsmodule/sha256-586.S", + "third_party/boringssl/linux-x86/crypto/fipsmodule/sha512-586.S", + "third_party/boringssl/linux-x86/crypto/fipsmodule/vpaes-x86.S", + "third_party/boringssl/linux-x86/crypto/fipsmodule/x86-mont.S", + "third_party/boringssl/linux-x86/crypto/test/trampoline-x86.S", + ], + }, + }, } // GN: //third_party/boringssl/src/third_party/fiat:fiat_license @@ -6523,6 +6727,20 @@ cc_library_static { "third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include", ], cpp_std: "c++20", + target: { + host: { + srcs: [ + "third_party/libevent/linux/config.h", + "third_party/libevent/linux/event-config.h", + ], + }, + android_x86_64: { + srcs: [ + "third_party/libevent/android/config.h", + "third_party/libevent/android/event-config.h", + ], + }, + }, } // GN: //third_party/metrics_proto:metrics_proto diff --git a/tools/gn2bp/gen_android_bp b/tools/gn2bp/gen_android_bp index 4c53cbd433..6ff66995ee 100755 --- a/tools/gn2bp/gen_android_bp +++ b/tools/gn2bp/gen_android_bp @@ -1030,6 +1030,11 @@ def create_modules_from_target(blueprint, gn, gn_target_name): for src in target.sources if is_supported_source_file(src) and not src.startswith("//out/test")) + # Add arch-specific properties + for arch_name, arch in target.arch.items(): + module.target[arch_name].srcs.update(gn_utils.label_to_path(src) + for src in arch.sources) + local_include_dirs_set = set() if target.type in gn_utils.LINKER_UNIT_TYPES: module.cflags.update(_get_cflags(target))