blob: 791ac0b5601a866d69c8cf59f85c85bfe0c9cf37 [file] [log] [blame]
btolsch9d6900c2018-05-30 18:22:53 -07001# 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 Wiitalab2d13232019-02-04 18:07:28 -08005import("//build_overrides/build.gni")
btolsch5292c942018-07-26 00:06:22 -07006
Yuri Wiitalab2d13232019-02-04 18:07:28 -08007source_set("platform") {
8 defines = []
9
10 sources = [
Yuri Wiitalab2d13232019-02-04 18:07:28 -080011 "api/event_waiter.cc",
12 "api/event_waiter.h",
13 "api/logging.cc",
14 "api/logging.h",
15 "api/network_interface.cc",
16 "api/network_interface.h",
17 "api/socket.h.",
18 "api/time.h",
19 "base/event_loop.cc", # TODO: separate API from impl.
20 "base/event_loop.h", # TODO: separate API from impl.
21 ]
Jordan Bayles9eb09742019-01-15 14:04:52 -080022
23 public_deps = [
Yuri Wiitalab2d13232019-02-04 18:07:28 -080024 "//base",
Jordan Bayles9eb09742019-01-15 14:04:52 -080025 "//third_party/abseil",
26 ]
Yuri Wiitalab2d13232019-02-04 18:07:28 -080027
28 if (build_with_chromium) {
29 sources += [
Yuri Wiitalab2d13232019-02-04 18:07:28 -080030 "chromium/event_waiter.cc",
31 "chromium/logging.cc",
32 "chromium/network_interface.cc",
Yuri Wiitalab2d13232019-02-04 18:07:28 -080033 "chromium/socket.cc",
34 "chromium/socket.h",
Yuri Wiitala10dea9f2019-02-04 20:19:17 -080035 "chromium/time.cc",
Yuri Wiitalab2d13232019-02-04 18:07:28 -080036 ]
37 } else { # !build_with_chromium
38 sources += [
39 "base/logging.cc",
40 "base/time.cc",
41 ]
42
43 if (is_linux) {
44 sources += [ "linux/network_interface.cc" ]
45 } else if (is_mac) {
46 defines += [
47 # Required, to use the new IPv6 Sockets options introduced by RFC 3542.
48 "__APPLE_USE_RFC_3542",
49 ]
50 sources += [ "mac/network_interface.cc" ]
51 }
52
53 if (is_posix) {
54 sources += [
Yuri Wiitalab2d13232019-02-04 18:07:28 -080055 "posix/event_waiter.cc",
56 "posix/logging.cc",
57 "posix/socket.cc",
58 "posix/socket.h",
59 ]
60 }
61 }
btolsch9d6900c2018-05-30 18:22:53 -070062}