Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(121)

Side by Side Diff: third_party/usrsctp/BUILD.gn

Issue 1318823008: Un-nest configs in GN files. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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 import("//build/config/crypto.gni") 5 import("//build/config/crypto.gni")
6 6
7 config("usrsctp_config") { 7 config("usrsctp_config") {
8 include_dirs = [ 8 include_dirs = [
9 "usrsctplib", 9 "usrsctplib",
10 "usrsctplib/netinet", 10 "usrsctplib/netinet",
11 ] 11 ]
12 } 12 }
13 13
14 config("usrsctp_warnings") {
15 if (is_clang) {
16 # atomic_init in user_atomic.h is a static function in a header.
17 cflags = [ "-Wno-unused-function" ]
18 }
19 }
20
14 static_library("usrsctp") { 21 static_library("usrsctp") {
15 sources = [ 22 sources = [
16 "usrsctplib/netinet/sctp.h", 23 "usrsctplib/netinet/sctp.h",
17 "usrsctplib/netinet/sctp_asconf.c", 24 "usrsctplib/netinet/sctp_asconf.c",
18 "usrsctplib/netinet/sctp_asconf.h", 25 "usrsctplib/netinet/sctp_asconf.h",
19 "usrsctplib/netinet/sctp_auth.c", 26 "usrsctplib/netinet/sctp_auth.c",
20 "usrsctplib/netinet/sctp_auth.h", 27 "usrsctplib/netinet/sctp_auth.h",
21 "usrsctplib/netinet/sctp_bsd_addr.c", 28 "usrsctplib/netinet/sctp_bsd_addr.c",
22 "usrsctplib/netinet/sctp_bsd_addr.h", 29 "usrsctplib/netinet/sctp_bsd_addr.h",
23 "usrsctplib/netinet/sctp_callout.c", 30 "usrsctplib/netinet/sctp_callout.c",
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 ] 84 ]
78 85
79 defines = [ 86 defines = [
80 "SCTP_PROCESS_LEVEL_LOCKS", 87 "SCTP_PROCESS_LEVEL_LOCKS",
81 "SCTP_SIMPLE_ALLOCATOR", 88 "SCTP_SIMPLE_ALLOCATOR",
82 "__Userspace__", 89 "__Userspace__",
83 90
84 # "SCTP_DEBUG", # Uncomment for SCTP debugging. 91 # "SCTP_DEBUG", # Uncomment for SCTP debugging.
85 ] 92 ]
86 93
87 config("usrsctp_warnings") {
88 if (is_clang) {
89 # atomic_init in user_atomic.h is a static function in a header.
90 cflags = [ "-Wno-unused-function" ]
91 }
92 }
93 configs -= [ "//build/config/compiler:chromium_code" ] 94 configs -= [ "//build/config/compiler:chromium_code" ]
94 configs += [ "//build/config/compiler:no_chromium_code" ] 95 configs += [
95 configs += [ "//build/config/compiler:no_incompatible_pointer_warnings" ] 96 ":usrsctp_warnings",
96 configs += [ ":usrsctp_warnings" ] 97 "//build/config/compiler:no_chromium_code",
98 "//build/config/compiler:no_incompatible_pointer_warnings",
99 ]
97 100
98 public_configs = [ ":usrsctp_config" ] 101 public_configs = [ ":usrsctp_config" ]
99 102
100 if (use_openssl) { 103 if (use_openssl) {
101 defines += [ "SCTP_USE_OPENSSL_SHA1" ] 104 defines += [ "SCTP_USE_OPENSSL_SHA1" ]
102 } else { 105 } else {
103 defines += [ "SCTP_USE_NSS_SHA1" ] 106 defines += [ "SCTP_USE_NSS_SHA1" ]
104 } 107 }
105 108
106 if (is_linux || is_android) { 109 if (is_linux || is_android) {
(...skipping 19 matching lines...) Expand all
126 ] 129 ]
127 configs -= [ "//build/config/win:winver" ] 130 configs -= [ "//build/config/win:winver" ]
128 } else { 131 } else {
129 defines += [ "NON_WINDOWS_DEFINE" ] 132 defines += [ "NON_WINDOWS_DEFINE" ]
130 } 133 }
131 134
132 deps = [ 135 deps = [
133 "//crypto:platform", 136 "//crypto:platform",
134 ] 137 ]
135 } 138 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698