Home | History | Annotate | Download | only in libcxx
      1 //
      2 // Copyright (C) 2014 The Android Open Source Project
      3 //
      4 // Licensed under the Apache License, Version 2.0 (the "License");
      5 // you may not use this file except in compliance with the License.
      6 // You may obtain a copy of the License at
      7 //
      8 //      http://www.apache.org/licenses/LICENSE-2.0
      9 //
     10 // Unless required by applicable law or agreed to in writing, software
     11 // distributed under the License is distributed on an "AS IS" BASIS,
     12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13 // See the License for the specific language governing permissions and
     14 // limitations under the License.
     15 //
     16 
     17 // host + device static lib
     18 cc_library_static {
     19     name: "libc++_static",
     20     host_supported: true,
     21     vendor_available: true,
     22     clang: true,
     23     srcs: [
     24         "src/algorithm.cpp",
     25         "src/any.cpp",
     26         "src/bind.cpp",
     27         "src/chrono.cpp",
     28         "src/condition_variable.cpp",
     29         "src/debug.cpp",
     30         "src/exception.cpp",
     31         "src/future.cpp",
     32         "src/hash.cpp",
     33         "src/ios.cpp",
     34         "src/iostream.cpp",
     35         "src/locale.cpp",
     36         "src/memory.cpp",
     37         "src/mutex.cpp",
     38         "src/new.cpp",
     39         "src/optional.cpp",
     40         "src/random.cpp",
     41         "src/regex.cpp",
     42         "src/shared_mutex.cpp",
     43         "src/stdexcept.cpp",
     44         "src/string.cpp",
     45         "src/strstream.cpp",
     46         "src/system_error.cpp",
     47         "src/thread.cpp",
     48         "src/typeinfo.cpp",
     49         "src/utility.cpp",
     50         "src/valarray.cpp",
     51         "src/variant.cpp",
     52     ],
     53     local_include_dirs: ["include"],
     54     export_include_dirs: ["include"],
     55     cppflags: [
     56         "-std=c++14",
     57         "-nostdinc++",
     58         "-fexceptions",
     59         "-DLIBCXX_BUILDING_LIBCXXABI",
     60         "-D_LIBCPP_BUILDING_LIBRARY",
     61     ],
     62     rtti: true,
     63     whole_static_libs: [
     64         "libc++abi",
     65     ],
     66     stl: "none",
     67     target: {
     68         linux_bionic: {
     69             enabled: true,
     70         },
     71     },
     72 }
     73 
     74 // host + device dynamic lib
     75 cc_library_shared {
     76     name: "libc++",
     77     host_supported: true,
     78     vendor_available: true,
     79     clang: true,
     80     whole_static_libs: ["libc++_static"],
     81     stl: "none",
     82 
     83     target: {
     84         android: {
     85             shared_libs: ["libdl"],
     86         },
     87         android_arm: {
     88             static_libs: ["libunwind_llvm"],
     89             ldflags: ["-Wl,--exclude-libs,libunwind_llvm.a"],
     90         },
     91         darwin: {
     92             unexported_symbols_list: "lib/libc++unexp.exp",
     93             force_symbols_not_weak_list: "lib/notweak.exp",
     94             force_symbols_weak_list: "lib/weak.exp",
     95             ldflags: [
     96                 "-nodefaultlibs",
     97                 "-Wl,-undefined,dynamic_lookup",
     98             ],
     99         },
    100 
    101         linux: {
    102             ldflags: ["-nodefaultlibs"],
    103             host_ldlibs: [
    104                 "-lrt",
    105                 "-lpthread",
    106                 "-ldl",
    107             ],
    108         },
    109         linux_bionic: {
    110             enabled: true,
    111             static_libs: ["libunwindbacktrace"],
    112             shared_libs: [
    113                 "libdl",
    114                 "liblzma",
    115             ],
    116         },
    117     },
    118 }
    119 
    120 
    121 // ANDROIDMK TRANSLATION ERROR: unsupported conditional
    122 // ifdef LIBCXX_TESTING
    123 // ANDROIDMK TRANSLATION ERROR: unsupported include
    124 // include $(LOCAL_PATH)/buildcmds/Android.mk
    125 
    126 // ANDROIDMK TRANSLATION ERROR: endif from unsupported contitional
    127 // endif
    128 // TARGET_BUILD_APPS
    129 
    130