From b8c08782aae24af70a4fec86535ea74d452ab72f Mon Sep 17 00:00:00 2001 From: JT Teh Date: Tue, 18 Sep 2018 10:58:30 +0000 Subject: [PATCH] Revert "Add RTC_EXPORT macro to export WebRTC symbols." MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 55daf1aef65218a97eff88999e5190a2f2f6b72e. Reason for revert: The build directory conflicts with the existing BUILD file on Mac where the file system is case insensitive. Original change's description: > Add RTC_EXPORT macro to export WebRTC symbols. > > This CL introduces the utility macro RTC_EXPORT which will let WebRTC > developers decide which symbols are supposed to be exported/imported > and which ones are private. > > RTC_EXPORT will only export/import symbols in a component build, more > info: https://cs.chromium.org/chromium/src/docs/component_build.md. > During a component build, the macro COMPONENT_BUILD will be globally > defined in a consistent fashion so it is safe to rely on it to > understand how to expand RTC_EXPORT. > In a non component build, RTC_EXPORT will expand to nothing. > > Bug: webrtc:9419 > Change-Id: Ic58162783be7f5883136ade27f324d6d34fdf932 > Reviewed-on: https://webrtc-review.googlesource.com/97960 > Commit-Queue: Mirko Bonadei > Reviewed-by: Karl Wiberg > Reviewed-by: Niels Moller > Reviewed-by: Patrik Höglund > Reviewed-by: Yves Gerey > Cr-Commit-Position: refs/heads/master@{#24757} TBR=phoglund@webrtc.org,mbonadei@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org,yvesg@webrtc.org Change-Id: I9147ad010f391eeeb2e9dd0cbe7b637ebda57766 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: webrtc:9419 Reviewed-on: https://webrtc-review.googlesource.com/100803 Reviewed-by: JT Teh Commit-Queue: JT Teh Cr-Commit-Position: refs/heads/master@{#24763} --- BUILD.gn | 9 -------- rtc_base/build/BUILD.gn | 15 ------------- rtc_base/build/rtc_export.h | 43 ------------------------------------- webrtc.gni | 3 --- 4 files changed, 70 deletions(-) delete mode 100644 rtc_base/build/BUILD.gn delete mode 100644 rtc_base/build/rtc_export.h diff --git a/BUILD.gn b/BUILD.gn index 3f06fa9da4..418408b7fa 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -83,21 +83,12 @@ if (!build_with_chromium) { } } -config("library_impl_config") { - # Build targets that contain WebRTC implementation need this macro to - # be defined in order to correctly export symbols when is_component_build - # is true. - # For more info see: rtc_base/build/rtc_export.h. - defines = [ "WEBRTC_LIBRARY_IMPL" ] -} - # Contains the defines and includes in common.gypi that are duplicated both as # target_defaults and direct_dependent_settings. config("common_inherited_config") { defines = [] cflags = [] ldflags = [] - if (build_with_mozilla) { defines += [ "WEBRTC_MOZILLA_BUILD" ] } diff --git a/rtc_base/build/BUILD.gn b/rtc_base/build/BUILD.gn deleted file mode 100644 index 8635ad5518..0000000000 --- a/rtc_base/build/BUILD.gn +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. -# -# Use of this source code is governed by a BSD-style license -# that can be found in the LICENSE file in the root of the source -# tree. An additional intellectual property rights grant can be found -# in the file PATENTS. All contributing project authors may -# be found in the AUTHORS file in the root of the source tree. - -import("../../webrtc.gni") - -rtc_source_set("rtc_export") { - sources = [ - "rtc_export.h", - ] -} diff --git a/rtc_base/build/rtc_export.h b/rtc_base/build/rtc_export.h deleted file mode 100644 index b3636fcec9..0000000000 --- a/rtc_base/build/rtc_export.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef RTC_BASE_BUILD_RTC_EXPORT_H_ -#define RTC_BASE_BUILD_RTC_EXPORT_H_ - -// RTC_EXPORT is used to mark symbols as exported or imported when WebRTC is -// built or used as a shared library. -// When WebRTC is built as a static library the RTC_EXPORT macro expands to -// nothing. - -#ifdef COMPONENT_BUILD - -#ifdef WEBRTC_WIN - -#ifdef WEBRTC_LIBRARY_IMPL -#define RTC_EXPORT __declspec(dllexport) -#else -#define RTC_EXPORT __declspec(dllimport) -#endif - -#else // WEBRTC_WIN - -#if __has_attribute(visibility) && defined(WEBRTC_LIBRARY_IMPL) -#define RTC_EXPORT __attribute__((visibility("default"))) -#endif - -#endif // WEBRTC_WIN - -#endif // COMPONENT_BUILD - -#ifndef RTC_EXPORT -#define RTC_EXPORT -#endif - -#endif // RTC_BASE_BUILD_RTC_EXPORT_H_ diff --git a/webrtc.gni b/webrtc.gni index dc0c7b5c00..150599f8e9 100644 --- a/webrtc.gni +++ b/webrtc.gni @@ -279,7 +279,6 @@ rtc_common_inherited_config = webrtc_root + ":common_inherited_config" rtc_remove_configs = [] rtc_add_configs = rtc_common_configs rtc_prod_configs = [ webrtc_root + ":rtc_prod_config" ] -rtc_library_impl_config = [ webrtc_root + ":library_impl_config" ] set_defaults("rtc_test") { configs = rtc_add_configs @@ -445,7 +444,6 @@ template("rtc_source_set") { } configs += invoker.configs - configs += rtc_library_impl_config configs -= rtc_remove_configs configs -= invoker.suppressed_configs public_configs = [ @@ -554,7 +552,6 @@ template("rtc_static_library") { } configs += invoker.configs - configs += rtc_library_impl_config configs -= rtc_remove_configs configs -= invoker.suppressed_configs public_configs = [