• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1//
2// Copyright (C) 2020 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8//      http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15//
16
17// TODO(152067309): Stop building this yourself once it's ABI stable and has
18// been made vendor available. Just use libc++fs instead of this.
19
20cc_defaults {
21    name: "android.hardware.automotive@libc++fsdefaults",
22    local_include_dirs: ["include"],
23    export_include_dirs: ["include"],
24    cflags: [
25        "-Wall",
26        "-Werror",
27        "-Wno-unused-parameter",
28    ],
29    cppflags: [
30        "-std=c++17",
31        "-fexceptions",
32        "-DLIBCXX_BUILDING_LIBCXXABI",
33        "-D_LIBCPP_BUILDING_LIBRARY",
34    ],
35    rtti: true,
36}
37
38cc_library_static {
39    name: "android.hardware.automotive@libc++fs",
40    recovery_available: true,
41    vendor: true,
42    defaults: ["android.hardware.automotive@libc++fsdefaults"],
43    srcs: [
44        "src/filesystem/directory_iterator.cpp",
45        "src/filesystem/operations.cpp",
46    ],
47    multilib: {
48        lib32: {
49            // off_t usage is constrained to within the libc++ source (not the
50            // headers), so we can build the filesystem library with a 64-bit
51            // off_t on LP32 to get large file support without needing all users
52            // of the library to match.
53            cflags: ["-D_FILE_OFFSET_BITS=64"],
54        },
55    },
56    target: {
57        windows: {
58            enabled: false,
59        },
60    },
61}
62