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

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

Issue 1307223010: 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 "//build/config/compiler:no_chromium_code",
96 configs += [ ":usrsctp_warnings" ] 97 "//build/config/compiler:no_incompatible_pointer_warnings",
Nico 2015/09/02 17:05:36 (fwiw, this too must be after no_chromium_code. it
98
99 # Must be after no_chromium_code for warning flags to be ordered correctly.
100 ":usrsctp_warnings",
101 ]
97 102
98 public_configs = [ ":usrsctp_config" ] 103 public_configs = [ ":usrsctp_config" ]
99 104
100 if (use_openssl) { 105 if (use_openssl) {
101 defines += [ "SCTP_USE_OPENSSL_SHA1" ] 106 defines += [ "SCTP_USE_OPENSSL_SHA1" ]
102 } else { 107 } else {
103 defines += [ "SCTP_USE_NSS_SHA1" ] 108 defines += [ "SCTP_USE_NSS_SHA1" ]
104 } 109 }
105 110
106 if (is_linux || is_android) { 111 if (is_linux || is_android) {
(...skipping 19 matching lines...) Expand all
126 ] 131 ]
127 configs -= [ "//build/config/win:winver" ] 132 configs -= [ "//build/config/win:winver" ]
128 } else { 133 } else {
129 defines += [ "NON_WINDOWS_DEFINE" ] 134 defines += [ "NON_WINDOWS_DEFINE" ]
130 } 135 }
131 136
132 deps = [ 137 deps = [
133 "//crypto:platform", 138 "//crypto:platform",
134 ] 139 ]
135 } 140 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698