Skip to content

Commit

Permalink
Merge pull request #680 from Chilledheart/bump_libcxx_to_chromium_122…
Browse files Browse the repository at this point in the history
…_6257

bump libc++ to match chromium 122.0.6257.1
  • Loading branch information
Chilledheart committed Jan 19, 2024
2 parents e3cbda3 + 33b848f commit 4f781a3
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 4 deletions.
12 changes: 10 additions & 2 deletions third_party/libc++/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -697,13 +697,21 @@ endif()

include_directories(trunk/include)

set(libcxx_PUBLIC_INCLUDES
${CMAKE_CURRENT_SOURCE_DIR}/__config_site
${CMAKE_CURRENT_SOURCE_DIR}/__assertion_handler)

# export to parent project
set(libcxx_PUBLIC_INCLUDES ${libcxx_PUBLIC_INCLUDES} PARENT_SCOPE)
set(libcxx_PUBLIC_DEFINITIONS ${libcxx_PUBLIC_DEFINITIONS} PARENT_SCOPE)
set(libcxx_PUBLIC_LIBRARIES ${libcxx_PUBLIC_LIBRARIES} PARENT_SCOPE)

foreach(IncludeDir ${libcxx_PUBLIC_INCLUDES})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I${IncludeDir}")
foreach(IncludeHeader ${libcxx_PUBLIC_INCLUDES})
if (MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /FI ${IncludeHeader}")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -include ${IncludeHeader}")
endif()
endforeach()

foreach(Definition ${libcxx_PUBLIC_DEFINITIONS})
Expand Down
23 changes: 23 additions & 0 deletions third_party/libc++/__assertion_handler
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ASSERTION_HANDLER
#define _LIBCPP___ASSERTION_HANDLER

#include <__config>
#include <__verbose_abort>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif

// TODO(hardening): in production, trap rather than abort.
#define _LIBCPP_ASSERTION_HANDLER(message) _LIBCPP_VERBOSE_ABORT("%s", message)

#endif // _LIBCPP___ASSERTION_HANDLER
15 changes: 14 additions & 1 deletion third_party/libc++/__config_site
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
// on Windows, the increase is great enough that we go above the 4GB size
// limit for PDBs (https://crbug.com/1327710#c5). To fix this, we set
// _LIBCPP_ABI_NAMESPACE to a shorter value.

#define _LIBCPP_ABI_NAMESPACE __Cr
#define _LIBCPP_ABI_VERSION 2

Expand All @@ -34,6 +33,14 @@
/* #undef _LIBCPP_HAS_NO_LOCALIZATION */
/* #undef _LIBCPP_HAS_NO_WIDE_CHARACTERS */

// TODO(thakis): Is this right?
/* #undef _LIBCPP_HAS_NO_STD_MODULES */

// TODO(thakis): Is this right?
/* #undef _LIBCPP_HAS_NO_TIME_ZONE_DATABASE */

#define _LIBCPP_INSTRUMENTED_WITH_ASAN

// PSTL backends
/* #undef _LIBCPP_PSTL_CPU_BACKEND_SERIAL */
#if defined(__APPLE__)
Expand Down Expand Up @@ -64,6 +71,12 @@
// termination function on Apple platforms.
#define _LIBCPP_VERBOSE_ABORT(...) ::std::__libcpp_verbose_abort(__VA_ARGS__)

// TODO(crbug.com/1455923) Link against compiler-rt's builtins library to
// enable 128-arithmetic.
#if defined(_WIN32)
#define _LIBCPP_HAS_NO_INT128
#endif

// TODO(thakis): Remove this after LLVM 19's libc++ is rolled in.
#define _LIBCPP_CHAR_TRAITS_REMOVE_BASE_SPECIALIZATION

Expand Down
2 changes: 1 addition & 1 deletion third_party/re2
Submodule re2 updated 2 files
+5 −0 MODULE.bazel
+5 −0 python/setup.py

0 comments on commit 4f781a3

Please sign in to comment.