Rename the static version of libc++ on Windows.
Previously both the static version of libc++ and the import library for the DLL had the same name, 'c++.lib'. This patch renames the static library on Windows to be `libc++.lib` so it no longer conflicts. This naming convention is consistent with other windows libraries. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@300817 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -241,11 +241,16 @@ endif()
|
|||||||
if (LIBCXX_ENABLE_STATIC)
|
if (LIBCXX_ENABLE_STATIC)
|
||||||
add_library(cxx_static STATIC $<TARGET_OBJECTS:cxx_objects>)
|
add_library(cxx_static STATIC $<TARGET_OBJECTS:cxx_objects>)
|
||||||
target_link_libraries(cxx_static ${LIBCXX_LIBRARIES})
|
target_link_libraries(cxx_static ${LIBCXX_LIBRARIES})
|
||||||
|
set(STATIC_OUTPUT_NAME "c++")
|
||||||
|
if (WIN32)
|
||||||
|
set(STATIC_OUTPUT_NAME "libc++")
|
||||||
|
endif()
|
||||||
set_target_properties(cxx_static
|
set_target_properties(cxx_static
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
LINK_FLAGS "${LIBCXX_LINK_FLAGS}"
|
LINK_FLAGS "${LIBCXX_LINK_FLAGS}"
|
||||||
OUTPUT_NAME "c++"
|
OUTPUT_NAME "${STATIC_OUTPUT_NAME}"
|
||||||
)
|
)
|
||||||
|
|
||||||
list(APPEND LIBCXX_TARGETS "cxx_static")
|
list(APPEND LIBCXX_TARGETS "cxx_static")
|
||||||
# Attempt to merge the libc++.a archive and the ABI library archive into one.
|
# Attempt to merge the libc++.a archive and the ABI library archive into one.
|
||||||
if (LIBCXX_ENABLE_STATIC_ABI_LIBRARY)
|
if (LIBCXX_ENABLE_STATIC_ABI_LIBRARY)
|
||||||
|
|||||||
@@ -111,7 +111,8 @@ class Configuration(object):
|
|||||||
def make_static_lib_name(self, name):
|
def make_static_lib_name(self, name):
|
||||||
"""Return the full filename for the specified library name"""
|
"""Return the full filename for the specified library name"""
|
||||||
if self.is_windows:
|
if self.is_windows:
|
||||||
return name + '.lib'
|
assert name == 'c++' # Only allow libc++ to use this function for now.
|
||||||
|
return 'lib' + name + '.lib'
|
||||||
else:
|
else:
|
||||||
return 'lib' + name + '.a'
|
return 'lib' + name + '.a'
|
||||||
|
|
||||||
@@ -412,6 +413,9 @@ class Configuration(object):
|
|||||||
|
|
||||||
if self.is_windows:
|
if self.is_windows:
|
||||||
self.config.available_features.add('windows')
|
self.config.available_features.add('windows')
|
||||||
|
if self.cxx_stdlib_under_test == 'libc++':
|
||||||
|
# LIBCXX-WINDOWS-FIXME is a
|
||||||
|
self.config.available_features.add('LIBCXX-WINDOWS-FIXME')
|
||||||
|
|
||||||
# Attempt to detect the glibc version by querying for __GLIBC__
|
# Attempt to detect the glibc version by querying for __GLIBC__
|
||||||
# in 'features.h'.
|
# in 'features.h'.
|
||||||
|
|||||||
Reference in New Issue
Block a user