1package { 2 default_applicable_licenses: ["external_curl_license"], 3} 4 5// Added automatically by a large-scale-change that took the approach of 6// 'apply every license found to every target'. While this makes sure we respect 7// every license restriction, it may not be entirely correct. 8// 9// e.g. GPL in an MIT project might only apply to the contrib/ directory. 10// 11// Please consider splitting the single license below into multiple licenses, 12// taking care not to lose any license_kind information, and overriding the 13// default license using the 'licenses: [...]' property on targets as needed. 14// 15// For unused files, consider creating a 'fileGroup' with "//visibility:private" 16// to attach the license to, and including a comment whether the files may be 17// used in the current project. 18// 19// large-scale-change filtered out the below license kinds as false-positives: 20// SPDX-license-identifier-GPL 21// See: http://go/android-license-faq 22license { 23 name: "external_curl_license", 24 visibility: [":__subpackages__"], 25 license_kinds: [ 26 "SPDX-license-identifier-BSD", 27 "SPDX-license-identifier-ISC", 28 "SPDX-license-identifier-MIT", 29 "SPDX-license-identifier-OpenSSL", 30 "legacy_notice", 31 "legacy_unencumbered", 32 ], 33 license_text: [ 34 "COPYING", 35 ], 36} 37 38cc_defaults { 39 name: "curl_common_defaults", 40 cflags: [ 41 "-Wpointer-arith", 42 "-Wwrite-strings", 43 "-Wunused", 44 "-Winline", 45 "-Wnested-externs", 46 "-Wmissing-declarations", 47 "-Wmissing-prototypes", 48 "-Wno-long-long", 49 "-Wfloat-equal", 50 "-Wno-multichar", 51 "-Wno-sign-compare", 52 "-Wno-format-nonliteral", 53 "-Wendif-labels", 54 "-Wstrict-prototypes", 55 "-Wdeclaration-after-statement", 56 "-Wno-system-headers", 57 "-DHAVE_CONFIG_H", 58 "-Werror", 59 // Bug: http://b/29823425 Disable -Wvarargs for Clang update to r271374 60 "-Wno-varargs", 61 ], 62 local_include_dirs: [ 63 "include", 64 "lib", 65 ], 66 multilib: { 67 lib32: { 68 cflags: [ 69 "-DSIZEOF_LONG=4", 70 "-DSIZEOF_LONG_LONG=8", 71 "-DSIZEOF_SIZE_T=4", 72 "-DSIZEOF_TIME_T=4", 73 ], 74 }, 75 lib64: { 76 cflags: [ 77 "-DSIZEOF_LONG=8", 78 "-DSIZEOF_LONG_LONG=8", 79 "-DSIZEOF_SIZE_T=8", 80 "-DSIZEOF_TIME_T=8", 81 ], 82 }, 83 }, 84} 85 86cc_library { 87 name: "libcurl", 88 vendor_available: true, 89 product_available: true, 90 defaults: ["curl_common_defaults"], 91 export_include_dirs: ["include"], 92 host_supported: true, 93 cflags: [ 94 "-DBUILDING_LIBCURL", 95 "-Wno-format", 96 "-Wformat-security", 97 ], 98 srcs: [ 99 "lib/**/*.c", 100 ], 101 shared_libs: [ 102 "libcrypto", 103 "libssl", 104 "libz", 105 ], 106 target: { 107 host: { 108 cflags: ["-D_GNU_SOURCE=1"], 109 }, 110 darwin: { 111 enabled: false, 112 }, 113 }, 114 unique_host_soname: true, 115} 116 117cc_binary { 118 name: "curl", 119 defaults: ["curl_common_defaults"], 120 srcs: [ 121 "src/*.c", 122 "lib/base64.c", 123 "lib/dynbuf.c", 124 ], 125 exclude_srcs: ["src/tool_hugehelp.c"], 126 shared_libs: [ 127 "libcrypto", 128 "libssl", 129 "libz", 130 ], 131 static_libs: ["libcurl"], 132} 133