[Lldb-commits] [lldb] r246822 - Only export public symbols with the cmake build.
Bruce Mitchener via lldb-commits
lldb-commits at lists.llvm.org
Thu Sep 3 17:00:41 PDT 2015
Author: brucem
Date: Thu Sep 3 19:00:41 2015
New Revision: 246822
URL: http://llvm.org/viewvc/llvm-project?rev=246822&view=rev
Log:
Only export public symbols with the cmake build.
Summary:
This also moves the xcode support files to be near or the same
as the ones used for cmake.
The source/API/liblldb.xcodes.exports differs from the
source/API/liblldb.exports in that one contains the actual
symbol names (_ prefixed) while the other contains the symbol
names as they are in the code. The liblldb.exports file is
preprocessed by the cmake scripts into the correct per-platform
file needed (like a linker script on Linux).
This is not enabled on Windows as Windows doesn't use the same
name mangling and so it won't be valid there. Also, this is handled
already in a different way on Windows (via dll exports).
Reviewers: emaste, clayborg, labath, chaoren
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D12599
Added:
lldb/trunk/source/API/liblldb.exports
lldb/trunk/source/API/liblldb.xcode.exports
- copied, changed from r246821, lldb/trunk/resources/lldb-framework-exports
lldb/trunk/tools/argdumper/argdumper.exports
- copied, changed from r246821, lldb/trunk/tools/lldb-server/exports
lldb/trunk/tools/lldb-mi/lldb-mi.exports
- copied, changed from r246821, lldb/trunk/tools/argdumper/exports
lldb/trunk/tools/lldb-server/lldb-server.exports
- copied, changed from r246821, lldb/trunk/tools/lldb-server/exports
Removed:
lldb/trunk/resources/lldb-framework-exports
lldb/trunk/tools/argdumper/exports
lldb/trunk/tools/lldb-server/exports
Modified:
lldb/trunk/lldb.xcodeproj/project.pbxproj
lldb/trunk/source/API/CMakeLists.txt
Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=246822&r1=246821&r2=246822&view=diff
==============================================================================
--- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
+++ lldb/trunk/lldb.xcodeproj/project.pbxproj Thu Sep 3 19:00:41 2015
@@ -7257,7 +7257,7 @@
CURRENT_PROJECT_VERSION = 350.99.0;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 350.99.0;
- EXPORTED_SYMBOLS_FILE = "resources/lldb-framework-exports";
+ EXPORTED_SYMBOLS_FILE = "source/API/liblldb.xcode.exports";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
@@ -7330,7 +7330,7 @@
DEAD_CODE_STRIPPING = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 350.99.0;
- EXPORTED_SYMBOLS_FILE = "resources/lldb-framework-exports";
+ EXPORTED_SYMBOLS_FILE = "source/API/liblldb.xcode.exports";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
@@ -7720,7 +7720,7 @@
DEAD_CODE_STRIPPING = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 350.99.0;
- EXPORTED_SYMBOLS_FILE = "resources/lldb-framework-exports";
+ EXPORTED_SYMBOLS_FILE = "source/API/liblldb.xcode.exports";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
@@ -8007,7 +8007,7 @@
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "-";
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "";
DEAD_CODE_STRIPPING = YES;
- EXPORTED_SYMBOLS_FILE = "tools/lldb-server/exports";
+ EXPORTED_SYMBOLS_FILE = "tools/lldb-server/lldb-server.exports";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
@@ -8080,7 +8080,7 @@
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "-";
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "";
DEAD_CODE_STRIPPING = YES;
- EXPORTED_SYMBOLS_FILE = "tools/lldb-server/exports";
+ EXPORTED_SYMBOLS_FILE = "tools/lldb-server/lldb-server.exports";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
@@ -8150,7 +8150,7 @@
buildSettings = {
COPY_PHASE_STRIP = YES;
DEAD_CODE_STRIPPING = YES;
- EXPORTED_SYMBOLS_FILE = "tools/lldb-server/exports";
+ EXPORTED_SYMBOLS_FILE = "tools/lldb-server/lldb-server.exports";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
@@ -8430,7 +8430,7 @@
CURRENT_PROJECT_VERSION = 350.99.0;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 350.99.0;
- EXPORTED_SYMBOLS_FILE = "resources/lldb-framework-exports";
+ EXPORTED_SYMBOLS_FILE = "source/API/liblldb.xcode.exports";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
@@ -8556,7 +8556,7 @@
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "-";
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "";
DEAD_CODE_STRIPPING = YES;
- EXPORTED_SYMBOLS_FILE = "tools/lldb-server/exports";
+ EXPORTED_SYMBOLS_FILE = "tools/lldb-server/lldb-server.exports";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
@@ -8720,7 +8720,7 @@
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- EXPORTED_SYMBOLS_FILE = tools/argdumper/exports;
+ EXPORTED_SYMBOLS_FILE = tools/argdumper/argdumper.exports;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
@@ -8787,7 +8787,7 @@
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- EXPORTED_SYMBOLS_FILE = tools/argdumper/exports;
+ EXPORTED_SYMBOLS_FILE = tools/argdumper/argdumper.exports;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
@@ -8856,7 +8856,7 @@
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
- EXPORTED_SYMBOLS_FILE = tools/argdumper/exports;
+ EXPORTED_SYMBOLS_FILE = tools/argdumper/argdumper.exports;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
@@ -8921,7 +8921,7 @@
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
- EXPORTED_SYMBOLS_FILE = tools/argdumper/exports;
+ EXPORTED_SYMBOLS_FILE = tools/argdumper/argdumper.exports;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
Removed: lldb/trunk/resources/lldb-framework-exports
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/resources/lldb-framework-exports?rev=246821&view=auto
==============================================================================
--- lldb/trunk/resources/lldb-framework-exports (original)
+++ lldb/trunk/resources/lldb-framework-exports (removed)
@@ -1,3 +0,0 @@
-__ZN4lldb*
-__ZNK4lldb*
-_init_lld*
Modified: lldb/trunk/source/API/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/CMakeLists.txt?rev=246822&r1=246821&r2=246822&view=diff
==============================================================================
--- lldb/trunk/source/API/CMakeLists.txt (original)
+++ lldb/trunk/source/API/CMakeLists.txt Thu Sep 3 19:00:41 2015
@@ -82,6 +82,10 @@ set_target_properties(liblldb
VERSION ${LLDB_VERSION}
)
+if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows")
+ add_llvm_symbol_exports(liblldb ${CMAKE_CURRENT_SOURCE_DIR}/liblldb.exports)
+endif()
+
if ( CMAKE_SYSTEM_NAME MATCHES "Windows" )
# Only MSVC has the ABI compatibility problem and avoids using FindPythonLibs,
# so only it needs to explicitly link against ${PYTHON_LIBRARY}
Added: lldb/trunk/source/API/liblldb.exports
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/liblldb.exports?rev=246822&view=auto
==============================================================================
--- lldb/trunk/source/API/liblldb.exports (added)
+++ lldb/trunk/source/API/liblldb.exports Thu Sep 3 19:00:41 2015
@@ -0,0 +1,3 @@
+_ZN4lldb*
+_ZNK4lldb*
+init_lld*
Copied: lldb/trunk/source/API/liblldb.xcode.exports (from r246821, lldb/trunk/resources/lldb-framework-exports)
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/liblldb.xcode.exports?p2=lldb/trunk/source/API/liblldb.xcode.exports&p1=lldb/trunk/resources/lldb-framework-exports&r1=246821&r2=246822&rev=246822&view=diff
==============================================================================
(empty)
Copied: lldb/trunk/tools/argdumper/argdumper.exports (from r246821, lldb/trunk/tools/lldb-server/exports)
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/argdumper/argdumper.exports?p2=lldb/trunk/tools/argdumper/argdumper.exports&p1=lldb/trunk/tools/lldb-server/exports&r1=246821&r2=246822&rev=246822&view=diff
==============================================================================
(empty)
Removed: lldb/trunk/tools/argdumper/exports
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/argdumper/exports?rev=246821&view=auto
==============================================================================
(empty)
Copied: lldb/trunk/tools/lldb-mi/lldb-mi.exports (from r246821, lldb/trunk/tools/argdumper/exports)
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/lldb-mi.exports?p2=lldb/trunk/tools/lldb-mi/lldb-mi.exports&p1=lldb/trunk/tools/argdumper/exports&r1=246821&r2=246822&rev=246822&view=diff
==============================================================================
(empty)
Removed: lldb/trunk/tools/lldb-server/exports
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-server/exports?rev=246821&view=auto
==============================================================================
(empty)
Copied: lldb/trunk/tools/lldb-server/lldb-server.exports (from r246821, lldb/trunk/tools/lldb-server/exports)
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-server/lldb-server.exports?p2=lldb/trunk/tools/lldb-server/lldb-server.exports&p1=lldb/trunk/tools/lldb-server/exports&r1=246821&r2=246822&rev=246822&view=diff
==============================================================================
(empty)
More information about the lldb-commits
mailing list