Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(527)

Unified Diff: lib/CMakeLists.txt

Issue 904473004: Rebased localmods in libcxx to 223109. (Closed)
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/cstdio ('k') | src/locale.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/CMakeLists.txt
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index 12e9f4ad643bf9dc2d43aebb74b53e4094aa828d..845d388c00203ece577a289fb2c5a128229fdb90 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -1,5 +1,19 @@
# Get sources
file(GLOB LIBCXX_SOURCES ../src/*.cpp)
+
+# @LOCALMOD-START Bake libcxxabi into the libcxx build except on Mac, where
+# we use the system libcxxabi. When we do this, also don't link against
+# libcxxabi when building shared libraries.
+file(GLOB LIBCXXABI_SOURCES ../../libcxxabi/src/*.cpp)
+file(GLOB PNACL_EH_SUPPORT ../../libcxxabi/src/cxa_pnacl_sjlj_exception.cpp)
+if ( NOT CMAKE_SYSTEM_NAME STREQUAL "nacl" )
+ # Don't include pnacl EH support for non-nacl builds.
+ list(REMOVE_ITEM LIBCXXABI_SOURCES ${PNACL_EH_SUPPORT})
+endif()
+ list(APPEND LIBCXX_SOURCES ${LIBCXXABI_SOURCES})
+ set(LIBCXX_CXX_ABI_LIBRARY)
+# @LOCALMOD-END
+
if(WIN32)
file(GLOB LIBCXX_WIN32_SOURCES ../src/support/win32/*.cpp)
list(APPEND LIBCXX_SOURCES ${LIBCXX_WIN32_SOURCES})
@@ -53,10 +67,20 @@ endif()
target_link_libraries(cxx ${libraries})
# Setup flags.
-append_if(LIBCXX_COMPILE_FLAGS LIBCXX_HAS_FPIC_FLAG -fPIC)
+# @LOCALMOD removed append_if(LIBCXX_COMPILE_FLAGS LIBCXX_HAS_FPIC_FLAG -fPIC)
append_if(LIBCXX_LINK_FLAGS LIBCXX_HAS_NODEFAULTLIBS_FLAG -nodefaultlibs)
-if ( APPLE )
+# @LOCALMOD-START
+if ( CMAKE_SYSTEM_NAME STREQUAL "Darwin" )
+ # Needed to build against OSX 10.6 SDK:
+ # http://lists.cs.uiuc.edu/pipermail/cfe-dev/2011-January/012999.html
+ list(APPEND LIBCXX_COMPILE_FLAGS "-U__STRICT_ANSI__")
+ # Do not re-export libc++abi symbols since they do not come from another dylib
+ list(APPEND LIBCXX_LINK_FLAGS
+ "-Wl,-unexported_symbols_list,${CMAKE_CURRENT_SOURCE_DIR}/libc++unexp.exp")
+endif()
+
+if ( False ) # @LOCALMOD-END
if ( CMAKE_OSX_DEPLOYMENT_TARGET STREQUAL "10.6" )
list(APPEND LIBCXX_COMPILE_FLAGS "-U__STRICT_ANSI__")
list(APPEND LIBCXX_LINK_FLAGS
« no previous file with comments | « include/cstdio ('k') | src/locale.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698