diff --git a/cpp/analytics/BUILD b/cpp/analytics/BUILD index 8b701d47..e72aeea4 100644 --- a/cpp/analytics/BUILD +++ b/cpp/analytics/BUILD @@ -22,6 +22,7 @@ cc_library( "analytics_recorder.h", ], compatible_with = ["//buildenv/target:non_prod"], + copts = ["-DCORE_ADAPTER_DLL"], visibility = [ "//core:__subpackages__", "//proto/analytics:__subpackages__", diff --git a/cpp/core/BUILD b/cpp/core/BUILD index 65ba013c..1c3a26c1 100644 --- a/cpp/core/BUILD +++ b/cpp/core/BUILD @@ -22,6 +22,7 @@ cc_library( "core.h", ], compatible_with = ["//buildenv/target:non_prod"], + copts = ["-DCORE_ADAPTER_DLL"], visibility = [ "//googlemac/iPhone/Shared/Nearby/Connections:__subpackages__", "//third_party/nearby_connections/windows:__subpackages__", @@ -53,6 +54,7 @@ cc_library( "strategy.h", ], compatible_with = ["//buildenv/target:non_prod"], + copts = ["-DCORE_ADAPTER_DLL"], visibility = [ "//googlemac/iPhone/Shared/Nearby/Connections:__subpackages__", "//analytics:__subpackages__", diff --git a/cpp/core/internal/BUILD b/cpp/core/internal/BUILD index 4c59d0f0..9247f02e 100644 --- a/cpp/core/internal/BUILD +++ b/cpp/core/internal/BUILD @@ -84,6 +84,7 @@ cc_library( "wifi_lan_service_info.h", ], compatible_with = ["//buildenv/target:non_prod"], + copts = ["-DCORE_ADAPTER_DLL"], visibility = [ "//core:__pkg__", "//core/internal/fuzzers:__pkg__", diff --git a/cpp/core/internal/fuzzers/BUILD b/cpp/core/internal/fuzzers/BUILD index 56175c5b..f43a02c5 100644 --- a/cpp/core/internal/fuzzers/BUILD +++ b/cpp/core/internal/fuzzers/BUILD @@ -19,6 +19,7 @@ cc_fuzz_target( name = "offline_frames_fuzzer", srcs = ["offline_frames_fuzzer.cc"], componentid = 148515, + copts = ["-DCORE_ADAPTER_DLL"], deps = [ "//security/fuzzing/blaze:default_init_google_for_cc_fuzz_target", "//core/internal", diff --git a/cpp/core/internal/mediums/ble_v2/BUILD b/cpp/core/internal/mediums/ble_v2/BUILD index ba9b94e4..2e6685fd 100644 --- a/cpp/core/internal/mediums/ble_v2/BUILD +++ b/cpp/core/internal/mediums/ble_v2/BUILD @@ -30,6 +30,7 @@ cc_library( "discovered_peripheral_callback.h", ], compatible_with = ["//buildenv/target:non_prod"], + copts = ["-DCORE_ADAPTER_DLL"], visibility = [ "//core/internal:__subpackages__", ], diff --git a/cpp/core/internal/mediums/webrtc/BUILD b/cpp/core/internal/mediums/webrtc/BUILD index fedff28f..52f7fc30 100644 --- a/cpp/core/internal/mediums/webrtc/BUILD +++ b/cpp/core/internal/mediums/webrtc/BUILD @@ -32,6 +32,7 @@ cc_library( "webrtc_socket_wrapper.h", ], compatible_with = ["//buildenv/target:non_prod"], + copts = ["-DCORE_ADAPTER_DLL"], visibility = [ "//core/internal:__subpackages__", ], diff --git a/cpp/platform/base/BUILD b/cpp/platform/base/BUILD index 1bd35792..fa8f5386 100644 --- a/cpp/platform/base/BUILD +++ b/cpp/platform/base/BUILD @@ -41,6 +41,7 @@ cc_library( "types.h", ], compatible_with = ["//buildenv/target:non_prod"], + copts = ["-DCORE_ADAPTER_DLL"], visibility = [ "//googlemac/iPhone/Shared/Nearby/Connections:__subpackages__", "//analytics:__subpackages__", diff --git a/cpp/platform/impl/windows/BUILD b/cpp/platform/impl/windows/BUILD index a62ca186..8bd81cb8 100644 --- a/cpp/platform/impl/windows/BUILD +++ b/cpp/platform/impl/windows/BUILD @@ -109,25 +109,8 @@ cc_library( "wifi_lan_nsd.cc", "wifi_lan_socket.cc", ], - hdrs = [ - "bluetooth_classic.h", - "bluetooth_classic_device.h", - "bluetooth_classic_medium.h", - "bluetooth_classic_server_socket.h", - "bluetooth_classic_socket.h", - "condition_variable.h", - "executor.h", - "mutex.h", - "runner.h", - "scheduled_executor.h", - "submittable_executor.h", - "thread_pool.h", - "wifi_lan.h", - ], compatible_with = ["//buildenv/target:non_prod"], - copts = [ - "-Ithird_party/nearby_connections/cpp/platform/impl/windows/generated", - ], + copts = ["-Ithird_party/nearby_connections/cpp/platform/impl/windows/generated"], visibility = [ "//third_party/nearby_connections/windows:__subpackages__", ], @@ -176,7 +159,7 @@ cc_test( "scheduled_executor_test.cc", "submittable_executor_test.cc", ], - copts = ["-Iplatform/impl/windows/generated"], + copts = ["-Iplatform/impl/windows/generated -DCORE_ADAPTER_DLL"], deps = [ ":comm", ":crypto", diff --git a/cpp/platform/public/BUILD b/cpp/platform/public/BUILD index f6e1a779..3d36102d 100644 --- a/cpp/platform/public/BUILD +++ b/cpp/platform/public/BUILD @@ -85,6 +85,7 @@ cc_library( "wifi_lan.h", ], compatible_with = ["//buildenv/target:non_prod"], + copts = ["-DCORE_ADAPTER_DLL"], visibility = [ "//googlemac/iPhone/Shared/Nearby/Connections:__subpackages__", "//core:__subpackages__", @@ -110,6 +111,7 @@ cc_library( "logging.h", ], compatible_with = ["//buildenv/target:non_prod"], + copts = ["-DCORE_ADAPTER_DLL"], visibility = [ "//analytics:__subpackages__", "//core:__subpackages__", @@ -144,6 +146,7 @@ cc_test( "single_thread_executor_test.cc", "wifi_lan_test.cc", ], + copts = ["-DCORE_ADAPTER_DLL"], shard_count = 16, deps = [ ":comm", diff --git a/windows/BUILD b/windows/BUILD index 37ddcf90..1fe8ad6d 100644 --- a/windows/BUILD +++ b/windows/BUILD @@ -11,7 +11,6 @@ # 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. - load("//third_party/msvc:build_windows.bzl", "cc_windows_dll") licenses(["notice"]) @@ -21,7 +20,7 @@ cc_windows_dll( name = "core_adapter", srcs = ["core_adapter.cc"], hdrs = ["core_adapter.h"], - copts = ["-DCORE_ADAPTER_BUILD_DLL"], + copts = ["-DCORE_ADAPTER_BUILD_DLL -DCOMPILING_CORE"], defines = ["CORE_ADAPTER_DLL"], tags = ["windows-dll"], deps = [