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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « include/cstdio ('k') | src/locale.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Get sources 1 # Get sources
2 file(GLOB LIBCXX_SOURCES ../src/*.cpp) 2 file(GLOB LIBCXX_SOURCES ../src/*.cpp)
3
4 # @LOCALMOD-START Bake libcxxabi into the libcxx build except on Mac, where
5 # we use the system libcxxabi. When we do this, also don't link against
6 # libcxxabi when building shared libraries.
7 file(GLOB LIBCXXABI_SOURCES ../../libcxxabi/src/*.cpp)
8 file(GLOB PNACL_EH_SUPPORT ../../libcxxabi/src/cxa_pnacl_sjlj_exception.cpp)
9 if ( NOT CMAKE_SYSTEM_NAME STREQUAL "nacl" )
10 # Don't include pnacl EH support for non-nacl builds.
11 list(REMOVE_ITEM LIBCXXABI_SOURCES ${PNACL_EH_SUPPORT})
12 endif()
13 list(APPEND LIBCXX_SOURCES ${LIBCXXABI_SOURCES})
14 set(LIBCXX_CXX_ABI_LIBRARY)
15 # @LOCALMOD-END
16
3 if(WIN32) 17 if(WIN32)
4 file(GLOB LIBCXX_WIN32_SOURCES ../src/support/win32/*.cpp) 18 file(GLOB LIBCXX_WIN32_SOURCES ../src/support/win32/*.cpp)
5 list(APPEND LIBCXX_SOURCES ${LIBCXX_WIN32_SOURCES}) 19 list(APPEND LIBCXX_SOURCES ${LIBCXX_WIN32_SOURCES})
6 elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "SunOS") 20 elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "SunOS")
7 file(GLOB LIBCXX_SOLARIS_SOURCES ../src/support/solaris/*.c) 21 file(GLOB LIBCXX_SOLARIS_SOURCES ../src/support/solaris/*.c)
8 list(APPEND LIBCXX_SOURCES ${LIBCXX_SOLARIS_SOURCES}) 22 list(APPEND LIBCXX_SOURCES ${LIBCXX_SOLARIS_SOURCES})
9 endif() 23 endif()
10 24
11 # Add all the headers to the project for IDEs. 25 # Add all the headers to the project for IDEs.
12 if (MSVC_IDE OR XCODE) 26 if (MSVC_IDE OR XCODE)
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 append_if(libraries LIBCXX_HAS_RT_LIB rt) 60 append_if(libraries LIBCXX_HAS_RT_LIB rt)
47 append_if(libraries LIBCXX_HAS_GCC_S_LIB gcc_s) 61 append_if(libraries LIBCXX_HAS_GCC_S_LIB gcc_s)
48 62
49 #if LIBCXX_CXX_ABI_LIBRARY_PATH is defined we want to add it to the search path. 63 #if LIBCXX_CXX_ABI_LIBRARY_PATH is defined we want to add it to the search path.
50 if (DEFINED LIBCXX_CXX_ABI_LIBRARY_PATH) 64 if (DEFINED LIBCXX_CXX_ABI_LIBRARY_PATH)
51 target_link_libraries(cxx "-L${LIBCXX_CXX_ABI_LIBRARY_PATH}") 65 target_link_libraries(cxx "-L${LIBCXX_CXX_ABI_LIBRARY_PATH}")
52 endif() 66 endif()
53 target_link_libraries(cxx ${libraries}) 67 target_link_libraries(cxx ${libraries})
54 68
55 # Setup flags. 69 # Setup flags.
56 append_if(LIBCXX_COMPILE_FLAGS LIBCXX_HAS_FPIC_FLAG -fPIC) 70 # @LOCALMOD removed append_if(LIBCXX_COMPILE_FLAGS LIBCXX_HAS_FPIC_FLAG -fPIC)
57 append_if(LIBCXX_LINK_FLAGS LIBCXX_HAS_NODEFAULTLIBS_FLAG -nodefaultlibs) 71 append_if(LIBCXX_LINK_FLAGS LIBCXX_HAS_NODEFAULTLIBS_FLAG -nodefaultlibs)
58 72
59 if ( APPLE ) 73 # @LOCALMOD-START
74 if ( CMAKE_SYSTEM_NAME STREQUAL "Darwin" )
75 # Needed to build against OSX 10.6 SDK:
76 # http://lists.cs.uiuc.edu/pipermail/cfe-dev/2011-January/012999.html
77 list(APPEND LIBCXX_COMPILE_FLAGS "-U__STRICT_ANSI__")
78 # Do not re-export libc++abi symbols since they do not come from another dylib
79 list(APPEND LIBCXX_LINK_FLAGS
80 "-Wl,-unexported_symbols_list,${CMAKE_CURRENT_SOURCE_DIR}/libc++unexp.exp" )
81 endif()
82
83 if ( False ) # @LOCALMOD-END
60 if ( CMAKE_OSX_DEPLOYMENT_TARGET STREQUAL "10.6" ) 84 if ( CMAKE_OSX_DEPLOYMENT_TARGET STREQUAL "10.6" )
61 list(APPEND LIBCXX_COMPILE_FLAGS "-U__STRICT_ANSI__") 85 list(APPEND LIBCXX_COMPILE_FLAGS "-U__STRICT_ANSI__")
62 list(APPEND LIBCXX_LINK_FLAGS 86 list(APPEND LIBCXX_LINK_FLAGS
63 "-compatibility_version 1" 87 "-compatibility_version 1"
64 "-current_version 1" 88 "-current_version 1"
65 "-install_name /usr/lib/libc++.1.dylib" 89 "-install_name /usr/lib/libc++.1.dylib"
66 "-Wl,-reexport_library,/usr/lib/libc++abi.dylib" 90 "-Wl,-reexport_library,/usr/lib/libc++abi.dylib"
67 "-Wl,-unexported_symbols_list,${CMAKE_CURRENT_SOURCE_DIR}/libc++unexp.exp" 91 "-Wl,-unexported_symbols_list,${CMAKE_CURRENT_SOURCE_DIR}/libc++unexp.exp"
68 "/usr/lib/libSystem.B.dylib") 92 "/usr/lib/libSystem.B.dylib")
69 else() 93 else()
(...skipping 30 matching lines...) Expand all
100 LINK_FLAGS "${LIBCXX_LINK_FLAGS}" 124 LINK_FLAGS "${LIBCXX_LINK_FLAGS}"
101 OUTPUT_NAME "c++" 125 OUTPUT_NAME "c++"
102 VERSION "1.0" 126 VERSION "1.0"
103 SOVERSION "1" 127 SOVERSION "1"
104 ) 128 )
105 129
106 install(TARGETS cxx 130 install(TARGETS cxx
107 LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} 131 LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
108 ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} 132 ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}
109 ) 133 )
OLDNEW
« 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