| OLD | NEW |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 config("libc++abi_warnings") { | 5 source_set("libc++abi") { |
| 6 if (is_clang) { | 6 visibility = [ "//buildtools/third_party/libc++" ] |
| 7 # http://llvm.org/PR25978 | |
| 8 cflags = [ "-Wno-unused-function" ] | |
| 9 } | |
| 10 } | |
| 11 | |
| 12 # TODO(thomasanderson): Make this a source_set on all platforms when | |
| 13 # https://bugs.llvm.org/show_bug.cgi?id=33272 is fixed. Making this | |
| 14 # target a static_library coincidentally fixes the issue since the | |
| 15 # linking rules for it are different (__cxa_thread_atexit_impl is | |
| 16 # undefined, but the only symbol that uses it, __cxa_thread_atexit, is | |
| 17 # unused and optimized away). | |
| 18 if (is_mac) { | |
| 19 link_target_type = "static_library" | |
| 20 } else { | |
| 21 link_target_type = "source_set" | |
| 22 } | |
| 23 target(link_target_type, "libc++abi") { | |
| 24 sources = [ | 7 sources = [ |
| 25 "trunk/src/abort_message.cpp", | 8 "trunk/src/abort_message.cpp", |
| 26 "trunk/src/cxa_aux_runtime.cpp", | 9 "trunk/src/cxa_aux_runtime.cpp", |
| 27 "trunk/src/cxa_default_handlers.cpp", | 10 "trunk/src/cxa_default_handlers.cpp", |
| 28 "trunk/src/cxa_demangle.cpp", | 11 "trunk/src/cxa_demangle.cpp", |
| 29 "trunk/src/cxa_exception.cpp", | 12 "trunk/src/cxa_exception.cpp", |
| 30 "trunk/src/cxa_exception_storage.cpp", | 13 "trunk/src/cxa_exception_storage.cpp", |
| 31 "trunk/src/cxa_guard.cpp", | 14 "trunk/src/cxa_guard.cpp", |
| 32 "trunk/src/cxa_handlers.cpp", | 15 "trunk/src/cxa_handlers.cpp", |
| 33 | 16 |
| 34 # This file is supposed to be used in fno-exception builds of | 17 # This file is supposed to be used in fno-exception builds of |
| 35 # libc++abi. We build lib++/libc++abi with exceptions enabled. | 18 # libc++abi. We build lib++/libc++abi with exceptions enabled. |
| 36 #"trunk/src/cxa_noexception.cpp", | 19 #"trunk/src/cxa_noexception.cpp", |
| 37 "trunk/src/cxa_personality.cpp", | 20 "trunk/src/cxa_personality.cpp", |
| 38 "trunk/src/cxa_thread_atexit.cpp", | |
| 39 "trunk/src/cxa_unexpected.cpp", | 21 "trunk/src/cxa_unexpected.cpp", |
| 40 "trunk/src/cxa_vector.cpp", | 22 "trunk/src/cxa_vector.cpp", |
| 41 "trunk/src/cxa_virtual.cpp", | 23 "trunk/src/cxa_virtual.cpp", |
| 42 "trunk/src/fallback_malloc.cpp", | 24 "trunk/src/fallback_malloc.cpp", |
| 43 "trunk/src/private_typeinfo.cpp", | 25 "trunk/src/private_typeinfo.cpp", |
| 44 "trunk/src/stdlib_exception.cpp", | 26 "trunk/src/stdlib_exception.cpp", |
| 45 "trunk/src/stdlib_new_delete.cpp", | 27 "trunk/src/stdlib_new_delete.cpp", |
| 46 "trunk/src/stdlib_stdexcept.cpp", | 28 "trunk/src/stdlib_stdexcept.cpp", |
| 47 "trunk/src/stdlib_typeinfo.cpp", | 29 "trunk/src/stdlib_typeinfo.cpp", |
| 48 ] | 30 ] |
| 31 if (is_linux && !is_mac) { |
| 32 sources == [ "trunk/src/cxa_thread_atexit.cpp" ] |
| 33 } |
| 49 configs -= [ | 34 configs -= [ |
| 50 "//build/config/compiler:chromium_code", | 35 "//build/config/compiler:chromium_code", |
| 51 "//build/config/compiler:no_rtti", | 36 "//build/config/compiler:no_rtti", |
| 52 "//build/config/gcc:no_exceptions", | 37 "//build/config/gcc:no_exceptions", |
| 53 ] | 38 ] |
| 54 configs += [ | 39 configs += [ |
| 55 "//build/config/compiler:no_chromium_code", | 40 "//build/config/compiler:no_chromium_code", |
| 56 "//build/config/compiler:rtti", | 41 "//build/config/compiler:rtti", |
| 57 "//buildtools/third_party/libc++:config", | 42 "//buildtools/third_party/libc++:config", |
| 58 | |
| 59 # Must be after no_chromium_code. | |
| 60 ":libc++abi_warnings", | |
| 61 ] | 43 ] |
| 62 } | 44 } |
| OLD | NEW |