Skip to content

Commit

Permalink
[CP] [Impeller] Switched to static linked libc++ in vulkan validation…
Browse files Browse the repository at this point in the history
… layers. (#794)

CP of flutter/engine#47886 and the buildroot part of flutter/engine#48290
  • Loading branch information
zanderso authored and DenisovAV committed May 5, 2024
1 parent 0141e94 commit 29ab096
Show file tree
Hide file tree
Showing 2 changed files with 578 additions and 0 deletions.
86 changes: 86 additions & 0 deletions build/secondary/third_party/libcxxabi/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# Copyright 2013 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

config("libcxxabi_config") {
common_cc_flags = [
"-nostdinc++",
"-fvisibility=hidden",
]

cflags_cc = common_cc_flags
cflags_objcc = common_cc_flags

include_dirs = [ "include" ]

if (is_ios) {
ldflags = [ "-Wl,-unexported_symbols_list," +
rebase_path("lib/new-delete.exp", root_build_dir) ]
}
}

source_set("libcxxabi") {
visibility = [ "../libcxx:*" ]

public_configs = [ ":libcxxabi_config" ]

defines = [
"_LIBCPP_BUILDING_LIBRARY",
"_LIBCXXABI_BUILDING_LIBRARY",
"LIBCXXABI_SILENT_TERMINATE",
"_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
]

sources = []

# Compile libcxx ABI using C++11. This replicates the rule in the
# CMakeLists on the "cxx_abiobjects" target.
configs -= [ "//build/config/compiler:cxx_version_default" ]
configs += [ "//build/config/compiler:cxx_version_20" ]

configs += [ "//third_party/libcxx:src_include" ]

# No translation units in the engine are built with exceptions. But, using
# Objective-C exceptions requires some infrastructure setup for exceptions.
# Build support for the same in cxxabi on Darwin.
if (is_mac || is_ios) {
configs -= [ "//build/config/gcc:no_exceptions" ]
sources += [
"src/cxa_exception.cpp",
"src/cxa_personality.cpp",
]
} else {
if (!is_tsan) {
sources += [ "src/cxa_noexception.cpp" ]
}
}

# Third party dependencies may depend on RTTI. Add support for the same in
# cxxabi.
configs -= [ "//build/config/compiler:no_rtti" ]
configs += [ "//build/config/compiler:rtti" ]

sources += [
"src/abort_message.cpp",
"src/cxa_aux_runtime.cpp",
"src/cxa_default_handlers.cpp",
"src/cxa_demangle.cpp",
"src/cxa_exception_storage.cpp",
"src/cxa_handlers.cpp",
"src/cxa_vector.cpp",
"src/cxa_virtual.cpp",
"src/fallback_malloc.cpp",
"src/private_typeinfo.cpp",
"src/stdlib_exception.cpp",
"src/stdlib_stdexcept.cpp",
"src/stdlib_typeinfo.cpp",
]

if (!(is_tsan && is_linux)) {
sources += [ "src/cxa_guard.cpp" ]
}

if (is_fuchsia || (is_posix && !is_apple)) {
sources += [ "src/cxa_thread_atexit.cpp" ]
}
}
Loading

0 comments on commit 29ab096

Please sign in to comment.