btolsch | 9d6900c | 2018-05-30 18:22:53 -0700 | [diff] [blame] | 1 | # Copyright 2018 The Chromium Authors. All rights reserved. |
| 2 | # Use of this source code is governed by a BSD-style license that can be |
| 3 | # found in the LICENSE file. |
| 4 | |
Yuri Wiitala | b2d1323 | 2019-02-04 18:07:28 -0800 | [diff] [blame^] | 5 | import("//build_overrides/build.gni") |
btolsch | 5292c94 | 2018-07-26 00:06:22 -0700 | [diff] [blame] | 6 | |
Yuri Wiitala | b2d1323 | 2019-02-04 18:07:28 -0800 | [diff] [blame^] | 7 | source_set("platform") { |
| 8 | defines = [] |
| 9 | |
| 10 | sources = [ |
| 11 | "api/error.h", |
| 12 | "api/event_waiter.cc", |
| 13 | "api/event_waiter.h", |
| 14 | "api/logging.cc", |
| 15 | "api/logging.h", |
| 16 | "api/network_interface.cc", |
| 17 | "api/network_interface.h", |
| 18 | "api/socket.h.", |
| 19 | "api/time.h", |
| 20 | "base/event_loop.cc", # TODO: separate API from impl. |
| 21 | "base/event_loop.h", # TODO: separate API from impl. |
| 22 | ] |
Jordan Bayles | 9eb0974 | 2019-01-15 14:04:52 -0800 | [diff] [blame] | 23 | |
| 24 | public_deps = [ |
Yuri Wiitala | b2d1323 | 2019-02-04 18:07:28 -0800 | [diff] [blame^] | 25 | "//base", |
Jordan Bayles | 9eb0974 | 2019-01-15 14:04:52 -0800 | [diff] [blame] | 26 | "//third_party/abseil", |
| 27 | ] |
Yuri Wiitala | b2d1323 | 2019-02-04 18:07:28 -0800 | [diff] [blame^] | 28 | |
| 29 | if (build_with_chromium) { |
| 30 | sources += [ |
| 31 | "chromium/error.cc", |
| 32 | "chromium/event_waiter.cc", |
| 33 | "chromium/logging.cc", |
| 34 | "chromium/network_interface.cc", |
| 35 | "chromium/time.cc", |
| 36 | "chromium/socket.cc", |
| 37 | "chromium/socket.h", |
| 38 | ] |
| 39 | } else { # !build_with_chromium |
| 40 | sources += [ |
| 41 | "base/logging.cc", |
| 42 | "base/time.cc", |
| 43 | ] |
| 44 | |
| 45 | if (is_linux) { |
| 46 | sources += [ "linux/network_interface.cc" ] |
| 47 | } else if (is_mac) { |
| 48 | defines += [ |
| 49 | # Required, to use the new IPv6 Sockets options introduced by RFC 3542. |
| 50 | "__APPLE_USE_RFC_3542", |
| 51 | ] |
| 52 | sources += [ "mac/network_interface.cc" ] |
| 53 | } |
| 54 | |
| 55 | if (is_posix) { |
| 56 | sources += [ |
| 57 | "posix/error.cc", |
| 58 | "posix/event_waiter.cc", |
| 59 | "posix/logging.cc", |
| 60 | "posix/socket.cc", |
| 61 | "posix/socket.h", |
| 62 | ] |
| 63 | } |
| 64 | } |
btolsch | 9d6900c | 2018-05-30 18:22:53 -0700 | [diff] [blame] | 65 | } |