diff --git a/connections/implementation/BUILD b/connections/implementation/BUILD index 6aaad6d5..4d1ce4f8 100644 --- a/connections/implementation/BUILD +++ b/connections/implementation/BUILD @@ -66,14 +66,20 @@ cc_library( "payload_manager.cc", "pcp_manager.cc", "service_controller_router.cc", - "webrtc_bwu_handler_stub.cc", "webrtc_endpoint_channel.cc", "wifi_hotspot_bwu_handler.cc", "wifi_hotspot_endpoint_channel.cc", "wifi_lan_bwu_handler.cc", "wifi_lan_endpoint_channel.cc", "wifi_lan_service_info.cc", - ], + ] + select({ + "@platforms//cpu:arm": [ + "webrtc_bwu_handler_stub.cc", + ], + "//conditions:default": [ + "webrtc_bwu_handler_stub.cc", + ], + }), hdrs = [ "base_bwu_handler.h", "base_endpoint_channel.h", @@ -107,15 +113,26 @@ cc_library( "service_controller.h", "service_controller_router.h", "service_id_constants.h", - "webrtc_bwu_handler_stub.h", "webrtc_endpoint_channel.h", "wifi_hotspot_bwu_handler.h", "wifi_hotspot_endpoint_channel.h", "wifi_lan_bwu_handler.h", "wifi_lan_endpoint_channel.h", "wifi_lan_service_info.h", - ], - copts = ["-DCORE_ADAPTER_DLL"], + ] + select({ + "@platforms//cpu:arm": [ + "webrtc_bwu_handler_stub.h", + ], + "//conditions:default": [ + "webrtc_bwu_handler_stub.h", + ], + }), + copts = ["-DCORE_ADAPTER_DLL"] + select({ + "@platforms//cpu:arm": [ + "-DNO_WEBRTC", + ], + "//conditions:default": [], + }), defines = ["NO_WEBRTC"], visibility = [ "//connections:__pkg__", diff --git a/connections/implementation/mediums/BUILD b/connections/implementation/mediums/BUILD index 44c2c9ec..4446a840 100644 --- a/connections/implementation/mediums/BUILD +++ b/connections/implementation/mediums/BUILD @@ -21,29 +21,55 @@ cc_library( "bluetooth_classic.cc", "bluetooth_radio.cc", "mediums.cc", - "webrtc_stub.cc", "wifi_direct.cc", "wifi_hotspot.cc", "wifi_lan.cc", - ], + ] + select({ + "@platforms//cpu:arm": [ + "webrtc_stub.cc", + ], + "//conditions:default": [ + "webrtc_stub.cc", + ], + }), hdrs = [ "ble.h", "ble_v2.h", "bluetooth_classic.h", "bluetooth_radio.h", "mediums.h", - "webrtc_stub.h", "wifi.h", "wifi_direct.h", "wifi_hotspot.h", "wifi_lan.h", - ], + ] + select({ + "@platforms//cpu:arm": [ + "webrtc_stub.h", + ], + "//conditions:default": [ + "webrtc_stub.h", + ], + }), + copts = select({ + "@platforms//cpu:arm": [ + "-DNO_WEBRTC", + ], + "//conditions:default": [], + }), defines = ["NO_WEBRTC"], visibility = [ "//connections/implementation:__subpackages__", ], deps = [ ":utils", + "@com_google_absl//absl/container:btree", + "@com_google_absl//absl/container:flat_hash_map", + "@com_google_absl//absl/container:flat_hash_set", + "@com_google_absl//absl/functional:bind_front", + "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:str_format", + "@com_google_absl//absl/time", + "@com_google_absl//absl/types:optional", "//connections:core_types", "//connections/implementation/mediums/ble_v2", "//internal/platform:base", @@ -53,29 +79,45 @@ cc_library( "//internal/platform:types", "//internal/platform:uuid", "//proto/mediums:web_rtc_signaling_frames_cc_proto", - "@com_google_absl//absl/container:btree", - "@com_google_absl//absl/container:flat_hash_map", - "@com_google_absl//absl/container:flat_hash_set", - "@com_google_absl//absl/functional:bind_front", - "@com_google_absl//absl/strings", - "@com_google_absl//absl/strings:str_format", - "@com_google_absl//absl/time", - "@com_google_absl//absl/types:optional", - ], + ] + select({ + "@platforms//cpu:arm": [ + "//connections/implementation/proto:offline_wire_formats_cc_proto", + ], + "//conditions:default": [], + }), ) cc_library( name = "utils", srcs = [ "utils.cc", - "webrtc_peer_id_stub.cc", - ], + ] + select({ + "@platforms//cpu:arm": [ + "webrtc_peer_id_stub.cc", + ], + "//conditions:default": [ + "webrtc_peer_id_stub.cc", + ], + }), hdrs = [ "lost_entity_tracker.h", "utils.h", - "webrtc_peer_id_stub.h", - "webrtc_socket_stub.h", - ], + ] + select({ + "@platforms//cpu:arm": [ + "webrtc_peer_id_stub.h", + "webrtc_socket_stub.h", + ], + "//conditions:default": [ + "webrtc_peer_id_stub.h", + "webrtc_socket_stub.h", + ], + }), + copts = select({ + "@platforms//cpu:arm": [ + "-DNO_WEBRTC", + ], + "//conditions:default": [], + }), defines = ["NO_WEBRTC"], visibility = [ "//connections/implementation:__pkg__", diff --git a/connections/implementation/mediums/webrtc/BUILD b/connections/implementation/mediums/webrtc/BUILD index 1090a391..b67f9ba2 100644 --- a/connections/implementation/mediums/webrtc/BUILD +++ b/connections/implementation/mediums/webrtc/BUILD @@ -26,12 +26,19 @@ cc_library( "session_description_wrapper.h", "signaling_frames.h", ], - copts = ["-DCORE_ADAPTER_DLL"], + copts = ["-DCORE_ADAPTER_DLL"] + select({ + "@platforms//cpu:arm": [ + "-DNO_WEBRTC", + ], + "//conditions:default": [], + }), visibility = [ "//connections/implementation:__subpackages__", ], deps = [ ":data_types", + "@com_google_absl//absl/memory", + "@com_google_absl//absl/time", "//connections:core_types", "//connections/implementation/mediums:utils", "//internal/platform:base", @@ -39,11 +46,13 @@ cc_library( "//internal/platform:logging", "//internal/platform:types", "//proto/mediums:web_rtc_signaling_frames_cc_proto", - "//third_party/webrtc/files/stable/webrtc/api:libjingle_peerconnection_api", - "//third_party/webrtc/files/stable/webrtc/pc:peerconnection", - "@com_google_absl//absl/memory", - "@com_google_absl//absl/time", - ], + ] + select({ + "@platforms//cpu:arm": [], + "//conditions:default": [ + "//third_party/webrtc/files/stable/webrtc/api:libjingle_peerconnection_api", + "//third_party/webrtc/files/stable/webrtc/pc:peerconnection", + ], + }), ) cc_library( @@ -54,7 +63,12 @@ cc_library( hdrs = [ "webrtc_socket_impl.h", ], - copts = ["-DCORE_ADAPTER_DLL"], + copts = ["-DCORE_ADAPTER_DLL"] + select({ + "@platforms//cpu:arm": [ + "-DNO_WEBRTC", + ], + "//conditions:default": [], + }), visibility = [ "//connections/implementation:__subpackages__", ], @@ -62,8 +76,12 @@ cc_library( "//connections:core_types", "//internal/platform:base", "//internal/platform:types", - "//third_party/webrtc/files/stable/webrtc/api:libjingle_peerconnection_api", - ], + ] + select({ + "@platforms//cpu:arm": [], + "//conditions:default": [ + "//third_party/webrtc/files/stable/webrtc/api:libjingle_peerconnection_api", + ], + }), ) cc_test( diff --git a/internal/platform/BUILD b/internal/platform/BUILD index 5a85c74c..4abb2e9e 100644 --- a/internal/platform/BUILD +++ b/internal/platform/BUILD @@ -394,7 +394,12 @@ cc_library( "wifi_lan.h", "wifi_utils.h", ], - copts = ["-DCORE_ADAPTER_DLL"], + copts = ["-DCORE_ADAPTER_DLL"] + select({ + "@platforms//cpu:arm": [ + "-DNO_WEBRTC", + ], + "//conditions:default": [], + }), defines = ["NO_WEBRTC"], visibility = [ "//connections:__subpackages__", diff --git a/internal/platform/implementation/BUILD b/internal/platform/implementation/BUILD index 7a6dc916..e4f9612b 100644 --- a/internal/platform/implementation/BUILD +++ b/internal/platform/implementation/BUILD @@ -65,6 +65,12 @@ cc_library( "wifi_hotspot.h", "wifi_lan.h", ], + copts = select({ + "@platforms//cpu:arm": [ + "-DNO_WEBRTC", + ], + "//conditions:default": [], + }), defines = ["NO_WEBRTC"], visibility = [ "//connections/implementation:__subpackages__", @@ -92,6 +98,12 @@ cc_library( hdrs = [ "platform.h", ], + copts = select({ + "@platforms//cpu:arm": [ + "-DNO_WEBRTC", + ], + "//conditions:default": [], + }), defines = ["NO_WEBRTC"], visibility = [ "//connections/implementation:__subpackages__", diff --git a/internal/platform/implementation/ios/BUILD b/internal/platform/implementation/ios/BUILD index 56894da8..7801b833 100644 --- a/internal/platform/implementation/ios/BUILD +++ b/internal/platform/implementation/ios/BUILD @@ -42,6 +42,12 @@ objc_library( "utils.h", "wifi_lan.h", ], + copts = select({ + "@platforms//cpu:arm": [ + "-DNO_WEBRTC", + ], + "//conditions:default": [], + }), features = ["-layering_check"], deps = [ ":Platform_cc",